17#ifndef IOX_POSH_MEPOO_CHUNK_SETTINGS_HPP
18#define IOX_POSH_MEPOO_CHUNK_SETTINGS_HPP
20#include "iceoryx_hoofs/cxx/expected.hpp"
21#include "iceoryx_posh/iceoryx_posh_types.hpp"
34 ALIGNMENT_NOT_POWER_OF_TWO,
35 USER_HEADER_ALIGNMENT_EXCEEDS_CHUNK_HEADER_ALIGNMENT,
36 USER_HEADER_SIZE_NOT_MULTIPLE_OF_ITS_ALIGNMENT,
37 REQUIRED_CHUNK_SIZE_EXCEEDS_MAX_CHUNK_SIZE,
46 static cxx::expected<ChunkSettings, ChunkSettings::Error>
79 static uint64_t calculateRequiredChunkSize(const uint32_t
userPayloadSize,
84 uint32_t m_userPayloadSize{0U};
85 uint32_t m_userPayloadAlignment{0U};
86 uint32_t m_userHeaderSize{0U};
87 uint32_t m_userHeaderAlignment{0U};
88 uint32_t m_requiredChunkSize{0U};
Definition: chunk_settings.hpp:30
uint32_t userHeaderAlignment() const noexcept
getter method for the user-header alignment
static cxx::expected< ChunkSettings, ChunkSettings::Error > create(const uint32_t userPayloadSize, const uint32_t userPayloadAlignment=iox::CHUNK_DEFAULT_USER_PAYLOAD_ALIGNMENT, const uint32_t userHeaderSize=iox::CHUNK_NO_USER_HEADER_SIZE, const uint32_t userHeaderAlignment=iox::CHUNK_NO_USER_HEADER_ALIGNMENT) noexcept
constructs and initializes a ChunkSettings
uint32_t userHeaderSize() const noexcept
getter method for the user-header size
uint32_t userPayloadSize() const noexcept
getter method for the user-payload size
uint32_t userPayloadAlignment() const noexcept
getter method for the user-payload alignment
uint32_t requiredChunkSize() const noexcept
getter method for the chunk size fulfilling the user-payload and user-header requirements