Template Class BasePublisher

Inheritance Relationships

Derived Types

Class Documentation

template<typename port_t = iox::PublisherPortUserType>
class BasePublisher

The BasePublisher class contains the common implementation for the different publisher specializations.

Note

Not intended for public usage! Use the Publisher or UntypedPublisher instead!

Subclassed by iox::popo::PublisherImpl< T, mepoo::NoUserHeader >, iox::popo::PublisherImpl< T, H, BasePublisherType >, iox::popo::UntypedPublisherImpl< BasePublisherType >

Public Types

using PortType = port_t

Public Functions

BasePublisher(const BasePublisher &other) = delete
BasePublisher &operator=(const BasePublisher&) = delete
BasePublisher(BasePublisher &&rhs) = delete
BasePublisher &operator=(BasePublisher &&rhs) = delete
virtual ~BasePublisher() noexcept
uid_t getUid() const noexcept

uid Get the UID of the publisher.

Returns:

The publisher’s UID.

capro::ServiceDescription getServiceDescription() const noexcept

getServiceDescription Get the service description of the publisher.

Returns:

The service description.

void offer() noexcept

offer Offer the service to be subscribed to.

void stopOffer() noexcept

stopOffer Stop offering the service.

bool isOffered() const noexcept

isOffered

Returns:

True if service is currently being offered.

bool hasSubscribers() const noexcept

hasSubscribers

Returns:

True if currently has subscribers to the service.

Protected Functions

BasePublisher() = default
BasePublisher(const capro::ServiceDescription &service, const PublisherOptions &publisherOptions)
const port_t &port() const noexcept

port

Returns:

const accessor of the underlying port

port_t &port() noexcept

port

Returns:

accessor of the underlying port

Protected Attributes

port_t m_port = {nullptr}