platform_driver.agent module

exception platform_driver.agent.OverrideError[source]

Bases: platform_driver.interfaces.DriverInterfaceError

Error raised when the user tries to set/revert point when global override is set.

class platform_driver.agent.PlatformDriverAgent(driver_config_list, scalability_test=False, scalability_test_iterations=3, driver_scrape_interval=0.02, group_offset_interval=0.0, max_open_sockets=None, max_concurrent_publishes=10000, system_socket_limit=None, publish_depth_first_all=True, publish_breadth_first_all=False, publish_depth_first=False, publish_breadth_first=False, **kwargs)[source]

Bases: volttron.platform.vip.agent.Agent

clear_overrides()[source]

RPC method

Clear all overrides.

configure_main(config_name, action, contents)[source]
derive_device_topic(config_name)[source]
forward_bacnet_cov_value(source_address, point_name, point_values)[source]

Called by the BACnet Proxy to pass the COV value to the driver agent for publishing :param source_address: path of the device used for publish topic :param point_name: name of the point in the COV notification :param point_values: dictionary of updated values sent by the device

get_multiple_points(path, point_names, **kwargs)[source]
get_override_devices()[source]

RPC method

Get a list of all the devices with override condition.

get_override_patterns()[source]

RPC method

Get a list of all the override patterns.

get_point(path, point_name, **kwargs)[source]

RPC method

Return value of specified device set point :param path: device path :type path: str :param point_name: set point :type point_name: str :param kwargs: additional arguments for the device :type kwargs: arguments pointer

heart_beat()[source]

RPC method

Sends heartbeat to all devices

remove_driver(config_name, action, contents)[source]
revert_device(path, **kwargs)[source]

RPC method

Revert all the set point values of the device to default state/values. If global override is condition is set, raise OverrideError exception. :param path: device path :type path: str :param kwargs: additional arguments for the device :type kwargs: arguments pointer

revert_point(path, point_name, **kwargs)[source]

RPC method

Revert the set point to default state/value. If global override is condition is set, raise OverrideError exception. :param path: device path :type path: str :param point_name: set point to revert :type point_name: str :param kwargs: additional arguments for the device :type kwargs: arguments pointer

scrape_all(path)[source]
scrape_ending(topic)[source]
scrape_starting(topic)[source]
set_multiple_points(path, point_names_values, **kwargs)[source]

RPC method

Set values on multiple set points at once. If global override is condition is set,raise OverrideError exception. :param path: device path :type path: str :param point_names_values: list of points and corresponding values :type point_names_values: list of tuples :param kwargs: additional arguments for the device :type kwargs: arguments pointer

set_override_off(pattern)[source]

RPC method

Turn off override condition on all the devices matching the pattern. The pattern matching is based on bash style filename matching semantics. :param pattern: Pattern on which override condition has to be removed. :type pattern: str

set_override_on(pattern, duration=0.0, failsafe_revert=True, staggered_revert=False)[source]

RPC method

Turn on override condition on all the devices matching the pattern. :param pattern: Override pattern to be applied. For example,

If pattern is campus/building1/* - Override condition is applied for all the devices under campus/building1/. If pattern is campus/building1/ahu1 - Override condition is applied for only campus/building1/ahu1 The pattern matching is based on bash style filename matching semantics.

Parameters

duration – Time duration for the override in seconds. If duration <= 0.0, it implies as indefinite

duration. :type duration: float :param failsafe_revert: Flag to indicate if all the devices falling under the override condition has to be set

to its default state/value immediately.

Parameters

staggered_revert (boolean) – If this flag is set, reverting of devices will be staggered.

set_point(path, point_name, value, **kwargs)[source]

RPC method

Set value on specified device set point. If global override is condition is set, raise OverrideError exception. :param path: device path :type path: str :param point_name: set point :type point_name: str :param value: value to set :type value: int/float/bool :param kwargs: additional arguments for the device :type kwargs: arguments pointer

stop_driver(device_topic)[source]
update_driver(config_name, action, contents)[source]
platform_driver.agent.main(argv=['/home/docs/checkouts/readthedocs.org/user_builds/volttron/envs/releases-8.1/lib/python3.6/site-packages/sphinx/__main__.py', '-T', '-E', '-b', 'html', '-d', '_build/doctrees', '-D', 'language=en', '.', '_build/html'])[source]

Main method called to start the agent.

platform_driver.agent.platform_driver_agent(config_path, **kwargs)[source]