Issue commands to the server
Once the computer with the client application is connected to the EK80 Processor Unit with the server application (the EK80 program), specific messages are used to issue commands.
Note
In this context the EK80 Processor Unit is regarded as the "server". The EK80 program is the "server application". The program you make yourself for running on a local computer is referred to as the "client application".
Request
A Request message must be sent to the server application (the EK80 program) in order to issue a command on one of the available command targets. This is an example of the main elements of a command request.
struct Request
  {
  char Header[4]; // ”REQ\0”
  char MsgControl[22]; // Sequence no, Current msg no, Total msg no.
  char MsgRequest[1400]; // The format is XML based.
  };
The MsgControl field is formatted as follows: Sequence number, Current message, Total message.
1 The Sequence number increments for each request message sent to the server.
2 The Current message contains the current message in case a request must be split into several UDP messages.
3 The Total message contains the total number of messages the current request consists of.
For example, the contents of the MsgControl is "2,1,3". This means that the current UDP message is the second request message sent from the client to the server, and that the current message is message number 1 of a request that consists of a total of three UDP messages.
The contents of the MsgRequest field depend on the current command target. The format is XML based. It must specify a command target, a method on the command target, and any input parameters relevant for the current method.
This is the general structure.
<request>
  <clientInfo>
    <cid>clientid</cid>
    <rid>requestid</rid>
  </clientInfo>
  <type>invokeMethod</type>
  <targetComponent>xx</targetComponent>
  <method>
    <yy>
      <zz></zz>
    </yy>
  </method>
</request>
•  clientid: This is the client identification.
•  requestid: This is the request identification.
•  xx: This is the name of the current command target.
•  yy: This is the name of the current method.
•  zz: This identifies any parameters of the current method
Response
The server application (the EK80 program) will respond with a Response message.
struct Response
  {
  char Header[4]; // ”RES\0”
  char Request[4]; // ”REQ\0”
  char MsgControl[22]; // Sequence no, Current msg no, Total msg no.
  char MsgRequest[1400]; // XML based response containing result of command request
  };
The MsgControl field is formatted as follows: Sequence number, Current message, Total message.
The contents of the Response message depend on the current command target. The format is XML based. It contains the result, any error messages, and any output parameters relevant for the current method.
This is the general structure.
<response>
  <clientInfo>
    <cid dt="3">clientid</cid>
    <rid dt="3">requestid</rid>
  </clientInfo>
  <fault>
    <detail>
    <errorcode dt="3">0</errorcode>
    </detail>
  </fault>
  <yyResponse>
    <zz dt=”3”></zz>
  </yyResponse>
</response>
•  clientid: This is the client identification.
•  requestid: This is the request identification.
•  error code: This is the result of the operation. (0 = OK)
•  yy: This is the name of the current method.
•  zz: This identifies any parameters of the current method