MockDevice¶
- class lsst.ts.ess.common.device.MockDevice(name: str, device_id: str, sensor: BaseSensor, callback_func: Callable, log: Logger)¶
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.
- name
Attributes Summary
Methods Summary
Close the Sensor Device.
Open the Sensor Device.
close
()Generic close function.
open
()Generic open function.
readline
()Read a line of telemetry from the device.
Attributes Documentation
- telemetry_interval = 1¶
Methods Documentation
- async close() None ¶
Generic close function.
Stop the telemetry loop. Then check if the device is open and, if yes, call basic_close.