Template Struct ChunkDistributorData

Inheritance Relationships

Base Type

  • public LockingPolicy

Derived Types

Struct Documentation

template<typename ChunkDistributorDataProperties, typename LockingPolicy, typename ChunkQueuePusherType>
struct ChunkDistributorData : public LockingPolicy

Subclassed by iox::popo::ChunkSenderData< MAX_RESPONSES_ALLOCATED_SIMULTANEOUSLY, ServerChunkDistributorData_t >, iox::popo::ChunkSenderData< MAX_REQUESTS_ALLOCATED_SIMULTANEOUSLY, ClientChunkDistributorData_t >

Public Types

using ThisType_t = ChunkDistributorData<ChunkDistributorDataProperties, LockingPolicy, ChunkQueuePusherType>
using LockGuard_t = std::lock_guard<const ThisType_t>
using ChunkQueuePusher_t = ChunkQueuePusherType
using ChunkQueueData_t = typename ChunkQueuePusherType::MemberType_t
using ChunkDistributorDataProperties_t = ChunkDistributorDataProperties
using QueueContainer_t = cxx::vector<rp::RelativePointer<ChunkQueueData_t>, ChunkDistributorDataProperties_t::MAX_QUEUES>
using HistoryContainer_t = cxx::vector<mepoo::ShmSafeUnmanagedChunk, ChunkDistributorDataProperties_t::MAX_HISTORY_CAPACITY>

Todo:

If we would make the ChunkDistributor lock-free, can we than extend the UsedChunkList to be like a ring buffer and use this for the history? This would be needed to be able to safely cleanup. Using ShmSafeUnmanagedChunk since RouDi must access this list to cleanup the chunks in case of an application crash.

Public Functions

ChunkDistributorData(const ConsumerTooSlowPolicy policy, const uint64_t historyCapacity = 0u) noexcept

Public Members

const uint64_t m_historyCapacity
QueueContainer_t m_queues
HistoryContainer_t m_history
const ConsumerTooSlowPolicy m_consumerTooSlowPolicy