MockDevice#

class lsst.ts.ess.common.device.MockDevice(name, device_id, sensor, callback_func, log, in_error_state=False)#

Bases: BaseDevice

Mock Sensor Device.

Parameters:
  • name (str) – The name of the device.

  • device_id (str) – The hardware device ID to connect to.

  • sensor (BaseSensor) – The sensor that produces the telemetry.

  • callback_func (Callable) – Callback function to receive the telemetry.

  • log (logging.Logger) – The logger to create a child logger for.

  • in_error_state (bool, default: False)

Attributes Summary

Methods Summary

basic_close()

Close the Sensor Device.

basic_open()

Open the Sensor Device.

readline()

Read a line of telemetry from the device.

Attributes Documentation

telemetry_interval = 1.0#

Methods Documentation

async basic_close()#

Close the Sensor Device.

Return type:

None

async basic_open()#

Open the Sensor Device.

Return type:

None

async readline()#

Read a line of telemetry from the device.

Returns:

line – Line read from the device. Includes terminator string if there is one. May be returned empty if nothing was received or partial if the readline was started during device reception.

Return type:

str