MockMTHexapodController#

class lsst.ts.mthexapod.MockMTHexapodController(index, log, port=0, initial_state=ControllerState.STANDBY)#

Bases: BaseMockController

Mock MTHexapod controller that talks over TCP/IP.

Parameters:
  • index (SalIndex or int) – SAL index; see SalIndex for the allowed values.

  • log (logging.Logger) – Logger.

  • port (int, optional) – Command socket port.

  • initial_state (ControllerState, optional) – Initial state of mock controller.

Notes

To start the mock controller:

ctrl = MockHexapodController(…) await ctrl.start_task

To stop the mock controller:

await ctrl.close()

Known Limitations

  • The synchronized move parameter is ignored. Supporting this would be fairly easy.

  • No lookup table support. Thus MOVE_LUT is the same as MOVE_POINT_TO_POINT.

  • Acceleration is treated as instantanous.

Attributes Summary

Methods Summary

close()

Kill command and telemetry tasks and close the connections.

do_config_accel(command)

do_config_limits(command)

do_config_vel(command)

do_move_point_to_point(command)

do_offset(command)

do_position_set(command)

do_set_pivotpoint(command)

do_stop(command)

end_run_command(command, cmd_method)

Called when run_command is done.

update_telemetry(curr_tai)

Update self.client.telemetry.

Attributes Documentation

actuator_encoder_resolution = 10#

Methods Documentation

async close()#

Kill command and telemetry tasks and close the connections.

Always safe to call.

Return type:

None

async do_config_accel(command)#
Parameters:

command (Command)

Return type:

None

async do_config_limits(command)#
Parameters:

command (Command)

Return type:

None

async do_config_vel(command)#
Parameters:

command (Command)

Return type:

None

async do_move_point_to_point(command)#
Parameters:

command (Command)

Return type:

None

async do_offset(command)#
Parameters:

command (Command)

Return type:

None

async do_position_set(command)#
Parameters:

command (Command)

Return type:

None

async do_set_pivotpoint(command)#
Parameters:

command (Command)

Return type:

None

async do_stop(command)#
Parameters:

command (Command)

Return type:

None

async end_run_command(command, cmd_method)#

Called when run_command is done.

Can be used to clear the set position.

Parameters:
Return type:

None

async update_telemetry(curr_tai)#

Update self.client.telemetry.

Parameters:

curr_tai (float) – Time at which to compute telemetry (TAI, unix seconds). This is the time in the header, which is (approximately) the current time.

Return type:

None