iox::popo::Publisher🔗
The Publisher class for the publish-subscribe messaging pattern in iceoryx. More...
#include <iceoryx_posh/popo/publisher.hpp>
Inherits from iox::popo::PublisherImpl< T, mepoo::NoUserHeader >, iox::popo::BasePublisher<>, iox::popo::PublisherInterface< T, mepoo::NoUserHeader >
Additional inherited members🔗
Public Functions inherited from iox::popo::PublisherImpl< T, mepoo::NoUserHeader >
Name | |
---|---|
PublisherImpl(const capro::ServiceDescription & service, const PublisherOptions & publisherOptions =PublisherOptions()) | |
PublisherImpl(const PublisherImpl & other) | |
PublisherImpl & | operator=(const PublisherImpl & ) |
PublisherImpl(PublisherImpl && rhs) | |
PublisherImpl & | operator=(PublisherImpl && rhs) |
virtual | ~PublisherImpl() =default |
template <typename... Args> cxx::expected< Sample< T, H >, AllocationError > |
loan(Args &&... args) loan Get a sample from loaned shared memory and consctruct the data with the given arguments. |
void | publish(Sample< T, H > && sample) override publish Publishes the given sample and then releases its loan. |
cxx::expected< AllocationError > | publishCopyOf(const T & val) publishCopyOf Copy the provided value into a loaned shared memory chunk and publish it. |
template <typename Callable ,typename... ArgTypes> cxx::expected< AllocationError > |
publishResultOf(Callable c, ArgTypes... args) publishResultOf Loan a sample from memory, execute the provided callable to write to it, then publish it. |
Public Types inherited from iox::popo::BasePublisher<>
Name | |
---|---|
using port_t | PortType |
Public Functions inherited from iox::popo::BasePublisher<>
Name | |
---|---|
BasePublisher(const BasePublisher & other) | |
BasePublisher & | operator=(const BasePublisher & ) |
BasePublisher(BasePublisher && rhs) | |
BasePublisher & | operator=(BasePublisher && rhs) |
virtual | ~BasePublisher() |
uid_t | getUid() const uid Get the UID of the publisher. |
capro::ServiceDescription | getServiceDescription() const getServiceDescription Get the service description of the publisher. |
void | offer() offer Offer the service to be subscribed to. |
void | stopOffer() stopOffer Stop offering the service. |
bool | isOffered() const isOffered |
bool | hasSubscribers() const hasSubscribers |
Protected Functions inherited from iox::popo::BasePublisher<>
Name | |
---|---|
BasePublisher() =default | |
BasePublisher(const capro::ServiceDescription & service, const PublisherOptions & publisherOptions) | |
const port_t & | port() const port |
port_t & | port() port |
Protected Attributes inherited from iox::popo::BasePublisher<>
Name | |
---|---|
port_t | m_port |
Detailed Description🔗
template <typename T ,
typename H =mepoo::NoUserHeader>
class iox::popo::Publisher;
The Publisher class for the publish-subscribe messaging pattern in iceoryx.
Parameters:
- T user payload type
- H user header type
Updated on 2 April 2022 at 16:37:47 CEST