MockCommand

class lsst.ts.m2com.MockCommand(is_csc=True)

Bases: object

Mock command to simulate the execution of command in real hardware.

Parameters:
is_cscbool, optional

Is called by the commandable SAL component (CSC) or not. (the default is True)

Attributes Summary

SLEEP_TIME_NORMAL

SLEEP_TIME_SHORT

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:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

async clear_errors(message, model, message_event)

Clear the system errors.

Parameters:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

async disable(message, model, message_event)

Disable the system.

Parameters:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

async enable(message, model, message_event)

Enable the system.

Parameters:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

async enable_open_loop_max_limit(message, model, message_event)

Enable the maximum limit in open-loop control.

Parameters:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

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:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

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:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

async move_actuators(message, model, message_event)

Move the actuators.

Parameters:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

async position_mirror(message, model, message_event)

Position the mirror.

Parameters:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

async reboot_controller(message, model, message_event)

Reboot the cell controller.

Parameters:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

async reset_breakers(message, model, message_event)

Reset the breakers.

Parameters:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

async reset_force_offsets(message, model, message_event)

Reset the actuator force offsets (not LUT force).

LUT: look-up table.

Parameters:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

async run_script(message, model, message_event)

Run the binary script used in the engineering user interface (EUI).

Parameters:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

async save_mirror_position(message, model, message_event)

Save the position of mirror.

Parameters:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

async select_inclination_source(message, model, message_event)

Select the source of inclination.

Parameters:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

async set_mirror_home(message, model, message_event)

Set the home of mirror.

Parameters:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

async set_temperature_offset(message, model, message_event)

Set the temperature offset used in the calculation of LUT force.

LUT: look-up table.

Parameters:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

async standby(message, model, message_event)

Standby the system.

Parameters:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

async start(message, model, message_event)

Start the system.

Parameters:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

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:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.

async switch_force_balance_system(message, model, message_event)

Switch the force balance system.

Parameters:
messagedict

Command message.

modelMockModel

Mock model to simulate the M2 hardware behavior.

message_eventMockMessageEvent

Instance of MockMessageEvent to write the event.

Returns:
modelMockModel

Mock model to simulate the M2 hardware behavior.

CommandStatus

Status of command execution.