Subrack Device
This module provides a Tango device for a PSI-Low subrack.
- class MccsSubrack(*args, **kwargs)
A Tango device for monitor and control of the PSI-Low subrack.
- class InitCommand(*args, **kwargs)
Initialisation command class for this base device.
- PowerDownTpms()
Power down all TPMs.
- PowerOffTpm(argin)
Power down a TPM.
- PowerOnTpm(argin)
Power up a TPM.
- PowerUpTpms()
Power up all TPMs.
- SetPowerSupplyFanSpeed(argin)
Set the selected power supply fan speed.
- Parameters:
argin (
str
) –json dictionary with mandatory keywords
power_supply_id (int) power supply id from 1 to 2
speed_percent - (float) fan speed in percent
- Return type:
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- SetSubrackFanMode(argin)
Set the selected subrack backplane fan mode.
- Parameters:
argin (
str
) –json dictionary with mandatory keywords
fan_id (int) fan id from 1 to 4
mode - (int) mode: 1=MANUAL, 2=AUTO
- Return type:
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- SetSubrackFanSpeed(argin)
Set the selected subrack backplane fan speed.
- Parameters:
argin (
str
) –json dictionary with mandatory keywords
subrack_fan_id (int) fan id from 1 to 4
speed_percent - (float) fan speed in percent
- Return type:
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- __init__(*args, **kwargs)
Initialise this device object.
- backplaneTemperatures()
Handle a Tango attribute read of the subrack backplane temperature.
Two values are returned, respectively for the first (bays 1-4) and second (bays 5-8) halves of the backplane.
- boardCurrent()
Handle a Tango attribute read of subrack management board current.
Total current provided by the two power supplies.
- boardTemperatures()
Handle a Tango attribute read of the subrack board temperature.
Two values are returned.
- create_component_manager()
Create and return a component manager for this device.
- Return type:
- Returns:
a component manager for this device.
- healthModelParams(argin)
Set the params for health transition rules.
- init_device()
Initialise the device.
This is overridden here to change the Tango serialisation model.
- Return type:
- powerSupplyCurrents()
Handle a Tango attribute read of the power supply currents.
- powerSupplyFanSpeeds()
Handle a Tango attribute read of the power supply fan speeds.
Values expressed in percent of maximum.
- powerSupplyPowers()
Handle a Tango attribute read of the power supply powers.
- powerSupplyVoltages()
Handle a Tango attribute read of the power supply voltages.
- subrackFanModes()
Handle a Tango attribute read of the subrack fan modes.
- subrackFanSpeeds()
Handle a Tango attribute read of the subrack fan speeds, in RPM.
- subrackFanSpeedsPercent()
Handle a Tango attribute read of the subrack fan speeds, in percent.
This is the commanded setpoint; the relation between this level and the actual RPMs is not linear. Subrack speed is managed automatically by the controller, by default (see subrack_fan_mode).
Commanded speed is the same for fans 1-2 and 3-4.
- tpm1PowerState()
Handle a Tango attribute read of the power state of TPM 1.
- Return type:
- Returns:
the power state of TPM 1.
- tpm2PowerState()
Handle a Tango attribute read of the power state of TPM 2.
- Return type:
- Returns:
the power state of TPM 2.
- tpm3PowerState()
Handle a Tango attribute read of the power state of TPM 3.
- Return type:
- Returns:
the power state of TPM 3.
- tpm4PowerState()
Handle a Tango attribute read of the power state of TPM 4.
- Return type:
- Returns:
the power state of TPM 4.
- tpm5PowerState()
Handle a Tango attribute read of the power state of TPM 5.
- Return type:
- Returns:
the power state of TPM 5.
- tpm6PowerState()
Handle a Tango attribute read of the power state of TPM 6.
- Return type:
- Returns:
the power state of TPM 6.
- tpm7PowerState()
Handle a Tango attribute read of the power state of TPM 7.
- Return type:
- Returns:
the power state of TPM 7.
- tpm8PowerState()
Handle a Tango attribute read of the power state of TPM 8.
- Return type:
- Returns:
the power state of TPM 8.
- tpmCount()
Handle a Tango attribute read of TPM count.
- Return type:
- Returns:
the number of TPMs present in the subrack. When communication with the subrack is not established, this returns 0.
- tpmCurrents()
Handle a Tango attribute read of the TPM currents.
- tpmPowers()
Handle a Tango attribute read of the TPM powers.
- tpmPresent()
Handle a Tango attribute read of which TPMs are present in the subrack.
- class SetPowerSupplyFanSpeedCommand(command_tracker, component_manager, logger=None)
Class for handling the SetPowerSupplyFanSpeed command.
This command set the selected power supply fan speed.
This command takes as input a JSON string that conforms to the following schema:
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://skao.int/MccsSubrack_SetPowerSupplyFanSpeed.json", "title": "MccsSubrack SetPowerSupplyFanSpeed schema", "description": "Schema for MccsSubrack's SetPowerSupplyFanSpeed command", "type": "object", "properties": { "power_supply_fan_id": { "description": "ID of the power supply fan", "type": "integer", "minimum": 1, "maximum": 2 }, "speed_percent": { "description": "Fan speed in percent", "type": "number", "minimum": 0.0, "maximum": 100.0 } }, "required": ["power_supply_fan_id", "speed_percent"] }
- __init__(command_tracker, component_manager, logger=None)
Initialise a new instance.
- Parameters:
command_tracker (
CommandTrackerProtocol
) – the device’s command trackercomponent_manager (
BaseComponentManager
) – the component manager on which this command acts.logger (
Optional
[Logger
]) – a logger for this command to use.
- do(*args, power_supply_fan_id, speed_percent, **kwargs)
Implement
MccsSubrack.SetPowerSupplyFanSpeed()
command.- Parameters:
args (
Any
) – unspecified positional arguments. This should be empty and is provided for typehinting purposes only.power_supply_fan_id (
int
) – id of the power supply (1 or 2).speed_percent (
float
) – fan speed in percentkwargs (
Any
) – unspecified keyword arguments. This should be empty and is provided for typehinting purposes only.
- Return type:
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- class SetSubrackFanModeCommand(command_tracker, component_manager, logger=None)
Class for handling the SetSubrackFanMode command.
This command set the selected subrack fan mode.
This command takes as input a JSON string that conforms to the following schema:
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://skao.int/MccsSubrack_SetSubrackFanMode.json", "title": "MccsSubrack SetSubrackFanMode schema", "description": "Schema for MccsSubrack's SetSubrackFanMode command", "type": "object", "properties": { "fan_id": { "description": "ID of the subrack fan", "type": "integer", "minimum": 1, "maximum": 4 }, "mode": { "description": "Fan mode: 0 means MANUAL, 1 means AUTO", "type": "integer", "minimum": 0, "maximum": 1 } }, "required": ["fan_id", "mode"] }
- __init__(command_tracker, component_manager, logger=None)
Initialise a new instance.
- Parameters:
command_tracker (
CommandTrackerProtocol
) – the device’s command trackercomponent_manager (
BaseComponentManager
) – the component manager on which this command acts.logger (
Optional
[Logger
]) – a logger for this command to use.
- do(*args, fan_id, mode, **kwargs)
Implement
MccsSubrack.SetSubrackFanMode()
command.- Parameters:
- Return type:
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.
- class SetSubrackFanSpeedCommand(command_tracker, component_manager, fan_speed_set, logger=None)
Class for handling the SetSubrackFanSpeed command.
This command sets the selected subrack fan speed.
This command takes as input a JSON string that conforms to the following schema:
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://skao.int/MccsSubrack_SetSubrackFanSpeed.json", "title": "MccsSubrack SetSubrackFanSpeed schema", "description": "Schema for MccsSubrack's SetSubrackFanSpeed command", "type": "object", "properties": { "subrack_fan_id": { "description": "ID of the subrack fan", "type": "integer", "minimum": 1, "maximum": 4 }, "speed_percent": { "description": "Fan speed in percent", "type": "number", "minimum": 0.0, "maximum": 100.0 } }, "required": ["subrack_fan_id", "speed_percent"] }
- __init__(command_tracker, component_manager, fan_speed_set, logger=None)
Initialise a new instance.
- Parameters:
command_tracker (
CommandTrackerProtocol
) – the device’s command trackercomponent_manager (
BaseComponentManager
) – the component manager on which this command acts.fan_speed_set (
Callable
) – callback to be called when fan speed is set.logger (
Optional
[Logger
]) – a logger for this command to use.
- do(*args, subrack_fan_id, speed_percent, **kwargs)
Implement
MccsSubrack.SetSubrackFanSpeed()
command.- Parameters:
args (
Any
) – unspecified positional arguments. This should be empty and is provided for typehinting purposes only.subrack_fan_id (
int
) – id of the subrack (1-4).speed_percent (
float
) – fan speed in percentkwargs (
Any
) – unspecified keyword arguments. This should be empty and is provided for typehinting purposes only.
- Return type:
- Returns:
A tuple containing a return code and a string message indicating status. The message is for information purpose only.