BaseTopic#

class lsst.ts.salobj.topics.BaseTopic(*, salinfo, attr_name)#

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

Raises:

RuntimeError – If the topic cannot be constructed.

salinfo#

The salinfo constructor argument.

Type:

SalInfo

topic_info#

Metadata about the topic.

Type:

TopicInfo

log#

A logger.

Type:

logging.Logger

Attributes Summary

DataType

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

attr_name

Get the salobj topic attribute name, e.g. evt_summaryState.

sal_name

Get the SAL topic name, e.g. logevent_summaryState.

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.