RemoteWrapper#

class lsst.ts.watcher.RemoteWrapper(remote, topic_names)#

Bases: object

Simple access to the current value of a specified set of topics.

The wrapper uses the same attribute names as lsst.ts.salobj.Remote, but the wrapper’s attributes return the current value of the topic. For example remote_wrapper.evt_summaryState returns remote.evt_summaryState.get().

Parameters:
  • remote (lsst.ts.salobj.Remote) – Remote to wrap.

  • topic_names (list [str]) – List of names of topics to wrap, with an evt_ or tel_ prefix.

Raises:

ValueError – If a name in topic_names is neither the name of an event nor a telemetry topic.

Notes

The intent is to offer each BaseRule simple access to the current value of the topics it needs, while hiding access to other topics and to methods of topics that BaseRule should not use, such as next.

Attributes Summary

attr_name

Get the rule attribute name for this remote wrapper.

Methods Summary

get_topic(name)

Return the appropriate lsst.ts.salobj.ReadTopic.

has_topic(name)

Return True if this wrapper has the specifies topic.

Attributes Documentation

attr_name#

Get the rule attribute name for this remote wrapper.

Methods Documentation

get_topic(name)#

Return the appropriate lsst.ts.salobj.ReadTopic.

Parameters:

name (str) – Topic name, with the appropriate evt_ or tel_ prefix. Example: “evt_logLevel”.

Raises:

KeyError – If the topic does not exist.

has_topic(name)#

Return True if this wrapper has the specifies topic.

Parameters:

name (str) – Topic name, with the appropriate evt_ or tel_ prefix. Example: “evt_logLevel”.