Pdu component manager

This module implements component management for PDUs.

class PduComponentManager(host, port, authority, max_objects_per_pdu, logger, communication_state_callback, component_state_callback, attributes, poll_rate, power_marshaller_trl)

A component manager for a PDU.

__init__(host, port, authority, max_objects_per_pdu, logger, communication_state_callback, component_state_callback, attributes, poll_rate, power_marshaller_trl)

Initialise a new instance.

Parameters:
  • host (str) – the hostname of the pdu

  • port (int) – port of the pdu

  • authority (str | dict[str, str]) – the snmp authority of the pdu

  • max_objects_per_pdu (int) – max objects per pdu

  • logger (Logger) – logger

  • communication_state_callback (CommunicationStatusCallbackType) – callback to be called when the status of the communications channel between the component manager and its component changes

  • component_state_callback (Callable[..., None]) – callback to be called when the component state changes

  • attributes (Sequence[SNMPAttrInfo]) – pdu attributes

  • poll_rate (float) – how often the pdu polls

  • power_marshaller_trl (Optional[str]) – trl of power marhsaller

schedule_power(attached_device_info, device_trl, command_str, on_off)

Request a power schedule from the marshaller.

Parameters:
  • attached_device_info (str) – details about the attached device.

  • device_trl (str) – trl of this device.

  • command_str (str) – name of the command being called.

  • on_off (str) – args to be called for the command.

Return type:

None

start_communicating()

Establish communication with the station components.

Return type:

None

stop_communicating()

Break off communication with the station components.

Return type:

None