|
iceoryx_doc
1.0.1
|
The ChunkReceiver is a building block of the shared memory communication infrastructure. It extends the functionality of a ChunkQueuePopper with the abililty to pass chunks to the user side (user process). Together with the ChunkSender, they are the next abstraction layer on top of ChunkDistributor and ChunkQueuePopper. The ChunkRceiver holds the ownership of the SharedChunks and does a bookkeeping which chunks are currently passed to the user side. More...
#include <chunk_receiver.hpp>


Public Types | |
| using | MemberType_t = ChunkReceiverDataType |
| using | Base_t = ChunkQueuePopper< typename ChunkReceiverDataType::ChunkQueueData_t > |
Public Types inherited from iox::popo::ChunkQueuePopper< ChunkReceiverDataType::ChunkQueueData_t > | |
| using | MemberType_t = ChunkReceiverDataType::ChunkQueueData_t |
Public Member Functions | |
| ChunkReceiver (cxx::not_null< MemberType_t *const > chunkReceiverDataPtr) noexcept | |
| ChunkReceiver (const ChunkReceiver &other)=delete | |
| ChunkReceiver & | operator= (const ChunkReceiver &)=delete |
| ChunkReceiver (ChunkReceiver &&rhs)=default | |
| ChunkReceiver & | operator= (ChunkReceiver &&rhs)=default |
| cxx::expected< const mepoo::ChunkHeader *, ChunkReceiveResult > | tryGet () noexcept |
| Tries to get the next received chunk. If there is a new one the ChunkHeader of this new chunk is received The ownerhip of the SharedChunk remains in the ChunkReceiver for being able to cleanup if the user process disappears. More... | |
| void | release (const mepoo::ChunkHeader *const chunkHeader) noexcept |
| Release a chunk that was obtained with get. More... | |
| void | releaseAll () noexcept |
| Release all the chunks that are currently held. Caution: Only call this if the user process is no more running E.g. This cleans up chunks that were held by a user process that died unexpectetly, for avoiding lost chunks in the system. | |
Public Member Functions inherited from iox::popo::ChunkQueuePopper< ChunkReceiverDataType::ChunkQueueData_t > | |
| ChunkQueuePopper (cxx::not_null< MemberType_t *const > chunkQueueDataPtr) noexcept | |
| ChunkQueuePopper (const ChunkQueuePopper &other)=delete | |
| ChunkQueuePopper (ChunkQueuePopper &&rhs)=default | |
| ChunkQueuePopper & | operator= (const ChunkQueuePopper &)=delete |
| ChunkQueuePopper & | operator= (ChunkQueuePopper &&rhs)=default |
| cxx::optional< mepoo::SharedChunk > | tryPop () noexcept |
| pop a chunk from the chunk queue More... | |
| bool | hasLostChunks () noexcept |
| check if chunks were lost and reset flag More... | |
| bool | empty () const noexcept |
| pop a chunk from the chunk queue More... | |
| uint64_t | size () noexcept |
| get the current size of the queue. Caution, another thread can have changed the size just after reading it More... | |
| void | setCapacity (const uint64_t newCapacity) noexcept |
| set the capacity of the queue More... | |
| uint64_t | getCurrentCapacity () const noexcept |
| get the current capacity of the queue. More... | |
| uint64_t | getMaximumCapacity () const noexcept |
| get the maximum capacity of the queue. More... | |
| void | clear () noexcept |
| clear the queue | |
| void | setConditionVariable (ConditionVariableData &conditionVariableDataRef, const uint64_t notificationIndex) noexcept |
| Attaches a condition variable. More... | |
| void | unsetConditionVariable () noexcept |
| Detaches a condition variable. | |
| bool | isConditionVariableSet () const noexcept |
| Returns the information whether a condition variable is attached. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from iox::popo::ChunkQueuePopper< ChunkReceiverDataType::ChunkQueueData_t > | |
| const MemberType_t * | getMembers () const noexcept |
| MemberType_t * | getMembers () noexcept |
The ChunkReceiver is a building block of the shared memory communication infrastructure. It extends the functionality of a ChunkQueuePopper with the abililty to pass chunks to the user side (user process). Together with the ChunkSender, they are the next abstraction layer on top of ChunkDistributor and ChunkQueuePopper. The ChunkRceiver holds the ownership of the SharedChunks and does a bookkeeping which chunks are currently passed to the user side.
|
inlinenoexcept |
Release a chunk that was obtained with get.
| [in] | chunkHeader,pointer | to the ChunkHeader to release |
|
inlinenoexcept |
Tries to get the next received chunk. If there is a new one the ChunkHeader of this new chunk is received The ownerhip of the SharedChunk remains in the ChunkReceiver for being able to cleanup if the user process disappears.