FTAM/9000 Programmer's Guide
400 Chapter 10
Example Programs
Common Code Example
Return_code res;
Api_rc outcome;
struct Ft_diagnostic *diag = NULL;
/*
** Initialize the parameters with valid values.
*/
*return_event_name = SYNCHRONOUS;
/*
** Initialize the called_ae_name as the DDN identifying the
** responder.
*/
convert_ddn(called_ae_name, LOCAL_RESP);
/*
** Initialize the input_dcb.
*/
res = ft_didcb(FTiConnect, 0, (Octet **)input_dcb, & outcome);
if (res != SUCCESS)
error_handler(outcome, diag);
/*
** Set up the presentation address.
**
** Note: Only the called_ae_dirname OR the called_presentation_address
** is needed. Both are set up for example purposes only.
*/
/* convert_paddr( & ((*input_dcb)-called_presentation_address),
“0102.0102.0102.490003080009011E20FE00” ); */
/*
** Set up the called_ae_title.
*/
/* 6-5-91 MCK:
* Changed to supply AP-title.
*/
(*input_dcb)-called_ae_title_option = User_object_id_option;
(*input_dcb)-called_ae_title = (struct Object_id *)malloc
(sizeof(struct Object_id));
(*input_dcb)-called_ae_title-ae_object_id.length = 5;
(*input_dcb)-called_ae_title-ae_object_id.element = (Sint32 *)malloc
(5*sizeof(Sint32));
(*input_dcb)-called_ae_title-ae_object_id.element[0] = 1;
(*input_dcb)-called_ae_title-ae_object_id.element[1] = 3;
(*input_dcb)-called_ae_title-ae_object_id.element[2] = 9999;
(*input_dcb)-called_ae_title-ae_object_id.element[3] = 1;
(*input_dcb)-called_ae_title-ae_object_id.element[4] = 7;
/*
** Set up the invoke ids.
*/
(*input_dcb)-called_ae_invoke_id = NO_VALUE;
(*input_dcb)-called_ap_invoke_id = NO_VALUE;
/*
** Set up the retry counters and timer.
*/
(*input_dcb)-number_of_retry = 0;
(*input_dcb)-delay_between_retry = 0;
(*input_dcb)-connection_resource_wait_timer = 0;