MockPowerSystem#

class lsst.ts.m2com.MockPowerSystem(default_voltage: float, default_current: float)#

Bases: object

Mock power system to simulate the behavior of hardware.

Parameters#

default_voltagefloat

Default voltage in volt when the power is on.

default_currentfloat

Default current in ampere when the power is on.

Attributes#

stateenum MTM2.PowerSystemState

State of the power system.

Methods Summary

get_power([rms])

Get the power.

is_power_on()

Power is on or not.

power_off()

Power off.

power_on()

Power on.

wait_power_fully_off()

Wait the power to be fully off.

wait_power_fully_on()

Wait the power to be fully on.

Methods Documentation

get_power(rms: float = 0.05) tuple[float, float]#

Get the power.

Parameters#

rmsfloat, optional

RMS variation. (the default is 0.05)

Returns#

float

Voltage in volt.

float

Current in ampere.

is_power_on() bool#

Power is on or not.

Returns#

bool

True if the power is on. Otherwise, False.

async power_off() None#

Power off.

async power_on() None#

Power on.

async wait_power_fully_off() None#

Wait the power to be fully off.

async wait_power_fully_on() None#

Wait the power to be fully on.