Defining the topics and commands
We will use the following topic name to publish the commands for a vehicle: vehicles/vehiclename/commands
, where vehiclename
must be replaced with a unique name assigned to a vehicle. For example, if we assign vehiclepi01
as the name for a vehicle that is powered by a Raspberry Pi 3 Model B+ board, we will have to publish commands to the vehicles/vehiclepi01/commands
topic. The Python code that runs on this board will subscribe to this topic to receive messages with commands and react to them.
We will use the following topic name to make the vehicles publish details about the successfully executed commands: vehicles/vehiclename/executedcommands
, where vehiclename
must be replaced with a unique name assigned to a vehicle. For example, if we assign vehiclebeagle03
as the name for a vehicle that is powered by a BeagleBone Black board, the client that wants to receive information about successfully processed commands has to subscribe to the vehicles/vehiclebeagle03...