OpenTP1 Version 7 Programming Guide

[Contents][Index][Back][Next]

3.6.6 Continuous-inquiry-response processing

Messages are transferred between a terminal and a UAP by continuing inquiry-response processing. Continuous inquiry-response processing can be executed by only MHPs for which continuous-inquiry-response type (cont) is specified as the application type.

Organization of this subsection
(1) Outline of continuous-inquiry-response processing
(2) Access to temporary-stored data
(3) Terminating continuous-inquiry-response processing
(4) Processing if an error event occurs due to UAP abnormal termination

(1) Outline of continuous-inquiry-response processing

An MHP executing continuous-inquiry-response processing calls the function dc_mcf_receive(), then receives a message from the terminal. After terminating processing, the MHP returns a response with the function dc_mcf_reply(). To switch to an MHP for continuous processing when a response is returned, specify the application name of the new MHP in the function dc_mcf_reply(). Without the application name specified, the previous MHP is started.

Also, the MHP, handling continuous-inquiry-response processing, can start an application by using the function dc_mcf_execap(). Only immediate start is permitted. In this case, only one MHP with cont specified can be started by executing the function dc_mcf_execap(). The MHP that started the application with cont specified cannot use the function dc_mcf_reply() because the continuous response right has moved from the MHP. Also, the MHP cannot use the function dc_mcf_contend().

The function dc_mcf_send() (a send-only message to a terminal) can be used even during continuous-inquiry-response processing.

(2) Access to temporary-stored data

Temporary-stored data can be used during continuous inquiry-response processing. The temporary-stored data is used as information for transferring processing to the subsequent MHP to be started. Temporary-stored data can be used at a logical terminal. Thus, continuous-inquiry-response processing can be carried out by using one MHP shared by multiple logical terminals.

Allocate an update area and a recovery area as temporary-stored data areas in the shared memory. For each MHP, specify the length of the temporary-stored data storage area in the MCF application definition.

Temporary-stored data can be used only when the continuous-inquiry-response mode is enabled. Temporary-stored data cannot be used in other message communication modes.

(a) Receiving temporary-stored data

Call the function dc_mcf_tempget() [CBLDCMCF('TEMPGET')] to use temporary-stored data from an MHP. The function dc_mcf_tempget() is executed on the assumption that there is (00)16 of the length specified in tempsize of the MCF application attribute definition in the following cases:

If the receive area length specified in the function dc_mcf_tempget() is shorter than the length of temporary-stored data, only the portion of temporary-stored data equivalent to the specified length is received. The excess portion is truncated. If the receive area length specified in the function dc_mcf_tempget() is larger than the temporary-stored data length, only the temporary-stored data is stored in the receive area.

(b) Updating temporary-stored data

To update temporary-stored data, use the function dc_mcf_tempput() [CBLDCMCF('TEMPPUT')]. When the temporary-stored data, area for storing is updated, the data itself is replaced. A value exceeding the value specified in the MCF application definition cannot be set as the length of update area.

Call the function dc_mcf_tempget() before the function dc_mcf_tempput(). Otherwise, the dc_mcf_tempput() returns with an error.

(3) Terminating continuous-inquiry-response processing

Continuous-inquiry-response processing terminates when one of the events shown below is executed. The temporary-stored data storage area which has been used is deleted when continuous-inquiry-response processing terminates.

(4) Processing if an error event occurs due to UAP abnormal termination

If the UAP terminates abnormally during continuous-inquiry-response processing, ERREVT3 is reported. The continuous-inquiry-response processing can be continued by the following:

The figure below shows continuous-inquiry-response processing.

Figure 3-11 Outline of continuous-inquiry-response processing

[Figure]