|
nros C++ API
Lightweight ROS 2 client for embedded real-time systems (C++ headers)
|
#include <span.hpp>
Public Member Functions | |
| constexpr const T * | begin () const |
| Iterator to the first element. | |
| constexpr const T * | data () const |
| Pointer to the underlying storage. | |
| constexpr bool | empty () const |
| True if the view contains zero elements. | |
| constexpr const T * | end () const |
| Iterator past the last element. | |
| constexpr const T & | operator[] (size_t i) const |
| Element access; no bounds check. | |
| constexpr size_t | size () const |
Number of elements (alias for len). | |
Public Attributes | |
| size_t | len |
| Number of elements in the view. | |
| const T * | ptr |
| Pointer to the first element. Borrowed — caller-owned storage. | |
Non-owning view over a contiguous sequence of T values.
Same semantics as std::span<const T> but requires only C++14. The data pointer is valid only for the lifetime of the source buffer (typically the subscription callback scope).
Iterator to the first element.
Pointer to the underlying storage.
True if the view contains zero elements.
Iterator past the last element.
Element access; no bounds check.
Number of elements (alias for len).
| size_t nros::Span< T >::len |
Number of elements in the view.
Pointer to the first element. Borrowed — caller-owned storage.