Platform Driver Framework

VOLTTRON drivers act as an interface between agents on the platform and a device. Drivers implement a specific set of features for device communication and ensure uniform behaviors across different devices and protocols.

Drivers are managed by the Platform Driver Agent. The Platform Driver instantiates individual drivers and facilitates communication with them. Driver instances are created when a new device configuration is added to the configuration store. Each driver instance uses an Interface class that implements the communication paradigms of a specific device or protocol. For more information regarding the development of driver interfaces, see the driver development page.

Device Communication

Query & Command Methods

In addition to continuous polling, point values can be requested or set ad-hoc via RPC methods exposed by the Platform Driver Agent. RPC methods are available for getting, setting, and reverting data points as well as for the management of reservations and polling.

  • To get, set, or release the current values of one or more points, the user agent should send an RPC call to the get, set, or revert methods, respectively, of the Platform Driver. Queries can be made by providing one or more topics. Any segment of these topics may be replaced with wildcards. Results may additionally be filtered using regular expressions. After the Platform Driver processes the request, the data is returned directly to the requestor.

../../_images/modbus_get_flow.svg
  • Last known values may be retrieved without making a new request to the equipment using the last method.

../../_images/last_data_flow.svg
  • If there is a possibility of conflicting commands being given to devices, it is recommended to first reserve the device. Reservations allow a single agent exclusive control of the device for the duration of a scheduled period. During that time, only the reserving agent may send requests which would alter the value of points. Agents without a reservation, however, will continue to have read access to the device throughout the reservation period. Reservations are managed with the request_new_schedule and request_cancel_schedule methods.

Installing the Fake Driver

The Fake Driver is included as a way to quickly see data published to the message bus in a format that mimics what a real driver would produce. This is a simple implementation of the VOLTTRON driver framework.

See instructions for installing the fake driver

To view data being published from the fake driver on the message bus, one can install the Listener Agent and read the VOLTTRON log file:

cd <root volttron directory>
tail -f volttron.log