|
VLink
2.1.0
A high-performance communication middleware
|
Unified runtime parser for built-in VLink zero-copy wire messages. More...
#include <array>#include <cstddef>#include <cstdint>#include <string>#include <string_view>#include <variant>#include <vector>#include "../base/bytes.h"#include "../base/macros.h"#include "./audio_frame.h"#include "./camera_frame.h"#include "./object_array.h"#include "./occupancy_grid.h"#include "./point_cloud.h"#include "./proxy_data.h"#include "./raw_data.h"#include "./tensor.h"Go to the source code of this file.
Classes | |
| class | vlink::zerocopy::MessageParser |
| Unified parser and field reader for built-in zero-copy messages. More... | |
| struct | vlink::zerocopy::MessageParser::Field |
| Schema-neutral field descriptor returned by field enumeration. More... | |
| struct | vlink::zerocopy::MessageFormatOptions |
Presentation toggles for format_message. More... | |
Namespaces | |
| vlink | |
| vlink::zerocopy | |
Functions | |
| VLINK_EXPORT std::string | vlink::zerocopy::format_message (const MessageParser &parser, const MessageFormatOptions &options, bool *truncated=nullptr) |
| Renders a parsed zero-copy message as canonical human-readable text. More... | |
Unified runtime parser for built-in VLink zero-copy wire messages.
MessageParser centralises type detection, deserialization, indexed field access, collection bounds, and exact integer representation for all eight built-in VLink zero-copy wire types. Root paths use names such as header.time_meas and width. Indexed payloads use data[N].field; tensors additionally expose shape[N] and strides[N].
Integer fields remain int64_t or uint64_t in MessageParser::Value. Conversion through numeric reports values outside the exact IEEE-754 integer range. Deserialized containers borrow the input wire storage; the input must therefore outlive the parser and any returned Bytes view.
* serialized type + wire Bytes * | * v * MessageParser::detect_type * | * v * MessageParser::parse ---- failure ----> invalid / empty state * | * +----> exact field: value(path) * | * +----> collection: value(name, index, field) *
| Payload kind | Example path | Value alternative |
|---|---|---|
| Header / metadata | header.time_meas | uint64_t |
| Point record | data[4].intensity | Schema-dependent |
| Object record | objects[2].track_id | uint64_t |
| Grid / tensor cell | data[7] | Dtype-dependent |
| Tensor dimension | shape[1] / strides[1] | uint64_t |
| Raw payload | data / raw | Borrowed Bytes |
| Message type | Indexed collections | Element field form |
|---|---|---|
RawData | None | — |
CameraFrame | None | — |
PointCloud | data / points | Dynamic point key |
ProxyData | None | — |
OccupancyGrid | data / cells | Empty or value |
Tensor | data / elements, shape, strides | Empty or value |
ObjectArray | data / objects | Object member or alias |
AudioFrame | data | Empty or value |