The ChunkQueuePopper is the low layer building block to receive SharedChunks. It follows a first-in-first-out principle. Together with the ChunkDistributor and the ChunkQueuePusher, the ChunkQueuePopper builds the infrastructure to exchange memory chunks between different data producers and consumers that could be located in different processes. A ChunkQueuePopper is used to build elements of higher abstraction layers that also do memory managemet and provide an API towards the real user.
More...
#include <chunk_queue_popper.hpp>
|
using | MemberType_t = ChunkQueueDataType |
|
|
const MemberType_t * | getMembers () const noexcept |
|
MemberType_t * | getMembers () noexcept |
|
template<typename ChunkQueueDataType>
class iox::popo::ChunkQueuePopper< ChunkQueueDataType >
The ChunkQueuePopper is the low layer building block to receive SharedChunks. It follows a first-in-first-out principle. Together with the ChunkDistributor and the ChunkQueuePusher, the ChunkQueuePopper builds the infrastructure to exchange memory chunks between different data producers and consumers that could be located in different processes. A ChunkQueuePopper is used to build elements of higher abstraction layers that also do memory managemet and provide an API towards the real user.
◆ empty()
template<typename ChunkQueueDataType >
pop a chunk from the chunk queue
- Returns
- if the queue is empty return true, otherwise false
◆ getCurrentCapacity()
template<typename ChunkQueueDataType >
get the current capacity of the queue.
- Returns
- current queue capacity
◆ getMaximumCapacity()
template<typename ChunkQueueDataType >
get the maximum capacity of the queue.
- Returns
- maximum capacity of this queue
◆ hasLostChunks()
template<typename ChunkQueueDataType >
check if chunks were lost and reset flag
- Returns
- true if the underlying queue has lost chunks due to an overflow since the last call of this method
◆ isConditionVariableSet()
template<typename ChunkQueueDataType >
Returns the information whether a condition variable is attached.
- Returns
- true if condition variable is set, false if not
◆ setCapacity()
template<typename ChunkQueueDataType >
set the capacity of the queue
- Parameters
-
[in] | newCapacity | valid values are 0 < newCapacity < MAX_SUBSCRIBER_QUEUE_CAPACITY |
- Precondition
- it is important that no pop or push calls occur during this call
- Concurrent:
- not thread safe
◆ setConditionVariable()
template<typename ChunkQueueDataType >
Attaches a condition variable.
- Parameters
-
[in] | ConditionVariableDataPtr,pointer | to an condition variable data object |
◆ size()
template<typename ChunkQueueDataType >
get the current size of the queue. Caution, another thread can have changed the size just after reading it
- Returns
- queue size
◆ tryPop()
template<typename ChunkQueueDataType >
pop a chunk from the chunk queue
- Returns
- optional for a shared chunk that is set if the queue is not empty
The documentation for this class was generated from the following files:
- iceoryx_posh/internal/popo/building_blocks/chunk_queue_popper.hpp
- iceoryx_posh/internal/popo/building_blocks/chunk_queue_popper.inl