Agilent Technologies E4406A VSA Satellite Radio User Manual


 
Chapter 3 161
Programming Examples
Using C Programming Over Socket LAN
* +0,"No error"
* Dont bother decoding.
******************************************************************/
if (strncmp(result_str, "+0,", 3) == 0) {
/* Matched +0,"No error" */
break;
}
puts(result_str);
} while (1);
}
/***************************************************************************
*
> $Function: isQuery$
*
* $Description: Test current SCPI command to see if it a query. $
*
* $Return: (unsigned char) . . . non-zero if command is a query. 0 if not.
*
***************************************************************************/
unsigned char isQuery( char* cmd )
{
unsigned char q = 0 ;
char *query ;
/*********************************************************/
/* if the command has a ? in it, use queryInstrument. */
/* otherwise, simply send the command. */
/* Actually, we must a little more specific so that */
/* marker value queries are treated as commands. */
/* Example: SENS:FREQ:CENT (CALC1:MARK1:X?) */
/*********************************************************/
if ( (query = strchr(cmd,?)) != NULL)
{