|
VLink
2.3.0
A high-performance communication middleware
|
Plugin contract for converting VLink payloads to visualisation backend formats. More...
#include <cstdint>#include <string>#include "../base/bytes.h"#include "../base/plugin.h"#include "../impl/types.h"Go to the source code of this file.
Classes | |
| class | vlink::ConvertPluginInterface |
| Abstract plugin base translating between VLink payloads and visualisation backends. More... | |
| struct | vlink::ConvertPluginInterface::SchemaInfo |
Backend channel schema metadata returned by get_schema(). More... | |
| struct | vlink::ConvertPluginInterface::FrontendChannel |
| Frontend-advertised channel description used by inbound conversion hooks. More... | |
| struct | vlink::ConvertPluginInterface::PublishInfo |
| VLink publish destination resolved from an inbound frontend channel. More... | |
Namespaces | |
| vlink | |
Plugin contract for converting VLink payloads to visualisation backend formats.
ConvertPluginInterface lets users supply custom encoders that translate raw VLink messages – in any serialisation – into the payload format expected by a particular webviz frontend. The plugin is loaded as a shared library via the VLink Plugin framework and has no third-party dependencies of its own: it consumes Bytes and emits Bytes, so consumers may implement it without linking Protobuf, FlatBuffers, the Rerun SDK or any JSON library.
Conversion pipeline:
* can_convert(ser, target)? * VLink Bytes -----> +-----------------------+ * | ConvertPluginInterface | --get_schema(ser, target, info)--> channel registration * +-----------------------+ * | * v convert(ser, raw, target, payload) * backend Bytes ---> Foxglove / Rerun frontend *
Supported source/target combinations and the meaning of each output field:
Target | Wire payload | SchemaInfo::type_name meaning |
|---|---|---|
kFoxglove | FlatBuffer / Protobuf binary bytes | Foxglove schema name |
kRerun | UTF-8 JSON describing components | Rerun archetype name |
{"base64":"..."} object.Fields and component layouts come from the linked SDK: vectors are arrays, matrices are flat column-major arrays, structs are objects, and tagged unions are single-key objects such as {"F32":[1.0,2.0]}. Enum strings use SDK names. Image components use format and buffer; Tensor uses {"data":{"shape":[2],"buffer":{"F32":[1.0,2.0]}}}. Binary numeric lists use little-endian values of the declared component type. Integer components reject fractions and overflow; floating components retain NaN and infinity when the source representation supports them. Missing components are omitted. Empty component batches clear their values; an empty Blob array is one empty Blob. RecordingInfo is logged statically at the SDK recording-properties path. Field mappings use this same writer.
Plugin lifecycle:
init() runs once after dynamic load, with an opaque configuration string.can_convert() is queried per discovered VLink serialisation type, per target.get_schema() registers the channel and refreshes dynamic output schemas.convert() runs for every incoming payload on accepted types.can_publish(), get_publish(), convert_publish()) handle inbound frontend command/control flows.