BaseTopic

class lsst.ts.salobj.topics.BaseTopic(*, salinfo: SalInfo, attr_name: str)

Bases: ABC

Base class for topics.

Parameters:
salinfoSalInfo

SAL component information.

attr_namestr

Topic name with attribute prefix. The prefix must be one of: cmd_, evt_, tel_, or (only for the ackcmd topic) ack_.

Raises:
RuntimeError

If the topic cannot be constructed.

Attributes:
salinfoSalInfo

The salinfo constructor argument.

attr_namestr

The attr_name constructor argument: the name of topic attribute in Controller and Remote. For example: evt_summaryState.

namestr

The topic name without any prefix. For example: summaryState.

sal_namestr

The topic name used by SAL. Commands have prefix command_, events have prefix logevent_, and other topics have no prefix. For example: logevent_summaryState.

loglogging.Logger

A logger.

qos_setsalobj.QosSet

Quality of service set.

volatilebool

Does this topic have volatile durability?

rev_codestr

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_namestr

Name of topic seen by DDS. For example: Test_logevent_summaryState_90255bf1.

Attributes Summary

DataType

The type (class) for a message of this topic.

metadata

Get topic metadata as a TopicMetadata, if available,else None.

volatile

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?