|
nros C++ API
Lightweight ROS 2 client for embedded real-time systems (C++ headers)
|
#include <fixed_sequence.hpp>
Public Member Functions | |
| T * | begin () |
| Iterator support. | |
| const T * | begin () const |
| T * | end () |
| const T * | end () const |
| FixedSequence () | |
| Default constructor — empty sequence. | |
| uint32_t | length () const |
| Current number of elements. | |
| T & | operator[] (size_t i) |
| Access element by index (no bounds check). | |
| const T & | operator[] (size_t i) const |
| bool | push_back (const T &val) |
| Append an element. Returns false if the sequence is full. | |
Static Public Member Functions | |
| static constexpr size_t | max_size () |
| Maximum capacity. | |
Public Attributes | |
| T | data [N] |
| uint32_t | size |
Fixed-capacity sequence container.
Wraps a uint32_t size + T data[N] pair with push/access methods. Memory layout is identical to struct { uint32_t size; T data[N]; }, so the type is C-ABI compatible with the runtime.
Usage:
Default constructor — empty sequence.
Current number of elements.
Maximum capacity.
Access element by index (no bounds check).
Append an element. Returns false if the sequence is full.