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_.

Attributes:
salinfoSalInfo

The salinfo constructor argument.

topic_infoTopicInfo

Metadata about the topic.

loglogging.Logger

A logger.

Raises:
RuntimeError

If the topic cannot be constructed.

Attributes Summary

DataType

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

attr_name

Get the salobj topic attribute name, e.g.

sal_name

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.