OSI/AS Programming Manual
Example 2: Presentation Layer and ACSE
Sample Programs
E–82 056783 Tandem Computers Incorporated
proc_name = "APS_DISCARD_";
break;
case error_event_proc:
proc_name = "APS_EVENT_RECEIVE_";
break;
case error_releasereq_proc:
proc_name = "APS_ASSOC_RELEASEREQ_";
break;
}; /* case error_proc */
printf(
"%s status: %d, event: %d, err: %d, errSub: %d, svcId: %d\n"
, proc_name, status, event_code
, error_code, error_subcode, service_id
);
/* */
/* A real application would take appropriate action. */
/* */
DEBUG();
} /* proc display_aps_status */
#pragma PAGE
/*--------------------------------------------------------*/
/* */
/* retrieve user data from the API. */
/* */
/*--------------------------------------------------------*/
void retrieve_user_data ()
{
/* */
/* user_data is large enough to hold all of the data. */
/* Real applications might call this procedure several */
/* times using next_position and more_data. */
/* */
start_position = 0; /* start at the beginning */
error = APS_DATA_GETPARAM_( cepi
, sizeof( user_data )
, (int *) &user_data
, &more_data
, &next_position
, start_position
);
if ( error != ZAPS_ERR_OK &&
error != ZAPS_ERR_NO_DATA )
display_aps_error( error_data_getparam_proc );
} /* proc retrieve_user_data */