OpenTP1 Version 7 Programming Guide

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

2.10.2 SPPs for a communication event

For client/server mode communication using OSI TP, it is necessary to create an SPP that obtains information about the establishment and release of associations. This SPP is referred to as an SPP for a communication event. Once you create a SPP for a communication event, you can receive a communication event notifying you of association release due to an error. By receiving this communication event, you can know when to re-establish the association. In addition, SPP for a communication event can obtain the attribute and status of the association from detailed information contained in the communication event it has received.

When an association is established or released, the XATMI communication service starts the SPP for a communication event by requesting server with a nonresponse RPC. Communication events are reported regardless of whether the local system is the initiating or recipient system.

For details on information received by the SPP for a communication event, see the applicable OpenTP1 Programming Reference manual.

The figure below outlines the SPP for a communication event.

Figure 2-57 Outline of SPP for a communication event

[Figure]

Organization of this subsection
(1) System definitions related to SPP for a communication event
(2) Association establishment for SPP for a communication event
(3) Conditions for reporting association status

(1) System definitions related to SPP for a communication event

Before a SPP for a communication event can receive communication events, its service group name and service name must be specified in the XATMI communication service definition. Communication events that can be received by the SPP vary depending on the operand to which the service group name and service name are assigned as follows:

xat_aso_con_event_svcname operand:
Communication events reporting association establishment

xat_aso_discon_event_svcname operand:
Communication events reporting normal association release

xat_aso_failure_event_svcname operand:
Communication events reporting abnormal association release

If you assign the same service group name and service name to multiple operands, the SPP for a communication event can receive multiple types of communication events.

Assign betran to the server_type operand in the user service definition for the SPP for a communication event.

(2) Association establishment for SPP for a communication event

The SPP for a communication event can invoke a function to establish an association. The function dc_xat_connect() [CBLDCXAT('CONNECT')] is used for this purpose. When this function returns, the SPP for a communication event can receive information about the fact that an association has been normally established.

The function dc_xat_connect() can establish an association only if the local system is the initiating side. In addition, since the function return is not synchronized with the association establishment, the service function that has invoked the function dc_xat_connect() cannot receive the communication event that reports the association establishment.

(3) Conditions for reporting association status

Association establishment is reported in the following cases:

Association release is reported in the following cases: