EasyManuals Logo

Fluke Hydra Series II User Manual

Fluke Hydra Series II
268 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #170 background imageLoading...
Page #170 background image
2635A
Users Manual
4-66
/*
* This function checks the Hydra prompt after sending a command to Hydra,
* to see if an error occurred.
*
* Possible responses are:
* "=>(CR)(LF)" (Command successful)
* "?>(CR)(LF)" (Command syntax error)
* "!>(CR)(LF)" (Command execution error)
*/
static int checkResponse()
{
char response[129];
/* 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 */
asigets_timed(COM2,response,128,-2,TICKS_PER_SECOND*2);
/* check to see if the command worked correctly */
if(strcmp(response,"=>") == 0)
return 0; /* command executed without error */
if(strcmp(response,"?>") == 0)
fprintf(stderr,"Command Syntax Error!\n");
else
{
if(strcmp(response,"!>") == 0)
fprintf(stderr,"Command Execution Error!\n");
}
fprintf(stderr,"\nProgram execution halted due to communications errors\n");
fclose(testdata);
exit(1);
}
op53_5f.eps
Figure 4-7. Sample Program (QuickC)(5 of 5)

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Fluke Hydra Series II and is the answer not in the manual?

Fluke Hydra Series II Specifications

General IconGeneral
BrandFluke
ModelHydra Series II
CategoryTest Equipment
LanguageEnglish

Related product manuals