BaseTopic¶
- class lsst.ts.salobj.topics.BaseTopic(*, salinfo: SalInfo, attr_name: str)¶
Bases:
ABC
Base class for topics.
- Parameters:
- salinfo
SalInfo
SAL component information.
- attr_name
str
Topic name with attribute prefix. The prefix must be one of:
cmd_
,evt_
,tel_
, or (only for the ackcmd topic)ack_
.
- salinfo
- Attributes:
- salinfo
SalInfo
The
salinfo
constructor argument.- topic_info
TopicInfo
Metadata about the topic.
- log
logging.Logger
A logger.
- salinfo
- Raises:
- RuntimeError
If the topic cannot be constructed.
Attributes Summary
The type (class) for a message of this topic.
Get the salobj topic attribute name, e.g.
Get the SAL topic name, e.g.
Attributes Documentation
- DataType¶
The type (class) for a message of this topic.
When you read or write a message for this topic you are reading or writing an instance of
DataType
.Notes
The preferred way to set data and write a message for a topic is:
RemoteCommand.set_start
to start a command.CommandEvent.set_write
to write an event.CommandTelemetry.set_write
to write a telemetry message.
- attr_name¶
Get the salobj topic attribute name, e.g. evt_summaryState.
- sal_name¶
Get the SAL topic name, e.g. logevent_summaryState.