OSI/MHS P7 Application Programmatic Interface (P7 API) Manual

Planning and Writing Your Application
OSI/MHS P7 Application Programmatic Interface (P7 API) Manual424825-001
2-4
Developing a Program Structure
During execution of the client application, the LOS_OPEN_ procedure returns two file
numbers to the client application: one, called the send file, is used for sending data to
OSI/MHS the other, called the result file, is used for retrieving data. The
LOS_DT_SEND_ procedure uses these file numbers to perform input and output of the
P7 administration, submission, and retrieval operations.
Because all I/O operations on the send and result files are nowait operations, you must
call the Guardian AWAITIOX procedure to check for completion. After completion is
Table 2-1. Sequence of P7 API Procedure Calls
Step Action to Take Procedure(s) to Call
1 Initialize P7 API memory space. LOS_INITIALIZE_
2 Open a P7 API session. LOS_OPEN_
3 Bind to an MS group by using the following
three steps:
1. Send an MSBIND argument, then wait for
completion on the send file.
LOS_DT_SEND_ ,
AWAITIOX
2. Check for completion on the send file,
then wait for completion on the result file.
LOS_DT_FINISH_
SEND_ , AWAITIOX
3. Retrieve the MSBIND result or error. LOS_DT_FINISH_
RESULT_4
4 Send P7 submission and retrieval requests
using the following three steps:
1. Send P7 submission and retrieval
arguments.
LOS_DT_SEND_
2. Wait for completion on the send file. AWAITIOX
3. Check for completion on the send file. LOS_DT_FINISH_
SEND_
5 Retrieve P7 submission and retrieval results
and errors using the following two steps
1. Wait for completion on the result file. AWAITIOX
2. Retrieve the P7 submission or retrieval
result or error.
LOS_DT_FINISH_
RESULT_
6 Unbind from the MS group by using the
following three steps:
1. Send an MSUNBIND argument, then wait
for completion on the send file.
LOS_DT_SEND_ ,
AWAITIOX
2. Check for completion on the send file,
then wait for completion on the result file.
LOS_DT_FINISH_
SEND_ , AWAITIOX
3. Retrieve the MSUNBIND result or error. LOS_DT_FINISH_
RESULT_
7 Close the session. LOS_CLOSE_