iceoryx2 Building Blocks (BB) Container
This is a support library for iceoryx2 which comes with containers that are compatible with shared memory and can be used to construct custom payload types for inter-process communication.
Most containers come in 3 variations:
FixedSize*Container*, compile-time fixed size version. The capacity must be known at compile time. Those fixed-size constructs are always self-contained, meaning that the required memory is part of the constructs and usually stored in some kind of array.Relocatable*Container*, run-time fixed size version that is shared memory compatible. The capacity must be known when the object is created. This object is not movable!*Container*, run-time fixed size version that is not shared memory compatible but can be moved. The memory is by default stored on the heap.
Example
1. Compile-Time FixedSize Containers
We create a struct consisting of compile-time fixed size containers that can be used for zero copy inter-process communication.
use *;
use *;
const TEXT_CAPACITY: usize = 123;
const DATA_CAPACITY: usize = 456;
#
2. Shared Memory Compatible Run-Time FixedSize Containers
Despite that the containers are already implemented, iceoryx2 itself does not yet support run-time fixed size types. It is planned and will be part of an upcoming release.
3. Run-Time FixedSize Containers
We create a struct consisting of run-time fixed size containers. This can be interesting when it shall be used in a safety-critical environment where everything must be pre-allocated to ensure that required memory is always available.
use *;
const QUEUE_CAPACITY: usize = 123;
#