Subrack Component Manager
This module implements component management for subracks.
- class SubrackComponentManager(subrack_ip, subrack_port, logger, communication_state_changed_callback, component_state_changed_callback, update_rate=5.0, _driver=None, _initial_power_state=ska_control_model.PowerState.ON, _initial_fail=False)
A component manager for an subrack (simulator or driver) and its power supply.
- __init__(subrack_ip, subrack_port, logger, communication_state_changed_callback, component_state_changed_callback, update_rate=5.0, _driver=None, _initial_power_state=ska_control_model.PowerState.ON, _initial_fail=False)
Initialise a new instance.
- Parameters:
subrack_ip (
str
) – the IP address of the subracksubrack_port (
int
) – the subrack portlogger (
Logger
) – a logger for this object to usecommunication_state_changed_callback (
Callable
[[CommunicationStatus
],None
]) – callback to be called when the status of the communications channel between the component manager and its component changescomponent_state_changed_callback (
Callable
[...
,None
]) – callback to be called when the component state changesupdate_rate (
float
) – how often updates to attribute values should be provided. This is not necessarily the same as the rate at which the instrument is polled. For example, the instrument may be polled every 0.1 seconds, thus ensuring that any invoked commands or writes will be executed promptly. However, if the update_rate is 5.0, then routine reads of instrument values will only occur every 50th poll (i.e. every 5 seconds)._driver (
Optional
[SubrackDriver
]) – for testing only, we can inject a driver rather then letting the component manager create its own. If provided, this overrides driver-specific arguments such as the IP and port._initial_power_state (
PowerState
) – for testing only, we can set the initial power state of the simulated subrack power supply. If not provided, the default is ON, since all our current facilities with a real hardware subrack do not yet allow it to be powered on and off._initial_fail (
bool
) – for testing only, we can set the simulated subrack power supply to fail.
- set_power_supply_fan_speed(fan_number, speed, task_callback=None)
Set the target speed of a power supply fan.
- Parameters:
- Return type:
- Returns:
the task status and a human-readable status message
- set_subrack_fan_mode(fan_number, mode, task_callback=None)
Set the target speed mode of a subrack fan.
- Parameters:
- Return type:
- Returns:
the task status and a human-readable status message
- set_subrack_fan_speed(fan_number, speed, task_callback=None)
Set the target speed of a subrack fan.
- Parameters:
- Return type:
- Returns:
the task status and a human-readable status message
- turn_off_tpm(tpm_number, task_callback=None)
Turn a TPM off.
- turn_off_tpms(task_callback=None)
Turn all TPMs off.
- turn_on_tpm(tpm_number, task_callback=None)
Turn a TPM on.