MockMessageEvent¶
- class lsst.ts.m2com.MockMessageEvent(server: OneClientServer | None)¶
Bases:
object
Mock message of event to simulate the message from real hardware.
Parameters¶
- server
tcpip.OneClientServer
or None Command server.
Attributes¶
- server
tcpip.OneClientServer
or None Command server.
- configuration_file
str
Configuration file.
Methods Summary
Write the message: bypassed actuator inner-loop controllers (ILCs).
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_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_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_bypassed_actuator_ilcs(ilcs: list[int]) None ¶
Write the message: bypassed actuator inner-loop controllers (ILCs).
Parameters¶
- ilcs
list
Bypassed ILCs.
- ilcs
- 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
MTM2.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_config() None ¶
Write the message: config.
- async write_configuration_files() None ¶
Write the message: configuration files.
- 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(is_external_source: bool) None ¶
Write the message: inclination telemetry source.
Parameters¶
- is_external_source
bool
Is the external inclination telemetry source or not.
- is_external_source
- 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
MTM2.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.
Parameters¶
- limit_switch_retract
list
Triggered retracted limit switch.
- limit_switch_extend
list
Triggered extended limit switch.
- limit_switch_retract
- 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
MTM2.PowerType
Power type.
- status
bool
Power status is on or not.
- power_system_stateenum
MTM2.PowerSystemState
Power system state.
- power_typeenum
- async write_script_execution_status(percentage: int | float) None ¶
Write the message: script execution status.
Parameters¶
- percentage
int
orfloat
Percentage of the script execution.
- percentage
- async write_summary_faults_status(status: int) None ¶
Write the message: summary faults status.
Parameters¶
- status
int
Summary faults status.
- status
- server