TcpipDevice¶
- class lsst.ts.ess.common.device.TcpipDevice(name: str, host: str, port: int, sensor: BaseSensor, baud_rate: int, callback_func: Callable, log: Logger, simulation_mode: int)¶
Bases:
BaseDeviceRemote device that publishes telemetry via TCP/IP.
- Parameters:
- name
str The name of the device.
- host
str The hostname of the device.
- port
int The port of the device.
- sensor
BaseSensor The sensor that produces the telemetry.
- baud_rate
int The baud rate of the sensor.
- callback_func
Callable Callback function to receive the telemetry.
- log
logging.Logger The logger to create a child logger for.
- simulation_mode
int Simulation mode; 0 for normal operation.
- name
Attributes Summary
Methods Summary
Close the Sensor Device.
Open the Sensor Device.
close()Stop the telemetry loop.
handle_readline_exception(exception)Handle any exception that happened in the
readlinemethod.open()Generic open function.
readline()Read a line of telemetry from the device.
Attributes Documentation
- connected¶
Methods Documentation
- async handle_readline_exception(exception: BaseException) None¶
Handle any exception that happened in the
readlinemethod.The default is to log and ignore but subclasses may override this method to customize the behavior.
- Parameters:
- exception
BaseException The exception to handle.
- exception