FieldWrapper#

class lsst.ts.watcher.FieldWrapper(model, topic, field_name)#

Bases: BaseFilteredFieldWrapper

Track a field of a telemetry topic.

Parameters:
  • model (Model) – Watcher model.

  • topic (lsst.ts.salobj.ReadTopic) – Topic to read.

  • field_name (str) – Name of field to read. The field may be a scalar or an array.

Methods Summary

get_value_descr(index)

Get a description for a value.

update_value(data)

Set value from DDS data.

Methods Documentation

get_value_descr(index)#

Get a description for a value.

Parameters:

index (int or None) – The index of the value; must be None for a scalar, and an int for an array.

Raises:

ValueError – If the field is indexed and the index is None or out of range. If the field is not indexed and the index is not None.

update_value(data)#

Set value from DDS data.

Do not set the timestamp field, and do not check that getattr(data, filter_field) == self.filter_value; both of these are done by the caller: FilteredTopicWrapper.__call__.