vcplatform.vcconnection module¶
-
class
vcplatform.vcconnection.
VCConnection
(**kwargs)[source]¶ Bases:
volttron.platform.vip.agent.Agent
This agent will connect to an instance with volttron.central agent connected to it. The volttron.central agent will use this agent to communicate with the platform.agent(vcp) running on the current instance of the platform.
-
agent_status
(agent_uuid)[source]¶ Retrieves the status of a particular agent executing on the vcp instance. The agent does not have to be executing in order to receive it’s status.
- Parameters
agent_uuid –
- Returns
-
delete_agent_config
(agent_identity, config_name)[source]¶ Deletes the configuration from the config store of the passed agent identity.
- Parameters
agent_identity –
config_name –
- Returns
The stored configuration.
-
get_agent_config
(agent_identity, config_name, raw=True)[source]¶ Retrieve the configuration from the config store of the passed agent identity.
- Parameters
agent_identity –
config_name –
raw –
- Returns
The stored configuration.
-
get_devices
()[source]¶ Retrieves configuration entries from the config store that begin with ‘devices’.
- Returns
dictionary of devices.
-
get_vip_addresses
()[source]¶ Retrieves the vip addresses that were specified in the configuration file or via command line.
- Returns
-
list_agent_configs
(agent_identity)[source]¶ List the agent configuration files stored on the volttron instance associated with this agent.
- Parameters
agent_identity – Agent identity to retrieve configuration from.
- Returns
A list of the configuration names.
-
list_agents
()[source]¶ Calls list_agents method on the vcp main agent instance.
Note
This method only valid for installed agents not dynamic agents.
- Returns
-
publish_to_vc
(topic, message=None, headers={})[source]¶ This method allows the main_agent to publish a message up to the volttron.central instance.
- Parameters
topic –
message –
headers –
-
restart
(agent_uuid)[source]¶ Performs the stop and start operations on the vcp instance for an agent.
- Parameters
agent_uuid –
- Returns
-
restart_agent
(agent_uuid)[source]¶ Calls restart method on the vcp main agent instance.
Note
This method only valid for installed agents not dynamic agents.
- Parameters
agent_uuid –
- Returns
-
route_to_agent_method
(id, agent_method, params)[source]¶ Calls a method on an installed agent running on the platform.
Note
This method only valid for installed agents not dynamic agents.
- Parameters
id –
agent_method –
params –
- Returns
-
set_main_agent
(main_agent)[source]¶ The main agent is the VCP that is using this agent to connect to the remote volttron instance.
- Parameters
main_agent – the agent that instantiated this one.
-
start_agent
(agent_uuid)[source]¶ Start an agent that is already present on the vcp instance.
- Parameters
agent_uuid –
- Returns
-
start_bacnet_scan
(iam_topic, proxy_identity, low_device_id=None, high_device_id=None, target_address=None, scan_length=5)[source]¶ Starts a bacnet scan using the the named proxy_identity as the callee.
- Parameters
iam_topic –
proxy_identity –
low_device_id –
high_device_id –
target_address –
scan_length –
- Returns
-
stop_agent
(agent_uuid)[source]¶ Stop an agent already running on the vcp instance.
- Parameters
agent_uuid –
- Returns
-