| 40 | length - ubyte = the length of the response |
| 41 | identifier - ubyte = matches the identifier of the command sent by the client |
| 42 | result - ubyte = can have the following values: |
| 43 | - 0x00 = success |
| 44 | - 0xff = failure |
| 45 | - 0x01 = not implemented |
| 46 | description - string = some commands also offer a description of the result |
| 47 | }}} |
| 48 | |
| 49 | Most commands also return some values. These values are packed in a separate response that follows the acknowledge message. The general form of such a response is the following: |
| 50 | {{{ |
| 51 | +-----------------+---------------------+---------+ |
| 52 | | length (1 byte) | identifier (1 byte) | content | |
| 53 | +-----------------+---------------------+---------+ |
| 54 | |
| 55 | length - ubyte = length of the response |
| 56 | identifier - ubyte = identifier of the response (usually associated with the identifier of the command) |
| 57 | content = response body, contains the requested information |
| 58 | }}} |
| 59 | |
| 60 | Stopping the simulation: |
| 61 | {{{ |
| 62 | +---------------+-------------------+ |
| 63 | | 0x02 (length) | 0x7f (identifier) | |
| 64 | +---------------+-------------------+ |
| 65 | |
| 66 | closes the simulation and replies with an acknowledge message |
| 67 | }}} |
| 68 | |
| 69 | Retrieving information about lanes |
| 70 | {{{ |
| 71 | +--------+-------------------+------------------+------------------+ |
| 72 | | length | 0xa3 (identifier) | variable (ubyte) | lane ID (string) | |
| 73 | +--------+-------------------+------------------+------------------+ |
| 74 | |
| 75 | lane ID = the id of the lane |
| 76 | variable = the value to be retrived for the lane |
| 77 | - 0x00 = list of all lane ID's (sent ID is ignored) (string*) |
| 78 | - 0x31 = edge id (string) |
| 79 | |
| 80 | the response has the form |
| 81 | +--------+-------------------+------------------+------------------+---------------------+--------------+ |
| 82 | | length | 0xb3 (identifier) | variable (ubyte) | lane ID (string) | return type (ubyte) | return value | |
| 83 | +--------+-------------------+------------------+------------------+---------------------+--------------+ |
| 84 | |
| 85 | variable = matches the sent value |
| 86 | lane ID = matches the sent value |
| 87 | return type = the identifier of the return type |
| 88 | return value = value that corresponds to the return type |
| 89 | }}} |
| 90 | |
| 91 | |
| 92 | |