BaseFilteredFieldWrapper#
- class lsst.ts.watcher.BaseFilteredFieldWrapper(model, topic, filter_field, filter_value)#
Bases:
ABCBase class for filtered field wrappers.
Extract and cache the most recent value of a topic field for data that matches a specified filter.
See also
FieldWrapperListto hold a collection of related filtered field wrappers.- Parameters:
- Raises:
ValueError – If field wrapper validation fails.
- topic_wrapper#
Topic wrapper for the specified topic.
- Type:
TopicWrapper
- topic_descr#
A brief description of this topic, including SAL name and index, topic attribute name, filter_field, and filter_value. Does not include any information about the field; subclasses are responsible for handling that in
get_value_descr.- Type:
- nelts#
The number of elements in
value, if it is a list, else None. This is based on the topic schema; it has nothing to do with whether or not any data has been seen for the topic.- Type:
- value#
The most recently seen value for this field, or None if data has never been seen.
Methods Summary
get_value_descr(index)Get a description for a value.
update_value(data)Set
valuefrom DDS data.Methods Documentation
- abstract get_value_descr(index)#
Get a description for a value.
The description should include a high-level description, if available, plus details of which field provided the data (if not synthesized), and self.topic_descr.
- Parameters:
index (
intorNone) – The index of the value; must beNonefor a scalar.- Raises:
RuntimeError – 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.
- abstract update_value(data)#
Set
valuefrom DDS data.Do not set the
timestampfield, and do not check thatgetattr(data, filter_field) == self.filter_value; both of these are done by the caller:FilteredTopicWrapper.__call__.