X25AM Programming Manual

PTP Applications
X25AM Programming Manual527201-001
3-78
Text of C Example
/*
*------------------------------------------------------------------
* Step 2: Based upon user's choice to CALL or WAIT:
*------------------------------------------------------------------
*/
if( strncmp( term_buffs, CALL_OP, 4 ) == 0 )
{
/*
*--------------------------------------------------------------
* CALL TO REMOTE
* --------------
* Place a call to the remote subdevice.
*--------------------------------------------------------------
*/
if( CONTROL( comm_file, 17 ) != CCE )
{
/*
*----------------------------------------------------------
* Check condition code for errors. If an error occurs,
* report the error condition and flag the failure.
*----------------------------------------------------------
*/
FILEINFO( comm_file, &error );
ReportCommError( error );
call_sent_flag = FALSE;
}
else
{
/*
*----------------------------------------------------------
* If no error occurs, set the “call sent” flag, then wait
* for the call to complete, and check for errors.
*----------------------------------------------------------
*/
call_sent_flag = TRUE;
if( AWAITIO( &comm_file,,,, -1L ) != CCE )
{
FILEINFO( comm_file, &error );
ReportCommError( error );