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
- Raises:
- RuntimeError
If the topic cannot be constructed.
- Attributes:
- salinfo
SalInfo
The
salinfo
constructor argument.- attr_name
str
The attr_name constructor argument: the name of topic attribute in
Controller
andRemote
. For example:evt_summaryState
.- name
str
The topic name without any prefix. For example:
summaryState
.- sal_name
str
The topic name used by SAL. Commands have prefix
command_
, events have prefixlogevent_
, and other topics have no prefix. For example:logevent_summaryState
.- log
logging.Logger
A logger.
- qos_set
salobj.QosSet
Quality of service set.
volatile
bool
Does this topic have volatile durability?
- rev_code
str
Revision hash code for the topic. This code changes whenever the schema for the topic changes, and it is part of the DDS topic name. For example:
90255bf1
.- dds_name
str
Name of topic seen by DDS. For example:
Test_logevent_summaryState_90255bf1
.
- salinfo
Attributes Summary
The type (class) for a message of this topic.
Get topic metadata as a
TopicMetadata
, if available,else None.Does this topic have volatile durability?
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 write a message for a topic is:
RemoteCommand.start
to start a command.CommandEvent.write
to write an event.CommandTelemetry.write
to write a telemetry message.
- metadata¶
Get topic metadata as a
TopicMetadata
, if available,else None.
- volatile¶
Does this topic have volatile durability?