MockCommandHandler#

class lsst.ts.ess.common.MockCommandHandler(callback, simulation_mode, devices_in_error_state=False)#

Bases: AbstractCommandHandler

Parameters:
  • callback (Callable)

  • simulation_mode (int)

  • devices_in_error_state (bool, default: False)

Methods Summary

create_device(device_configuration[, ...])

Create the device to connect to by using the specified configuration.

Methods Documentation

create_device(device_configuration, devices_in_error_state=False)#

Create the device to connect to by using the specified configuration.

Parameters:
  • device_configuration (dict) – A dict representing the device to connect to. The format of the dict is described in the devices part of lsst.ts.ess.common.CONFIG_SCHEMA.

  • devices_in_error_state (bool) – Whether the devices are in error state (True) or not (False, default). To be used by unit tests.

Returns:

device – The device to connect to.

Return type:

common.device.BaseDevice

Raises:

RuntimeError – In case an incorrect configuration has been loaded.