R2D2 API protocol

From IRON Test Suite
Jump to navigation Jump to search

IRON R2D2 API Protocol (GRAP) is used on the socket interface on the top of IRON R2D2 API Daemon. It is used by IRON R2D2 API Programming Languages Interface Modules (IRON R2D2 API BASH Interface Module, IRON TEST MANAGER, IRON R2D2 API C/C++ Interface Module, …). The .h file (gsmrobot.h) with you the function prototypes is provided with the robot in the directory /iQsim/GsmRobotD.

IRON R2D2 API Daemon is listening TCP port 1176. TCP port can be changed in the IRON R2D2 API Daemon configuration. IRON R2D2 API Script Language Interface Module connects to IRON R2D2 API Daemon on this port. IP address and TCP port for this connection on the IRON R2D2 API Script Language Interface Module side can be specified in its configuration. Connection to this TCP port can be accepted only from local host IP address, so IRON R2D2 BASH Script (or any other) Interface Module can run only on the same host as IRON R2D2 API Daemon.

R2D2 protocol.JPG

IRON R2D2 API Script Language Interface Module and IRON R2D2 API Daemon are communicating using IRON R2D2 API Protocol (GRAP), exchanging IRON R2D2 API messages. Protocol is unidirectional; Client (for example IRON R2D2 API Script Language Interface Module) is sending REQUEST messages to the Server (IRON R2D2 API Daemon) that is responding with CONFIRM messages. Every REQUEST message has a Message Number, that is unique inside one protocol session (TCP connection) and it is used in CONFIRM messages to pair REQUEST-CONFIRM.

Every IRON R2D2 API Protocol message has a header and additional binary data body.
IRON R2D2 API Protocol message header has the following format:

Field Name Length Description
SequenceNumber 4 This field contains a sequence number, which allows IRON R2D2 requests and confirms to be associated for correlation purposes. The use of sequence numbers for message correlation allows IRON R2D2 APImessages to be exchanged asynchronously.
BodyLength 4 Length (in bytes) of the additional data in message body. Length does not include the length of Header (SequenceNumber, MessageCode, neither the length of the Length field itself).
MessageCode 4 The MessageCode identifies particular IRON R2D2 API message.

The format of Message Header can be coded as the following C-language structure:

typedef struct {
    ULONG SequenceNumber;
    ULONG BodyLength;
    ULONG MessageCode;

Functions Lists:

Category Network_API not found
Category SIM_API not found
Category SIP_API not found
Category SMS_API not found
Category Supplementary Services_API not found
Category USSD_API not found
Category VoLTE_API not found