|
nros C++ API
Lightweight ROS 2 client for embedded real-time systems (C++ headers)
|
#include <span.hpp>
Public Member Functions | |
| constexpr bool | empty () const |
| True if the view contains zero elements. | |
| T | operator[] (size_t i) const |
| constexpr size_t | size () const |
| Number of elements. | |
Public Attributes | |
| const uint8_t * | bytes |
| Pointer to the first element's little-endian bytes. Borrowed. | |
| size_t | count |
| Number of elements. | |
Alignment-agnostic view over a little-endian numeric sequence in the CDR receive buffer (RFC-0033 borrowed mode — the C++ analogue of Rust's nros_core::LeSliceView and C's nros_le_slice_view_*).
T is a fixed-width numeric (uint16_t, float, …). The raw LE bytes are borrowed zero-copy; operator[] decodes one element by value (no T* is ever formed into the unaligned buffer), so the buffer base need not be T-aligned. The pointer is valid only while the source buffer lives.
True if the view contains zero elements.
Decode element i (little-endian → host); no bounds check, no alignment assumption.
Number of elements.
Pointer to the first element's little-endian bytes. Borrowed.
| size_t nros::LeSpan< T >::count |
Number of elements.