R2D2 API Description: Difference between revisions

From Ultiroam User Docs
Jump to navigation Jump to search
(Created page with "R2D2 API Protocol (GRAP) is used on the socket interface on the top of R2D2 API Daemon. It is used by R2D2 API Programming Languages Interface Modules (R2D2 API BASH Interface Module, R2D2 API C/C++ Interface Module, …). The .h file (gsmrobot.h) enumerating the function prototypes is provided with the robot in the directory /iQsim/GsmRobotD. R2D2 API Daemon is listening TCP port 1176. TCP port can be changed in the R2D2 API Daemon configuration. R2D2 API Script Languag...")
Tag: 2017 source edit
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
R2D2 API Protocol (GRAP) is used on the socket interface on the top of R2D2 API Daemon. It is used by R2D2 API Programming Languages Interface Modules (R2D2 API BASH Interface Module, R2D2 API C/C++ Interface Module, …).
The R2D2 API is built on top the R2D2 API Daemon using TCP/IP socket interface.
The .h file (gsmrobot.h) enumerating the function prototypes is provided with the robot in the directory /iQsim/GsmRobotD.
 
R2D2 API Daemon is listening TCP port 1176. TCP port can be changed in the R2D2 API Daemon configuration. 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.
Access to the API can be through different means:
 
* R2D2 API BASH Interface Module,  
* R2D2 API C/C++ Interface Module,
* Telnet or SSH access,
* Direct TCP/IP interface,
* And via HTTP/HTTPS Interface see [[R2D2 HTTP API|'''R2D2 HTTP API''']] Interface description.
 
The gsmrobot.h file enumerating the function prototypes can be given on request.
 
R2D2 API Daemon is listening on TCP port 1176. The TCP port can be changed in the R2D2 API Daemon configuration.  
 
The R2D2 API Script Language Interface Module connects to the R2D2 API Daemon on this port.  
 
Connection to this TCP port can be accepted only from local host IP address, so R2D2 BASH Script (or any other) Interface Module can run only on the same host as R2D2 API Daemon.
 
Every R2D2 API Protocol message has a header and additional binary data body.
 
The message header has the following format:
{| class="wikitable"
|-
! colspan=3|MESSAGE HEADER
|-
! Field Name !! Length !! Description
|-
|SequenceNumber|| style="text-align:center;"|4|| This field contains a sequence number.
The use of sequence numbers for message correlation allows R2D2 API messages to be exchanged asynchronously.
|-
|BodyLength|| style="text-align:center;"|4|| Length (in bytes) of the additional data in message body.
Length does not include the length of the message Header.
|-
|MessageCode|| style="text-align:center;"|4|| The MessageCode identifies particular 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;
} GRAP_MESSAGE_HEADER;

Latest revision as of 21:38, 8 June 2024

The R2D2 API is built on top the R2D2 API Daemon using TCP/IP socket interface.

Access to the API can be through different means:

  • R2D2 API BASH Interface Module,
  • R2D2 API C/C++ Interface Module,
  • Telnet or SSH access,
  • Direct TCP/IP interface,
  • And via HTTP/HTTPS Interface see R2D2 HTTP API Interface description.

The gsmrobot.h file enumerating the function prototypes can be given on request.

R2D2 API Daemon is listening on TCP port 1176. The TCP port can be changed in the R2D2 API Daemon configuration.

The R2D2 API Script Language Interface Module connects to the R2D2 API Daemon on this port.

Connection to this TCP port can be accepted only from local host IP address, so R2D2 BASH Script (or any other) Interface Module can run only on the same host as R2D2 API Daemon.

Every R2D2 API Protocol message has a header and additional binary data body.

The message header has the following format:

MESSAGE HEADER
Field Name Length Description
SequenceNumber 4 This field contains a sequence number.

The use of sequence numbers for message correlation allows R2D2 API messages to be exchanged asynchronously.

BodyLength 4 Length (in bytes) of the additional data in message body.

Length does not include the length of the message Header.

MessageCode 4 The MessageCode identifies particular 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;
} GRAP_MESSAGE_HEADER;