static int hexMode = HEXMODE;
-static const char trbcmd_version[] = "$Revision: 2.73 $";
+static const char trbcmd_version[] = "$Revision: 2.74 $";
#define BACKLOG 10
static uint16_t tcp_port = 55555;
fprintf(stdout,
" -H hex-mode: all arguments will be interpreted "
"as hexadecimal-numbers\n");
+ fprintf(stdout, " -e put a EOF marker \"<EOF>\" at end of output\n");
fprintf(stdout, " -V version number\n");
fprintf(stdout, "\nCommands:\n");
fprintf(stdout, " r <trbaddress> <register> -> "
int loop = 1;
int sleepTime = 0;
int loopCtr = 0;
+ int eof_marker = 0;
uint16_t trgCtr = 0; /* counter for the %ctr option */
int opt;
int i;
#ifdef PEXOR
- const char optString[] = "+hf:n:d:s:HMVD";
+ const char optString[] = "+hf:n:d:s:HMVeD";
pexor_dma = 1;
#else
- const char optString[] = "+hf:n:d:s:HMV";
+ const char optString[] = "+hf:n:d:s:HMVe";
#endif
trb_debug = 0;
case 'H':
hexMode = 1;
break;
+ case 'e':
+ eof_marker = 1;
+ break;
case 'V':
printf("%s %s, using libtrbnet %s\n",
basename(argv[0]), trbcmd_version, trbnet_version);
logError(ERROR, "Invalid command, try -h option\n");
return -1;
}
+ if (eof_marker == 1) {
+ fprintf(stdout, "<EOF>\n");
+ }
} /* End script-file-loop */
-
+
trgCtr++;
if (sleepTime > 0) {