TopicCallback¶
- class lsst.ts.watcher.TopicCallback(topic, rule, model)¶
Bases:
object
Call one or more rules when a salobj topic receives a sample.
The rule is called with one argument: this topic callback.
- Parameters
- Attributes
Attributes Summary
Get the topic name, with an
evt_
ortel_
prefix.Get the SAL index of the remote.
Get the name of the remote.
Methods Summary
__call__
(value)Call self as a function.
add_rule
(rule)Add a rule.
add_topic_wrapper
(wrapper)Add a topic wrapper, or other non-rule callable.
get
()Get the current value of the topic.
Attributes Documentation
- attr_name¶
Get the topic name, with an
evt_
ortel_
prefix.This is the name of the wrapped topic attribute in
RemoteWrapper
.
- remote_index¶
Get the SAL index of the remote.
- remote_name¶
Get the name of the remote.
Methods Documentation
- async __call__(value)¶
Call self as a function.
- add_topic_wrapper(wrapper)¶
Add a topic wrapper, or other non-rule callable.
The callable is called with a single variable: this
TopicCallback
.Wrapper callbacks are called before rule callbacks.
- get()¶
Get the current value of the topic.
This is provided so that code in
Rule.__call__
can easily get the current value of the topic that triggered the call.