BaseSensor

class lsst.ts.ess.common.sensor.BaseSensor(log: Logger, num_channels: int = 0)

Bases: ABC

Base class for the different types of Sensors.

This class holds all common code for the sensors. Sensor specific code, which extracts the telemetry from the sensor data, needs to be implemented in a sub-class.

Parameters:
loglogging.Logger

The logger to create a child logger for.

num_channelsint, optional

The number of channels that the sensor will produce telemetry for. The default value is 0 meaning that the number of channels is not variable.

Attributes Summary

charset

delimiter

terminator

Methods Summary

extract_telemetry(line)

Extract the telemetry from a line of Sensor data.

Attributes Documentation

charset = 'ASCII'
delimiter = ','
terminator = '\r\n'

Methods Documentation

abstract async extract_telemetry(line: str) list[float | int | str]

Extract the telemetry from a line of Sensor data.

Returns:
outputlist

A list containing the telemetry as measured by the specific type of sensor. The length of the output list is the same as the number of channels.