|
iceoryx_posh 2.0.6
|
The PublisherImpl class implements the typed publisher API. More...
#include <iceoryx_posh/internal/popo/publisher_impl.hpp>


Public Member Functions | |
| PublisherImpl (const capro::ServiceDescription &service, const PublisherOptions &publisherOptions=PublisherOptions()) | |
| PublisherImpl (const PublisherImpl &other)=delete | |
| PublisherImpl & | operator= (const PublisherImpl &)=delete |
| PublisherImpl (PublisherImpl &&rhs)=delete | |
| PublisherImpl & | operator= (PublisherImpl &&rhs)=delete |
| template<typename... Args> | |
| cxx::expected< Sample< T, H >, AllocationError > | loan (Args &&... args) noexcept |
| loan Get a sample from loaned shared memory and consctruct the data with the given arguments. | |
| void | publish (Sample< T, H > &&sample) noexcept override |
| publish Publishes the given sample and then releases its loan. | |
| cxx::expected< AllocationError > | publishCopyOf (const T &val) noexcept |
| 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) noexcept |
| publishResultOf Loan a sample from memory, execute the provided callable to write to it, then publish it. | |
Public Member Functions inherited from iox::popo::BasePublisher< port_t > | |
| BasePublisher (const BasePublisher &other)=delete | |
| BasePublisher & | operator= (const BasePublisher &)=delete |
| BasePublisher (BasePublisher &&rhs)=delete | |
| BasePublisher & | operator= (BasePublisher &&rhs)=delete |
| uid_t | getUid () const noexcept |
| uid Get the UID of the publisher. | |
| capro::ServiceDescription | getServiceDescription () const noexcept |
| getServiceDescription Get the service description of the publisher. | |
| void | offer () noexcept |
| offer Offer the service to be subscribed to. | |
| void | stopOffer () noexcept |
| stopOffer Stop offering the service. | |
| bool | isOffered () const noexcept |
| isOffered | |
| bool | hasSubscribers () const noexcept |
| hasSubscribers | |
Additional Inherited Members | |
Public Types inherited from iox::popo::BasePublisher< port_t > | |
| using | PortType = port_t |
Protected Member Functions inherited from iox::popo::BasePublisher< port_t > | |
| BasePublisher (const capro::ServiceDescription &service, const PublisherOptions &publisherOptions) | |
| const port_t & | port () const noexcept |
| port | |
| port_t & | port () noexcept |
| port | |
Protected Attributes inherited from iox::popo::BasePublisher< port_t > | |
| port_t | m_port {nullptr} |
The PublisherImpl class implements the typed publisher API.
Publisher instead!
|
noexcept |
loan Get a sample from loaned shared memory and consctruct the data with the given arguments.
| args | Arguments used to construct the data. |
The loaned sample is automatically released when it goes out of scope.
|
overridenoexcept |
publish Publishes the given sample and then releases its loan.
| sample | The sample to publish. |
|
noexcept |
publishCopyOf Copy the provided value into a loaned shared memory chunk and publish it.
| val | Value to copy. |
|
noexcept |
publishResultOf Loan a sample from memory, execute the provided callable to write to it, then publish it.
| c | Callable with the signature void(T*, ArgTypes...) that write's it's result to T*. |
| args | The arguments of the callable. |