|
VLink 2.0.0
A high-performance communication middleware
|
Generic zero-copy raw-byte data container for VLink transport. More...
Go to the source code of this file.
Namespaces | |
| namespace | vlink |
| namespace | vlink::zerocopy |
Functions | |
| struct | vlink::zerocopy::VLINK_EXPORT_AND_ALIGNED (8) CameraFrame final |
Generic zero-copy raw-byte data container for VLink transport.
RawData wraps an untyped byte buffer together with a Header for sequencing and timestamping. It is the simplest zero-copy container in VLink and serves as a building block when the payload format is opaque or application-defined.
The struct is exactly 64 bytes on 64-bit platforms (verified via static_assert). Three ownership modes allow callers to manage memory without extra copies wherever possible:
| Mode | Created by | Owns memory |
|---|---|---|
| Owned | create(size) | Yes |
| Shallow (borrow) | shallow_copy(ptr, size) | No |
| Deserialised | operator<<(bytes) | No |
memcpy-ing the struct header.operator<<, the internal data pointer references memory inside the source Bytes object. The Bytes must outlive the RawData.fill_data is an alias for deep_copy(uint8_t*, size_t).