PowerSwitch Device

class ska_mid_cbf_mcs.power_switch.power_switch_device.PowerSwitch(*args: Any, **kwargs: Any)[source]

Bases: SKABaseDevice

TANGO device class for controlling and monitoring the web power switch that distributes power to the Talon LRUs.

always_executed_hook() None[source]

Hook to be executed before any attribute access or command.

delete_device() None[source]

Uninitialize the device.

create_component_manager() PowerSwitchComponentManager[source]

Create and return a component manager for this device.

Returns:

a component manager for this device

init_command_objects() None[source]

Sets up the command objects.

write_simulationMode(value: ska_tango_base.control_model.SimulationMode) None[source]

Set the simulation mode of the device. When simulation mode is set to True, the power switch software simulator is used in place of the hardware. When simulation mode is set to False, the real power switch driver is used.

Parameters:

value – SimulationMode

read_numOutlets() int[source]

Get the number of outlets.

Returns:

number of outlets

read_isCommunicating() bool[source]

Get whether or not the power switch is communicating.

Returns:

True if power switch can be contacted, False if not

class InitCommand(*args: Any, **kwargs: Any)[source]

Bases: InitCommand

A class for the PowerSwitch’s init_device() “command”.

do() Tuple[ska_tango_base.commands.ResultCode, str][source]

Stateless hook for device initialisation.

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

class TurnOnOutletCommand(*args: Any, **kwargs: Any)[source]

Bases: ResponseCommand

The command class for the TurnOnOutlet command.

Turn on an individual outlet, specified by the outlet ID

do(argin: str) Tuple[ska_tango_base.commands.ResultCode, str][source]

Implement TurnOnOutlet command functionality.

Parameters:

argin – the outlet ID of the outlet to switch on

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

class TurnOffOutletCommand(*args: Any, **kwargs: Any)[source]

Bases: ResponseCommand

The command class for the TurnOffOutlet command.

Turn off an individual outlet, specified by the outlet ID.

do(argin: str) Tuple[ska_tango_base.commands.ResultCode, str][source]

Implement TurnOffOutlet command functionality.

Parameters:

argin – the outlet ID of the outlet to switch off

Returns:

A tuple containing a return code and a string message indicating status. The message is for information purpose only.

class GetOutletPowerModeCommand(*args: Any, **kwargs: Any)[source]

Bases: BaseCommand

The command class for the GetOutletPowerMode command.

Get the power mode of an individual outlet, specified by the outlet ID.

do(argin: str) ska_tango_base.control_model.PowerMode[source]

Implement GetOutletPowerMode command functionality.

Parameters:

argin – the outlet ID to get the state of

Returns:

power mode of the outlet