Returns the full path filename of the NxCore Tape being processed.
#define cszNxCoreGetTapeName "sNxCoreGetTapeName" typedef int (__stdcall *NxCoreGetTapeName) (char* szBuffTapename, int nBufferBytes); int GetTapeName( char* szBuffTapename, int nBufferBytes );
Value of szBuffTapename in different conditions
When processing | szBuffTapename | Comments |
---|---|---|
Real time | "" | full tape name is at (char*) &szBuffTapename[1] |
Historical tape | "C:\NxCoreData\20YYMMDD.XX.nxc" | full tape name is provided |
State tape | "C:\NxCoreData\20YYMMDD.XX.nxc" | full tape name is provided, you need to save off the state name in a global variable or in UserData |
Example
char buf[MAX_PATH]; NxCore.GetTapeName(buf, sizeof(buf)); if (*buf == '\0') printf("Processing real-time tape: %s\n", buf + 1); else printf("Processing historical or state tape: %s\n", buf); |
String tapeName = GetTapeName(); if(tapeName.length() == 0) System.out.println("Processing real-time tape");// Java does not include real-time tape path else System.out.println("Processing historical or state tape: " + tapeName); |
tapeName = NxCore.GetTapeName() if len(tapeName) == 0: print("Processing real-time tape")# Python does not include real-time tape path else: print("Processing historical or state tape: " + tapeName) |