MockMessageEvent

class lsst.ts.m2com.MockMessageEvent(writer: asyncio.streams.StreamWriter | None)

Bases: object

Mock message of event to simulate the message from real hardware.

Parameters:
writerasyncio.StreamWriter or None

Writer of the socket.

Attributes:
writerasyncio.StreamWriter or None

Writer of the socket.

configuration_filestr

Configuration file.

Methods Summary

write_cell_temperature_high_warning(hi_warning)

Write the message: cell temperature is high or not.

write_closed_loop_control_mode(mode)

Write the message: closed-loop control mode.

write_commandable_by_dds(state)

Write the message: commandable by DDS or not.

write_config()

Write the message: config.

write_configuration_files()

Write the message: configuration files.

write_detailed_state(detailed_state)

Write the message: detailed state.

write_digital_input(digital_input)

Write the message: digital input.

write_digital_output(digital_output)

Write the message: digital output.

write_enabled_faults_mask(mask)

Write the message: enabled faults mask.

write_force_balance_system_status(status)

Write the message: force balance system is on or not.

write_hardpoint_list(actuators)

Write the message: hardpoint list.

write_inclination_telemetry_source(source)

Write the message: inclination telemetry source.

write_inner_loop_control_mode(address, mode)

Write the message: inner-loop control mode.

write_interlock(state)

Write the message: interlock.

write_limit_switch_status(...)

Write the message: limit switch status.

write_m2_assembly_in_position(in_position)

Write the message: M2 assembly is in position or not.

write_open_loop_max_limit(status)

Write the message: open-loop maximum limit is enabled or not.

write_power_system_state(power_type, status, ...)

Write the message: power system state.

write_script_execution_status(percentage)

Write the message: script execution status.

write_summary_faults_status(status)

Write the message: summary faults status.

write_summary_state(summary_state)

Write the message: summary state.

write_tcp_ip_connected(is_connected)

Write the message: TCP/IP connection is on or not.

write_temperature_offset(ring)

Write the message: temperature offset in degree C.

Methods Documentation

async write_cell_temperature_high_warning(hi_warning: bool) None

Write the message: cell temperature is high or not.

Parameters:
hi_warningbool

Cell temperature is high or not.

async write_closed_loop_control_mode(mode: ClosedLoopControlMode) None

Write the message: closed-loop control mode.

Parameters:
modeenum ClosedLoopControlMode

Closed-loop control mode.

async write_commandable_by_dds(state: bool) None

Write the message: commandable by DDS or not.

Parameters:
statebool

Commandable by DDS or not.

async write_config() None

Write the message: config.

async write_configuration_files() None

Write the message: configuration files.

async write_detailed_state(detailed_state: DetailedState) None

Write the message: detailed state.

Parameters:
detailed_stateenum DetailedState

M2 detailed state.

async write_digital_input(digital_input: int) None

Write the message: digital input.

Parameters:
digital_inputint

Digital input. The bit value can follow the enum ‘DigitalInput’.

async write_digital_output(digital_output: int) None

Write the message: digital output.

Parameters:
digital_outputint

Digital output. The bit value can follow the enum ‘DigitalOutput’.

async write_enabled_faults_mask(mask: int) None

Write the message: enabled faults mask.

Parameters:
maskint

Enabled faults mask.

async write_force_balance_system_status(status: bool) None

Write the message: force balance system is on or not.

Parameters:
statusbool

Force balance system is on or not.

async write_hardpoint_list(actuators: list[int]) None

Write the message: hardpoint list.

Parameters:
actuatorslist

Hardpoint list.

async write_inclination_telemetry_source(source: InclinationTelemetrySource) None

Write the message: inclination telemetry source.

Parameters:
sourceenum MTM2.InclinationTelemetrySource

Inclination telemetry source.

async write_inner_loop_control_mode(address: int, mode: InnerLoopControlMode) None

Write the message: inner-loop control mode.

Parameters:
addressint

0-based address.

modeenum InnerLoopControlMode

Inner-loop control mode.

async write_interlock(state: bool) None

Write the message: interlock.

Parameters:
statebool

Interlock is on or not.

async write_limit_switch_status(limit_switch_retract: list[int], limit_switch_extend: list[int]) None

Write the message: limit switch status.

Parameters:
limit_switch_retractlist

Triggered retracted limit switch.

limit_switch_extendlist

Triggered extended limit switch.

async write_m2_assembly_in_position(in_position: bool) None

Write the message: M2 assembly is in position or not.

Parameters:
in_positionbool

M2 assembly is in position or not.

async write_open_loop_max_limit(status: bool) None

Write the message: open-loop maximum limit is enabled or not.

Parameters:
statusbool

Open-loop maximum limit is enabled or not.

async write_power_system_state(power_type: PowerType, status: bool, power_system_state: PowerSystemState) None

Write the message: power system state.

Parameters:
power_typeenum PowerType

Power type.

statusbool

Power status is on or not.

power_system_stateenum PowerSystemState

Power system state.

async write_script_execution_status(percentage: int | float) None

Write the message: script execution status.

Parameters:
percentageint or float

Percentage of the script execution.

async write_summary_faults_status(status: int) None

Write the message: summary faults status.

Parameters:
statusint

Summary faults status.

async write_summary_state(summary_state: State) None

Write the message: summary state.

Parameters:
summary_stateenum lsst.ts.salobj.State

M2 summary state.

async write_tcp_ip_connected(is_connected: bool) None

Write the message: TCP/IP connection is on or not.

Parameters:
is_connectedbool

TCP/IP connection is on or not.

async write_temperature_offset(ring: list[int | float]) None

Write the message: temperature offset in degree C.

Parameters:
ringlist

Offset of ring temperatures.