SimpleCsc#
- class lsst.ts.hexrotcomm.SimpleCsc(config_dir=None, initial_state=State.STANDBY, simulation_mode=1, override='')#
Bases:
BaseCscSimple CSC to talk to SimpleMockController.
This is based on the MTRotator CSC but only supports a small subset off commands, events and telemetry. See Notes for details. The move command sets the cmd_position and curr_position telemetry fields, then the controller slowly increments curr_position.
- Parameters:
config_dir (
str, optional) – Directory of configuration files, or None for the standard configuration directory (obtained from_get_default_config_dir). This is provided for unit testing.initial_state (
lsst.ts.salobj.Stateorint(optional)) – The initial state of the CSC. Ignored (other than checking that it is a valid value) except in simulation mode, because in normal operation the initial state is the current state of the controller. This is provided for unit testing.override (
str, optional) – Configuration override file to apply ifinitial_stateisState.DISABLEDorState.ENABLED.simulation_mode (
int(optional)) –Simulation mode. Allowed values:
0: regular operation.
1: simulation: use a mock low level controller.
Notes
Error Codes
lsst.ts.xml.enums.MTHexapod.ErrorCode.CONTROLLER_FAULT: The low-level controller went to fault state.lsst.ts.xml.enums.MTHexapod.ErrorCode.CONNECTION_LOST: Lost connection to the low-level controller.
SAL API
This CSC implements a subset of the MTRotator SAL API.
Commands beyond the generic commands:
move
Events beyond the generic events:
commandableByDDS
configuration
connected
controllerState
Telemetry:
rotation
Attributes Summary
Methods Summary
config_callback(client)Called when the TCP/IP controller outputs configuration.
do_move(data)Specify a position.
Construct and return a mock controller.
telemetry_callback(client)Called when the TCP/IP controller outputs telemetry.
Attributes Documentation
- valid_simulation_modes: Sequence[int] = [1]#
- version = 'test'#
Methods Documentation
- async config_callback(client)#
Called when the TCP/IP controller outputs configuration.
- Parameters:
client (
CommandTelemetryClient) – TCP/IP client.- Return type:
- make_mock_controller()#
Construct and return a mock controller.
- Return type:
- async telemetry_callback(client)#
Called when the TCP/IP controller outputs telemetry.
- Parameters:
client (
CommandTelemetryClient) – TCP/IP client.- Return type: