This are the data for a relative pointer. To be able so safely be used in the shared memory and prevent torn writes/reads, the class must not be larger than 64 bits and trivially copy-able.
More...
#include <relative_pointer_data.hpp>
|
using | id_t = uint16_t |
|
using | offset_t = uint64_t |
|
This are the data for a relative pointer. To be able so safely be used in the shared memory and prevent torn writes/reads, the class must not be larger than 64 bits and trivially copy-able.
◆ RelativePointerData()
constexpr iox::rp::RelativePointerData::RelativePointerData |
( |
id_t |
id, |
|
|
offset_t |
offset |
|
) |
| |
|
constexprnoexcept |
constructs a RelativePointerData from a given offset and segment id
- Parameters
-
[in] | id | is the unique id of the segment |
[in] | offset | is the offset within the segment |
◆ id()
id_t iox::rp::RelativePointerData::id |
( |
| ) |
const |
|
noexcept |
Getter for the id which identifies the segment.
- Returns
- the id which identifies the segment
◆ isLogicalNullptr()
bool iox::rp::RelativePointerData::isLogicalNullptr |
( |
| ) |
const |
|
noexcept |
Checks if the pointer is logically a nullptr.
- Returns
- true if logically a nullptr otherwise false
◆ offset()
offset_t iox::rp::RelativePointerData::offset |
( |
| ) |
const |
|
noexcept |
Getter for the offset within the segment.
- Returns
- the offset
◆ ID_RANGE
constexpr id_t iox::rp::RelativePointerData::ID_RANGE {std::numeric_limits<id_t>::max()} |
|
staticconstexpr |
- Note
- the maximum number of available ids
◆ LOGICAL_NULLPTR
- Note
- internal representation of a nullptr
◆ MAX_VALID_ID
constexpr id_t iox::rp::RelativePointerData::MAX_VALID_ID {ID_RANGE - 1U} |
|
staticconstexpr |
- Note
- the maximum number of valid ids
◆ MAX_VALID_OFFSET
constexpr offset_t iox::rp::RelativePointerData::MAX_VALID_OFFSET {OFFSET_RANGE - 1U} |
|
staticconstexpr |
- Note
- the maximum offset which can be represented
◆ NULL_POINTER_ID
constexpr id_t iox::rp::RelativePointerData::NULL_POINTER_ID {ID_RANGE} |
|
staticconstexpr |
- Note
- this represents the id of a logically nullptr
◆ NULL_POINTER_OFFSET
constexpr offset_t iox::rp::RelativePointerData::NULL_POINTER_OFFSET {OFFSET_RANGE} |
|
staticconstexpr |
- Note
- this represents the offset of a logically nullptr;
The documentation for this class was generated from the following files:
- iceoryx_utils/internal/relocatable_pointer/relative_pointer_data.hpp
- iceoryx_utils/internal/relocatable_pointer/relative_pointer_data.inl