18 #ifndef IOX_POPO_SUBSCRIBER_PORT_USER_HPP_
19 #define IOX_POPO_SUBSCRIBER_PORT_USER_HPP_
21 #include "iceoryx_posh/internal/popo/building_blocks/chunk_receiver.hpp"
22 #include "iceoryx_posh/internal/popo/ports/base_port.hpp"
23 #include "iceoryx_posh/internal/popo/ports/subscriber_port_data.hpp"
24 #include "iceoryx_posh/mepoo/chunk_header.hpp"
25 #include "iceoryx_posh/popo/subscriber_options.hpp"
26 #include "iceoryx_utils/cxx/expected.hpp"
27 #include "iceoryx_utils/cxx/helplets.hpp"
28 #include "iceoryx_utils/cxx/optional.hpp"
29 #include "iceoryx_utils/error_handling/error_handling.hpp"
45 explicit SubscriberPortUser(cxx::not_null<MemberType_t* const> subscriberPortDataPtr) noexcept;
69 cxx::expected<const mepoo::ChunkHeader*, ChunkReceiveResult>
tryGetChunk() noexcept;
73 void releaseChunk(const mepoo::ChunkHeader* const chunkHeader) noexcept;
this class is the base for all ports. it is constructed from a member pointer and is only movable....
Definition: base_port.hpp:43
The ChunkReceiver is a building block of the shared memory communication infrastructure....
Definition: chunk_receiver.hpp:46
The SubscriberPortUser provides the API for accessing a subscriber port from the user side....
Definition: subscriber_port_user.hpp:41
void unsetConditionVariable() noexcept
detach a condition variable from subscriber
bool isConditionVariableSet() noexcept
check if there's a condition variable attached
void releaseQueuedChunks() noexcept
Release all the chunks that are currently queued up.
SubscribeState getSubscriptionState() const noexcept
get the current subscription state. Caution: There can be delays between calling subscribe and a chan...
void unsubscribe() noexcept
unsubscribe from publishers, if there are any to which we are currently subscribed
bool hasNewChunks() const noexcept
check if there are chunks in the queue
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 chun...
void subscribe() noexcept
try to subscribe to all matching publishers
void releaseChunk(const mepoo::ChunkHeader *const chunkHeader) noexcept
Release a chunk that was obtained with tryGetChunk.
bool hasLostChunksSinceLastCall() noexcept
check if there was a queue overflow since the last call of hasLostChunksSinceLastCall
void setConditionVariable(ConditionVariableData &conditionVariableData, const uint64_t notificationIndex) noexcept
attach a condition variable (via its pointer) to subscriber
Definition: service_description.hpp:29
Defines different base port data.
Definition: base_port_data.hpp:34
Definition: condition_variable_data.hpp:31
Definition: subscriber_port_data.hpp:37