|
iceoryx_doc
1.0.1
|
The PublisherPortUser provides the API for accessing a publisher port from the user side. The publisher port is divided in the three parts PublisherPortData, PublisherPortRouDi and PublisherPortUser. The PublisherPortUser uses the functionality of a ChunkSender for sending shared memory chunks. Additionally it provides the offer / stopOffer API which controls whether the publisher port is discoverable for subscriber ports. More...
#include <publisher_port_user.hpp>


Public Types | |
| using | MemberType_t = PublisherPortData |
Public Types inherited from iox::popo::BasePort | |
| using | MemberType_t = BasePortData |
Public Member Functions | |
| PublisherPortUser (cxx::not_null< MemberType_t *const > publisherPortDataPtr) noexcept | |
| PublisherPortUser (const PublisherPortUser &other)=delete | |
| PublisherPortUser & | operator= (const PublisherPortUser &)=delete |
| PublisherPortUser (PublisherPortUser &&rhs)=default | |
| PublisherPortUser & | operator= (PublisherPortUser &&rhs)=default |
| cxx::expected< mepoo::ChunkHeader *, AllocationError > | tryAllocateChunk (const uint32_t userPayloadSize, const uint32_t userPayloadAlignment, const uint32_t userHeaderSize=0U, const uint32_t userHeaderAlignment=1U) noexcept |
| Allocate a chunk, the ownership of the SharedChunk remains in the PublisherPortUser for being able to cleanup if the user process disappears. More... | |
| void | releaseChunk (mepoo::ChunkHeader *const chunkHeader) noexcept |
| Free an allocated chunk without sending it. More... | |
| void | sendChunk (mepoo::ChunkHeader *const chunkHeader) noexcept |
| Send an allocated chunk to all connected subscriber ports. More... | |
| cxx::optional< const mepoo::ChunkHeader * > | tryGetPreviousChunk () const noexcept |
| Returns the last sent chunk if there is one. More... | |
| void | offer () noexcept |
| offer this publiher port in the system | |
| void | stopOffer () noexcept |
| stop offering this publisher port, all subscribers will be removed from this publisher | |
| bool | isOffered () const noexcept |
| Checks whether the publisher port is currently offered. More... | |
| bool | hasSubscribers () const noexcept |
| Checks whether there are currently subscribers connected to this publisher. More... | |
Public Member Functions inherited from iox::popo::BasePort | |
| BasePort (MemberType_t *const basePortDataPtr) noexcept | |
| BasePort (const BasePort &other)=delete | |
| BasePort & | operator= (const BasePort &)=delete |
| BasePort (BasePort &&) noexcept | |
| BasePort & | operator= (BasePort &&) noexcept |
| operator bool () const noexcept | |
| a port can be constructed from a nullptr, additionally it also can be moved and in these cases the member methods would work on a nullptr. to circumvent this problem More... | |
| capro::ServiceDescription | getCaProServiceDescription () const noexcept |
| Reads Type of actual CaPro Port (publisher/subscriber...) More... | |
| RuntimeName_t | getRuntimeName () const noexcept |
| Gets name of the application's runtime for the active port. More... | |
| UniquePortId | getUniqueID () const noexcept |
| Gets Id of the active port. More... | |
| NodeName_t | getNodeName () const noexcept |
| returns node name for the active port More... | |
| void | destroy () noexcept |
| Indicate that this port can be destroyed. | |
| bool | toBeDestroyed () const noexcept |
| Checks whether port can be destroyed. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from iox::popo::BasePort | |
| const MemberType_t * | getMembers () const noexcept |
| MemberType_t * | getMembers () noexcept |
The PublisherPortUser provides the API for accessing a publisher port from the user side. The publisher port is divided in the three parts PublisherPortData, PublisherPortRouDi and PublisherPortUser. The PublisherPortUser uses the functionality of a ChunkSender for sending shared memory chunks. Additionally it provides the offer / stopOffer API which controls whether the publisher port is discoverable for subscriber ports.
|
noexcept |
Checks whether there are currently subscribers connected to this publisher.
|
noexcept |
Checks whether the publisher port is currently offered.
|
noexcept |
Free an allocated chunk without sending it.
| [in] | chunkHeader,pointer | to the ChunkHeader to free |
|
noexcept |
Send an allocated chunk to all connected subscriber ports.
| [in] | chunkHeader,pointer | to the ChunkHeader to send |
|
noexcept |
Allocate a chunk, the ownership of the SharedChunk remains in the PublisherPortUser for being able to cleanup if the user process disappears.
| [in] | userPayloadSize,size | of the user-payload without additional headers |
| [in] | userPayloadAlignment,alignment | of the user-payload |
| [in] | userHeaderSize,size | of the user-header; use iox::CHUNK_NO_USER_HEADER_SIZE to omit a user-header |
| [in] | userHeaderAlignment,alignment | of the user-header; use iox::CHUNK_NO_USER_HEADER_ALIGNMENT to omit a user-header |
|
noexcept |
Returns the last sent chunk if there is one.