MockCommand¶
- class lsst.ts.m2com.MockCommand(is_csc=True)¶
Bases:
object
Mock command to simulate the execution of command in real hardware.
- Parameters:
- is_csc
bool
, optional Is called by the commandable SAL component (CSC) or not. (the default is True)
- is_csc
Attributes Summary
Methods Summary
apply_forces
(message, model, message_event)Apply the forces in addtional to the LUT force.
clear_errors
(message, model, message_event)Clear the system errors.
disable
(message, model, message_event)Disable the system.
enable
(message, model, message_event)Enable the system.
enable_open_loop_max_limit
(message, model, ...)Enable the maximum limit in open-loop control.
enter_control
(message, model, message_event)Enter the control.
exit_control
(message, model, message_event)Exit the control.
move_actuators
(message, model, message_event)Move the actuators.
position_mirror
(message, model, message_event)Position the mirror.
reboot_controller
(message, model, message_event)Reboot the cell controller.
reset_breakers
(message, model, message_event)Reset the breakers.
reset_force_offsets
(message, model, ...)Reset the actuator force offsets (not LUT force).
run_script
(message, model, message_event)Run the binary script used in the engineering user interface (EUI).
save_mirror_position
(message, model, ...)Save the position of mirror.
select_inclination_source
(message, model, ...)Select the source of inclination.
set_mirror_home
(message, model, message_event)Set the home of mirror.
set_temperature_offset
(message, model, ...)Set the temperature offset used in the calculation of LUT force.
standby
(message, model, message_event)Standby the system.
start
(message, model, message_event)Start the system.
switch_command_source
(message, model, ...)Switch the command source to be the commandable SAL component (CSC) or engineering user interface (EUI).
switch_force_balance_system
(message, model, ...)Switch the force balance system.
Attributes Documentation
- SLEEP_TIME_NORMAL = 5¶
- SLEEP_TIME_SHORT = 0.01¶
Methods Documentation
- async apply_forces(message, model, message_event)¶
Apply the forces in addtional to the LUT force.
LUT: look-up table.
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async clear_errors(message, model, message_event)¶
Clear the system errors.
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async disable(message, model, message_event)¶
Disable the system.
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async enable(message, model, message_event)¶
Enable the system.
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async enable_open_loop_max_limit(message, model, message_event)¶
Enable the maximum limit in open-loop control.
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async enter_control(message, model, message_event)¶
Enter the control.
This is only supported for the commandable SAL component (CSC). In the future, this command will be removed after the state machines in cell controller are unified to a single one.
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async exit_control(message, model, message_event)¶
Exit the control.
This is only supported for the commandable SAL component (CSC). In the future, this command will be removed after the state machines in cell controller are unified to a single one.
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async move_actuators(message, model, message_event)¶
Move the actuators.
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async position_mirror(message, model, message_event)¶
Position the mirror.
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async reboot_controller(message, model, message_event)¶
Reboot the cell controller.
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async reset_breakers(message, model, message_event)¶
Reset the breakers.
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async reset_force_offsets(message, model, message_event)¶
Reset the actuator force offsets (not LUT force).
LUT: look-up table.
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async run_script(message, model, message_event)¶
Run the binary script used in the engineering user interface (EUI).
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async save_mirror_position(message, model, message_event)¶
Save the position of mirror.
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async select_inclination_source(message, model, message_event)¶
Select the source of inclination.
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async set_mirror_home(message, model, message_event)¶
Set the home of mirror.
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async set_temperature_offset(message, model, message_event)¶
Set the temperature offset used in the calculation of LUT force.
LUT: look-up table.
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async standby(message, model, message_event)¶
Standby the system.
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async start(message, model, message_event)¶
Start the system.
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async switch_command_source(message, model, message_event)¶
Switch the command source to be the commandable SAL component (CSC) or engineering user interface (EUI).
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model
- async switch_force_balance_system(message, model, message_event)¶
Switch the force balance system.
- Parameters:
- message
dict
Command message.
- model
MockModel
Mock model to simulate the M2 hardware behavior.
- message_event
MockMessageEvent
Instance of MockMessageEvent to write the event.
- message
- Returns:
- model
MockModel
Mock model to simulate the M2 hardware behavior.
CommandStatus
Status of command execution.
- model