IndexedFilteredFieldWrapper

class lsst.ts.watcher.IndexedFilteredFieldWrapper(model, topic, filter_field, filter_value, field_name, index)

Bases: lsst.ts.watcher.filtered_field_wrapper.BaseFilteredFieldWrapper

Read a specific element of an array field.

Parameters
modelModel

Watcher model.

topiclsst.ts.salobj.ReadTopic

Topic to read.

filter_fieldstr

Name of filter field.

filter_valuestr

Required value of the filter field.

field_namestr

Name of field to read. The field must be an array.

indexint

Index of the element to read.

Methods Summary

update_value(data)

Set value from data.

validate(data)

Check the configuration given default topic data.

Methods Documentation

update_value(data)

Set value from data.

The subclass should assume that getattr(data, filter_field) == self.filter_value; it is up to the caller to make sure that is so.

validate(data)

Check the configuration given default topic data.

Raises
ValueError

If validation fails.

Note: the contained topic wrapper checks for the existence of
the filter field, so this method does not have to bother.