Agilent Technologies 86100-90086 Sprinkler User Manual


 
2-30
Sample Programs
Listings of the Sample Programs
void write_IO ( void *buffer )
{
unsigned long actualcnt;
unsigned long length;
int send_end = 1;
length = strlen ( buffer );
iwrite ( scope, buffer, length, send_end, &actualcnt );
} /* end write_IO */
/*
* Function name: write_lrnstr
* Parameters: char *buffer which is a pointer to the character string to be
* output; long length which is the length of the string to be output
* Return value: none
* Description: This routine outputs a learnstring to the scope device
* session using the unformatted I/O SICL commands.
*/
void write_lrnstr ( void *buffer, long length )
{
unsigned long actualcnt;
int send_end = 1;
iwrite ( scope, buffer, (unsigned long) length,
send_end, &actualcnt );
} /* end write_lrnstr ( ) */
/*
* Function name: read_IO
* Parameters: char *buffer which is a pointer to the character string to be
* input; unsigned long length which indicates the max length of the string to be input
* Return value: integer which indicates the actual number of bytes read
* Description: This routine inputs strings from the scope device session using SICL commands.
*/
int read_IO (void *buffer,unsigned long length)
{
int reason;
unsigned long actualcnt;
iread (scope,buffer,length,&reason,&actualcnt);
return( (int) actualcnt );
}
/*
* Function name: check_SRQ
* Parameters: none
* Return value: integer indicating if bus SRQ line was asserted
* Description: This routine checks for the status of SRQ on the bus and returns a value to indicate the status.
*/