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:
- writer
asyncio.StreamWriter
or None Writer of the socket.
- writer
- Attributes:
- writer
asyncio.StreamWriter
or None Writer of the socket.
- configuration_file
str
Configuration file.
- writer
Methods Summary
write_cell_temperature_high_warning
(hi_warning)Write the message: cell temperature is high or not.
Write the message: closed-loop control mode.
write_commandable_by_dds
(state)Write the message: commandable by DDS or not.
Write the message: config.
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 the message: enabled faults mask.
Write the message: force balance system is on or not.
write_hardpoint_list
(actuators)Write the message: hardpoint list.
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 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_warning
bool
Cell temperature is high or not.
- hi_warning
- async write_closed_loop_control_mode(mode: ClosedLoopControlMode) None ¶
Write the message: closed-loop control mode.
- Parameters:
- modeenum
ClosedLoopControlMode
Closed-loop control mode.
- modeenum
- async write_commandable_by_dds(state: bool) None ¶
Write the message: commandable by DDS or not.
- Parameters:
- state
bool
Commandable by DDS or not.
- state
- async write_detailed_state(detailed_state: DetailedState) None ¶
Write the message: detailed state.
- Parameters:
- detailed_stateenum
DetailedState
M2 detailed state.
- detailed_stateenum
- async write_digital_input(digital_input: int) None ¶
Write the message: digital input.
- Parameters:
- digital_input
int
Digital input. The bit value can follow the enum ‘DigitalInput’.
- digital_input
- async write_digital_output(digital_output: int) None ¶
Write the message: digital output.
- Parameters:
- digital_output
int
Digital output. The bit value can follow the enum ‘DigitalOutput’.
- digital_output
- async write_enabled_faults_mask(mask: int) None ¶
Write the message: enabled faults mask.
- Parameters:
- mask
int
Enabled faults mask.
- mask
- async write_force_balance_system_status(status: bool) None ¶
Write the message: force balance system is on or not.
- Parameters:
- status
bool
Force balance system is on or not.
- status
- async write_hardpoint_list(actuators: list[int]) None ¶
Write the message: hardpoint list.
- Parameters:
- actuators
list
Hardpoint list.
- actuators
- async write_inclination_telemetry_source(source: InclinationTelemetrySource) None ¶
Write the message: inclination telemetry source.
- Parameters:
- sourceenum
MTM2.InclinationTelemetrySource
Inclination telemetry source.
- sourceenum
- async write_inner_loop_control_mode(address: int, mode: InnerLoopControlMode) None ¶
Write the message: inner-loop control mode.
- Parameters:
- address
int
0-based address.
- modeenum
InnerLoopControlMode
Inner-loop control mode.
- address
- async write_interlock(state: bool) None ¶
Write the message: interlock.
- Parameters:
- state
bool
Interlock is on or not.
- state
- async write_limit_switch_status(limit_switch_retract: list[int], limit_switch_extend: list[int]) None ¶
Write the message: limit switch status.
- async write_m2_assembly_in_position(in_position: bool) None ¶
Write the message: M2 assembly is in position or not.
- Parameters:
- in_position
bool
M2 assembly is in position or not.
- in_position
- async write_open_loop_max_limit(status: bool) None ¶
Write the message: open-loop maximum limit is enabled or not.
- Parameters:
- status
bool
Open-loop maximum limit is enabled or not.
- status
- 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.
- status
bool
Power status is on or not.
- power_system_stateenum
PowerSystemState
Power system state.
- power_typeenum
- async write_script_execution_status(percentage: int | float) None ¶
Write the message: script execution status.
- async write_summary_faults_status(status: int) None ¶
Write the message: summary faults status.
- Parameters:
- status
int
Summary faults status.
- status
- async write_summary_state(summary_state: State) None ¶
Write the message: summary state.
- Parameters:
- summary_stateenum
lsst.ts.salobj.State
M2 summary state.
- summary_stateenum