Skip to content
Jereme Haack edited this page Sep 12, 2014 · 2 revisions

Messaging

Agents in VOLTTRON Lite communicate with each other using a publish/subscribe mechanism built on the Zero MQ Python library. This allows for great flexibility as topics can be created dynamically and the messages sent can be any format as long as the sender and receiver understand it. An agent with data to share publishes to a topic, then any agents interested in that data subscribe to that topic.

While this flexibility is powerful, it also could also lead to confusion if some standard is not followed. The current conventions for communicating in the VOLTTRON Lite are:

    • Topics and subtopics follow the format: topic/subtopic/subtopic
    • Subscribers can subscribe to any and all levels. Subscriptions to "topic" will include messages for the base topic and all subtopics. Subscriptions to "topic/subtopic1" will only receive messages for that subtopic and any children subtopics. Subscriptions to empty string ("") will receive ALL messages. This is not recommended.
    • All agents should subscribe to the "platform" topic. This is the topic the VOLTTRON Lite will use to send messages to agents, such as "shutdown".

Agents should set the "From" header. This will allow agents to filter on the "To" message sent back. This is especially useful for requests to the ArchiverAgent so agents do not receive replies not meant for their request.

Topics

In VOLTTRON Lite

    • platform - Base topic used by the platform to inform agents of platform events
    • platform/shutdown - General shutdown command. All agents should exit upon receiving this. Message content will be a reason for the shutdown
    • platform/shutdown_agent - This topic will provide a specific agent id. Agents should subscribe to this topic and exit if the id in the message matches their id.

RTU Controller Agent Topics

See the documentation for the ActuatorAgent.

Clone this wiki locally