Search code examples
volttron

Can we send Files via message bus to another agent


I am trying to send a file from a Volttron Agent to an Agent running outside volttron(StandAlone). So far I am able to connect the Volttron Agent to Standalone agent.

but Is it possible to send a file. ( A simulation model file) via the message bus or thru any other mechanism?


Solution

  • You can send a file through the message bus using a base64 encoded string. This is not the most efficient way, but it is the easiest. You should be able to do this by exposing an rpc method or subscribing to a known topic.

    The other way is to use the channel subsystem (only available via zmq). This provides low level access to a zmq socket. You can send bytes across the wire between agents.