OSI/FTAM Programming Guide
Using FTM Procedure Calls
HP NonStop OSI/FTAM Programming Guide—528612-001
4-6
Procedure-Call Sequence
These steps explain the sequence of procedure calls given in Table 4-3. If your
application has not already done so, you must first call APS_INITIALIZE_ (see
Initializing the API on page 4-4.)
1. To request an association to a remote responder, call FTM_INITIALIZE_REQ_,
giving details about the association you wish to establish (for information on the
parameters of this procedure, see the following subsection).
a. If the procedure succeeds, it returns a status code of ZAPS-VAL-STATUS-OK,
and the FTAM API allocates a CEPI. If the procedure fails, a different status
code and a CEPI of -1 are returned. To obtain the details of an error at this
stage, call APS_STATUS_, specifying as input the CEPI returned by the
FTM_INITIALIZE_REQ_ procedure for this association.
b. If the association is in nowait mode, call MFM_AWAITIOX_ to wait for
completion of the FTM_INITIALIZE_REQ_ call. MFM_AWAITIOX_ gives you
the status code for the completed procedure call. For more information on the
MFM_AWAITIOX_ procedure, refer to the OSI/FTAM Programming Reference
Manual.
c. If you call MFM_AWAITIOX_ and the status code returned is not
ZAPS-VAL-STATUS-OK, call APS_STATUS_, specifying as input the CEPI
returned by the FTM_INITIALIZE_REQ_ procedure for this association.
2. Next, to receive an initialize confirm event, call APS_EVENT_RECEIVE_. In wait
mode, this procedure returns a status code of ZAPS-VAL-STATUS-EVENT when
you have received an event. If APS_EVENT_RECEIVE_ returns a different status
Table 4-3. Calls for Establishing an Association
Step Action to Take Procedure(s) to Call
Initialize the API (before first association). APS_INITIALIZE_
1 Connect the initiator with the remote responder
specified.
FTM_INITIALIZE_REQ_
a. If error returned by FTM_INITIALIZE_REQ_,
check status.
APS_STATUS_
b. If nowait mode, await completion of
FTM_INITIALIZE_REQ_.
MFM_AWAITIOX_
c. If error returned by MFM_AWAITIOX_, check
status.
APS_STATUS_
2 Get the next event. APS_EVENT_RECEIVE_
a. If nowait mode, await completion of
APS_EVENT_RECEIVE_.
MFM_AWAITIOX_
3 Check status: Is the event an initialize confirm? Or, if
APS_EVENT_RECEIVE_ returns a status other than
ZAPS-VAL-STATUS-EVENT, is there an error?
APS_STATUS_
4 Retrieve service confirm information. FTM_INITIALIZE_CNF_