BaseFilteredFieldWrapper¶
- class lsst.ts.watcher.BaseFilteredFieldWrapper(model, topic, filter_field, filter_value)¶
Bases:
ABC
Base 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
FieldWrapperList
to hold a collection of related filtered field wrappers.- Parameters:
- Raises:
- ValueError
If field wrapper validation fails.
- Attributes:
- topic_wrapper
TopicWrapper
Topic wrapper for the specified topic.
- filter_value
str
Value of
filter_value
constructor argument.- topic_descr
str
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
.- nelts
int
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.- value
The most recently seen value for this field, or None if data has never been seen.
- timestamp
float
The time the data was last set (TAI unix seconds); None until set.
- topic_wrapper
Methods Summary
get_value_descr
(index)Get a description for a value.
update_value
(data)Set
value
from 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.
- abstract update_value(data)¶
Set
value
from DDS data.Do not set the
timestamp
field, and do not check thatgetattr(data, filter_field) == self.filter_value
; both of these are done by the caller:FilteredTopicWrapper.__call__
.