Robotrain features are split into modules that each can be used independently. All put together form the full-fledged Robotrain, but removing one won't render the others useles. So it's kind of an microservices architecture.
The common communication protocol between those modules is MQTT. Additional peer-to-peer connections on different protocols are possible, but the have to be announced and negotiated via MQTT.
You need to set up a MQTT broker that serves as the central communication hub. robotrain comes with an out-of-the-box broker that you'll find in common-infrastructure/mqtt-broker.
You also need to configure each module to use the broker. You'll find the respective config keys in each module's
config.template.*
file.
MQTT organizes communication in cascaded topics.
The root topic is robotrain
.
Modules can publish to or receive information from topics under their module root topic robotrain/module-name
.
It's up to the module to structure data below it's root topic.
For receiving data, it depends on the use case if a module is subscribing a topic under it's own name to which others can publish information or if it subscribes to another module's topic.