2.8.1 IrisRpc connection handshake

Clients use the IrisRpc protocol to initiate a connection to an Iris server, for example the IrisTcpServer that is running in the simulation.

The IrisRpc connection handshake allows the client to do the following:

  • Verify that the server it is connecting to is an Iris server.
  • Request a specific IrisRpc version.

It also allows the server to notify the client whether it supports the requested IrisRpc version.

For a TCP connection, it is assumed that the client knows the host IP and port number of the TCP server.

The following procedure is used to establish a connection:

Note:

<CR> and <LF> represent ASCII 13 and 10 respectively.
  • The client connects to the server, for example it connects to the TCP port.
  • The client sends the following request to connect using IrisRpc version 1.0:

    CONNECT / IrisRpc/1.0<CR><LF> 
    Supported-Formats: IrisJson, IrisU64Json, JsonRpcOverHttp<CR><LF> 
    <CR><LF> 
  • The server sends the following response to tell the client that the connection is established, the protocol is IrisRpc/1.0, and a list of supported message formats:

    IrisRpc/1.0 200 OK<CR><LF>
    Supported-Formats: IrisJson, IrisU64Json, JsonRpcOverHttp<CR><LF>
    <CR><LF>
  • After this step, the client and server can send and receive IrisRpc messages.

    At this point, all client instances, but usually just one, should call instanceRegistry_registerInstance() to register themselves in the instance registry. Other instances can then discover them and query their properties and name.

  • The server keeps the connection open until the simulation executable terminates. The client keeps the connection open until it either terminates or it no longer needs the connection to the server.

Note:

Closing the connection implicitly unregisters all client instances that used this connection from the instance registry, destroys all event streams, and unregisters all other callbacks and artefacts.

The start lines and the header fields must be formatted according to RFC 7230, Section 3, HTTP/1.1 Message Format. The client and the server must ignore any header fields they do not understand.

Non-ConfidentialPDF file icon PDF version101196_0100_00_en
Copyright © 2018 Arm Limited or its affiliates. All rights reserved.