iceoryx_doc
1.0.1
|
The SubscriberPortUser provides the API for accessing a subscriber port from the user side. The subscriber port is divided in the parts SubscriberPortData, SubscriberPortUser and different classes for RouDi side access. The SubscriberPortUser uses the functionality of a ChunkReceiver for receiving shared memory chunks. Additionally it provides the subscribe / unsubscribe API which controls whether the subscriber ports shall try to subscribe to matching publisher ports. More...
#include <subscriber_port_user.hpp>
Public Types | |
using | MemberType_t = SubscriberPortData |
![]() | |
using | MemberType_t = BasePortData |
Public Member Functions | |
SubscriberPortUser (cxx::not_null< MemberType_t *const > subscriberPortDataPtr) noexcept | |
SubscriberPortUser (const SubscriberPortUser &other)=delete | |
SubscriberPortUser & | operator= (const SubscriberPortUser &)=delete |
SubscriberPortUser (SubscriberPortUser &&rhs)=default | |
SubscriberPortUser & | operator= (SubscriberPortUser &&rhs)=default |
void | subscribe () noexcept |
try to subscribe to all matching publishers | |
void | unsubscribe () noexcept |
unsubscribe from publishers, if there are any to which we are currently subscribed | |
SubscribeState | getSubscriptionState () const noexcept |
get the current subscription state. Caution: There can be delays between calling subscribe and a change in the subscription state. The subscription state can also change without user interaction if publishers come and go More... | |
cxx::expected< const mepoo::ChunkHeader *, ChunkReceiveResult > | tryGetChunk () noexcept |
Tries to get the next chunk from the queue. If there is a new one, the ChunkHeader of the oldest chunk in the queue is returned (FiFo queue) More... | |
void | releaseChunk (const mepoo::ChunkHeader *const chunkHeader) noexcept |
Release a chunk that was obtained with tryGetChunk. More... | |
void | releaseQueuedChunks () noexcept |
Release all the chunks that are currently queued up. | |
bool | hasNewChunks () const noexcept |
check if there are chunks in the queue More... | |
bool | hasLostChunksSinceLastCall () noexcept |
check if there was a queue overflow since the last call of hasLostChunksSinceLastCall More... | |
void | setConditionVariable (ConditionVariableData &conditionVariableData, const uint64_t notificationIndex) noexcept |
attach a condition variable (via its pointer) to subscriber | |
void | unsetConditionVariable () noexcept |
detach a condition variable from subscriber | |
bool | isConditionVariableSet () noexcept |
check if there's a condition variable attached More... | |
![]() | |
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 | |
![]() | |
const MemberType_t * | getMembers () const noexcept |
MemberType_t * | getMembers () noexcept |
The SubscriberPortUser provides the API for accessing a subscriber port from the user side. The subscriber port is divided in the parts SubscriberPortData, SubscriberPortUser and different classes for RouDi side access. The SubscriberPortUser uses the functionality of a ChunkReceiver for receiving shared memory chunks. Additionally it provides the subscribe / unsubscribe API which controls whether the subscriber ports shall try to subscribe to matching publisher ports.
|
noexcept |
get the current subscription state. Caution: There can be delays between calling subscribe and a change in the subscription state. The subscription state can also change without user interaction if publishers come and go
|
noexcept |
check if there was a queue overflow since the last call of hasLostChunksSinceLastCall
|
noexcept |
check if there are chunks in the queue
|
noexcept |
check if there's a condition variable attached
|
noexcept |
Release a chunk that was obtained with tryGetChunk.
[in] | chunkHeader,pointer | to the ChunkHeader to release |
|
noexcept |
Tries to get the next chunk from the queue. If there is a new one, the ChunkHeader of the oldest chunk in the queue is returned (FiFo queue)