SimpleMockController#
- class lsst.ts.hexrotcomm.SimpleMockController(log, port=6210, host='127.0.0.1', initial_state=ControllerState.STANDBY)#
Bases:
BaseMockControllerSimple mock controller for unit testing BaseMockController.
The MOVE command sets cmd_position and curr_position, then the controller slowly increments curr_position.
- Parameters:
log (
logging.Logger) – Logger.port (
int) – Port for the TCP/IP server. Specify 0 to choose random values for both ports; this is recommended for unit tests, to avoid collision with other tests.initial_state (
lsst.ts.xml.enums.MTHexapod.ControllerState(optional)) – Initial state of mock controller.host (
strorNone, optional) – IP address for the TCP/IP server. Typically “127.0.0.1” (the default) for an IPV4 server and “::” for an IPV6 server. IfNonethen bind to all network interfaces and run both IPV4 and IPV6 servers. Do not specifyNonewith port=0 (seelsst.ts.tcpip.OneClientServerfor details).
Notes
The
MOVEcommand is rejected if the new position is not within the configured limits.Methods Summary
do_position_set(command)end_run_command(command, cmd_method)Called when run_command is done.
update_telemetry(curr_tai)Update self.client.telemetry.
Write the current configuration.
Methods Documentation
- async end_run_command(command, cmd_method)#
Called when run_command is done.
Can be used to clear the set position.
- async update_telemetry(curr_tai)#
Update self.client.telemetry.
- async write_config()#
Write the current configuration.
- Raises:
RuntimeError – If not connected.
- Return type: