Fluke Hydra Series II User Manual page 170

Data bucket
Table of Contents

Advertisement

2635A
Users Manual
/*
*
This function checks the Hydra prompt after sending a command to Hydra,
*
to see if an error occurred.
*
*
Possible responses are:
*
"=>(CR)(LF)"
*
"?>(CR)(LF)"
*
"!>(CR)(LF)"
*/
static int checkResponse()
{
char response[129];
asigets_timed(COM2,response,128,-2,TICKS_PER_SECOND*2);
/* check to see if the command worked correctly */
if(strcmp(response,"=>") == 0)
return 0;
if(strcmp(response,"?>") == 0)
fprintf(stderr,"Command Syntax Error!\n");
else
{
if(strcmp(response,"!>") == 0)
}
fprintf(stderr,"\nProgram execution halted due to communications errors\n");
fclose(testdata);
exit(1);
}
4-66
(Command successful)
(Command syntax error)
(Command execution error)
fprintf(stderr,"Command Execution Error!\n");
Figure 4-7. Sample Program (QuickC)(5 of 5)
/* Gets string from Hydra -- asigets_timed
gets characters from the receive buffer,
and strips the (CR)(LF) characters from
the end before placing them in the
"response" buffer */
/* command executed without error */
op53_5f.eps

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

2635a

Table of Contents