-
Notifications
You must be signed in to change notification settings - Fork 218
Develop Driver Agent
##Introduction All Voltton drivers are implemented through the Master Driver Agent and are technically sub-agents running in the same process as the Master Driver Agent. Each of these driver sub-agents is responsible for creating an interface to a single device. Creating that interface is facilitated by an instance of an interface class. Currently there are two interface classes included: Modbus and BACnet.
##Existing Drivers In the directory for the Master Driver Agent you'll see a directory called interfaces:
├── master_driver
│ ├── agent.py
│ ├── driver.py
│ ├── __init__.py
│ ├── interfaces
│ │ ├── __init__.py
│ │ ├── bacnet.py
│ │ └── modbus.py
│ └── socket_lock.py
├── master-driver.agent
└── setup.py
The files bacnet.py and modbus.py implement the interface class for each respective protocol. (The BACnet interface is mostly just a pass-though to the BACnet Proxy Agent, but the Modbus interface is self contained.)
Looking at those two files is a good introduction into how they work.
##Interface Basics A complete interface consists of two parts: One or more register classes and the interface class.
###Register Class The Base Interface class uses a Register class to describe the registers of a device to the driver sub-agent. This class is commonly sub-classed to store protocol specific information for the interface class to use. For example, the BACnet interface uses a sub-classed base register to store the instance number, object type, and property name of the point on the device represented by the register class.
The register class contains the following attributes:
- read_only - True or False
- register_type - "bit" or "byte", used by the driver sub-agent to help deduce some meta data about the point.
- point_name - Name of the point on the device. Used by the base interface for reference.
- units - units of the value, meta data for the driver
- description - meta data for the driver
- python_type - python type of the point, used to produce meta data.
- Platform Agent
- VOLTTRON Central Agent
- Platform Commands
- Platform Configuration
- [Platform Hardening Security Recommendations] (Linux-Platform-Hardening-Recommendations-for-VOLTTRON-users)
- ...
- [Building VOLTTRON] (Building-VOLTTRON)
- Example Agents
- Agent Development
- [Shortcut Scripts] (Scripts)
- [VOLTTRON Conventions] (Conventions)
- [sMAP Test Server] (sMAP-Test-Instance)
- [Design Discussions] (Design Discussions)
- VIP
- VIP - VOLTTRON Interconnect Protocol
- RPC by example
- VIP - Known Identities
- VIP - Authentication
- VIP - Authorization
- Protecting Pub/Sub Topics
- Setup Eclipse for VOLTTRON
- Deployment Walkthrough
- Forward Historian Walkthrough
- [Create New Historian Agent] (Developing-Historian-Agents)
- [Create New Driver Agent] (Develop-Driver-Agent)
- [Developing With Eclipse] (Eclipse)
- Migrations
- [2.x to 3.x Migration](2.x-to 3.x-Migration)
- 1.2 to 2.0 Migration
- [Deployment Recommendations](Recommendations for Deployments)
VOLTTRON Versions and Features
Transactional Network Platform Overview
- Established Topics
- Working with the Actuator Agent
- Logging
- [Multi-Node Communication] (MultiBuildingMessaging)
Information Exchange Standards