platform_driver.interfaces.dnp3 module

class platform_driver.interfaces.dnp3.DNP3Register(read_only, volttron_name, dnp3_name, scaling, units, data_type)[source]

Bases: platform_driver.interfaces.BaseRegister

Register for each DNP3 interface field (point).

is_stale()[source]

Whether it is time to refresh the register’s cached value.

set_value(x)[source]

Cast the point value to the correct data type, set the register value, update the cache timestamp.

property value
class platform_driver.interfaces.dnp3.Interface(**kwargs)[source]

Bases: platform_driver.interfaces.BasicRevert, platform_driver.interfaces.BaseInterface

DNP3 device driver interface.

This driver gets, and sends, DNP3 device data by issuing RPC calls to DNP3Agent, (see its source code in services/core/DNP3Agent), which communicates with the DNP3 master via a web interface.

Test drivers for the DNP3 interface can be configured as follows:

export VOLTTRON_ROOT=<your VOLTTRON install directory> export DRIVER_ROOT=$VOLTTRON_ROOT/services/core/PlatformDriverAgent cd $VOLTTRON_ROOT volttron-ctl config store platform.driver dnp3.csv $DRIVER_ROOT/example_configurations/dnp3.csv –csv volttron-ctl config store platform.driver devices/dnp3 $DRIVER_ROOT/example_configurations/test_dnp3.config

all_registers()[source]

Return a list of all registers. The read-only registers are placed before the read-write registers.

call_agent_config_points()[source]

Issue a DNP3Agent RPC call to initialize the driver’s point configuration.

The point_map dictionary maps VOLTTRON point name to DNP3 point name for each point that’s configured by the driver:

{

volttron_point_name_1: dnp3_point_name_1, volttron_point_name_2: dnp3_point_name_2, …

}

call_agent_rpc(rpc_name, point_name=None, value=None)[source]

Issue a DNP3Agent RPC call (get_point, get_points, or set_point), and return the result.

configure(config_dict, registry_config)[source]

Load driver config from the registry, as set up in the VOLTTRON config store.

get_point(point_name, **kwargs)[source]

Get a point value by (VOLTTRON) point name.

Fetch it from the DNP3Agent if it’s not already fresh in the cache.

get_register_value(point_name)[source]