OpenTP1 Version 7 Programming Reference C Language

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

Formats of receive communication events

This section explains the formats of the communication events indicating association statuses. Before receiving a communication event, specify the service group name and service name of an SPP for a communication event in the XATMI communication service definition. At this time, a receivable communication event depends on in which operands the service group name and the service name are specified.

xat_aso_con_event_svcname operand:
Communication event for a report of association establishment

xat_aso_discon_event_svcname operand:
Communication event for normal association releasing

xat_aso_failure_event_svcname operand:
Communication event for abnormal association releasing

If the same service group name and service name are specified in more than one operand, one SPP for a communication event can receive more than one communication event.

A communication event is reported as a structure. The structure of a communication event is defined in the header file <dcxat.h>. For a communication event processing SPP, include <dcxat.h> using #include.

struct dc_xat_event_type {
     int     event_code;      ... Communication event identification code
     char    aso_name[9];     ... Association name
     char    reserve1[3];     ... Reserved area 1
     int     aso_initiative;  ... Type of association initiating and recipient
     DCULONG reason_code;     ... Reason code
     char    xatc_svcname[9]; ... XATMI communication service name
     char    reserve2[63];    ... Reserved area 2
};

Contents of arguments

event_code

event_code contains the code identifying a communication event. The number in parentheses indicates the decimal number for an applicable code.

DCXAT_ASO_CONNECT (00000001):
Association establishment

DCXAT_ASO_DISCONNECT (00000002):
Normal association releasing

DCXAT_ASO_FAILURE (00000003):
Abnormal association releasing

aso_name

aso_name contains the name of the association whose status is reported by a communication event.

reserve1

Reserved area.

aso_initiative

aso_initiative contains the value indicating whether the local system is initiating or recipient through the established association. The number in parentheses indicates the decimal number for an applicable code.

DCXAT_ASO_INIT (00000001):
The local system is initiating side.

DCXAT_ASO_RESP (00000002):
The local system is recipient side.

reason_code

reason_code contains a reason code if an association is released. The number in parentheses indicates the decimal number for an applicable code.

For the normal releasing of an association, reason_code contains one of the following values:

DCXAT_RSN_COMMAND (00000001):
Releasing of an association by executing a command.

DCXAT_RSN_XATMI (00000005):
Releasing of an association by the XATMI

DCXAT_RSN_REMOTE (00000007):
Normal releasing of an association from the remote system

DCXAT_RSN_TP_NORMAL (00000008):
Normal releasing of an association by the TP layer.

For the abnormal releasing of an association, reason_code contains one of the following values:

DCXAT_RSN_COMMAND (00000001):
Forced releasing of an association by executing a command

DCXAT_RSN_LOWER (00000003):
Failure in a lower layer (such as a line failure and communication management failure)

DCXAT_RSN_XATMI (00000005):
Forced releasing of an association by an XATMI communication service

DCXAT_RSN_FAILURE (00000006):
Failure in association establishment

DCXAT_RSN_REMOTE (00000007):
Forced releasing of an association from the remote system

xatc_svcname

xatc_svcname contains an XATMI communication service name.

reserve2

Reserved area.