Retrieves the next message from the SCCP layer.
DWORD SCCPRetrieveMessage ( CTAHD ctahd, SccpAllMsgs *message, SccpRcvInfoBlk *infoBlk, Bool wait)
Argument |
Description |
ctahd |
Natural Access handle returned by ctaCreateContext. |
message |
Pointer to the address of the caller's message buffer where the received message (if any) is returned to the caller. |
infoBlk |
Pointer to the address of the caller's receive information block where information regarding the received message (if any) is returned to the caller. The structure of the receive information block is as follows: typedef struct rcvInfoBlk Refer to the Details section for more information. |
wait |
Not used. |
Return value |
Description |
SCCP_SUCCESS |
|
SCCPERR_NOMSG |
No event messages waiting. |
CTAERR_BAD_ARGUMENT |
One or more arguments are invalid. |
CTAERR_DRIVER_RECEIVE_FAILED |
Service could not communicate with the device driver. |
CTAERR_INVALID_CTAHD |
Natural Access handle is invalid. |
SCCPRetrieveMessage receives events (messages) from the SCCP layer. Refer to Establishing connections for more information.
When a message is received, SCCPRetrieveMessage copies the event to the caller's event buffer and performs any necessary byte order translations to convert to the host's native byte ordering. Information about the received message is returned to the caller in the infoBlk parameter.
The indication type (indType) identifies the event received and is coded to one of the following values:
0xB8 |
Connect confirm | |
0xB7 |
Connect indication | |
0xBE |
Release indication | |
0xB9 |
Data (DT1 or DT2) indication | |
0xB1 |
Unitdata indication | |
0xBA |
Expedited data indication | |
0xBD |
Data acknowledge indication | |
0xBC |
Connection reset confirm | |
0xBB |
Connection reset indication | |
0xB2 |
Unsolicited status indication | |
0xB3 |
Coordinated out of service (OOS) indication | |
0xB4 |
Coordinated out of service (OOS) confirm | |
0xB5 |
Subsystem state indication | |
0xB6 |
Point code state indication | |
0xBF |
Connection audit confirmation | |
0xE0 |
Connection inactivity indication | |
0xEF |
Run state (primary/backup/standalone) indication |
The evntType field identifies the actual message received for status and connection status indications.
Note: The application must save the service provider instance id (spInstId) field from the first event received from the SCCP layer for each connection and use it in subsequent requests associated with that connection.
The event structure associated with a received message depends on the type of message received from the SCCP layer. Refer to Event reference overview for more information.