Skip to content

MCU Selection


The robot selection query (switch MCU, using the 4-byte code sMCU) is used by the client to inform the server which mcu it wants to control. For this, the query uses a single additional information field, [MCU_UNIQUE_NAME], containing the unique identifier the mcu used at server login. The query structure will be:

!s-sMCU-[MCU_UNIQUE_NAME]-e!

On a successful request, the server will return a positive control query. While if there's an error, the server will return one of the following error codes:

  • _NACK_InvalidQuery (uint8_t c=255) → If the query format is invalid: contains null-bytes, invalid header or tail sequences, or the query function code is not recognized.
  • _NACK_NoActiveMCU (uint8_t c=254) → If the variable [MCU_UNIQUE_NAME] is empty (!s-sMCU--e!), or if the given [MCU_UNIQUE_NAME] identifier does not exist on the server database.

As such, the communication schema for this query type will look like the one illustrated on the following diagram.

MCU Selection comm schema MCU Selection comm schema
Diagram for a successful and failed mcu selection query