|
VLink
2.0.0
A high-performance communication middleware
|
Plugin contract for converting VLink payloads to visualisation backend formats. 更多...
#include <cstdint>#include <string>#include "../base/bytes.h"#include "../base/plugin.h"#include "../impl/types.h"类 | |
| class | vlink::ConvertPluginInterface |
| Abstract plugin base translating between VLink payloads and visualisation backends. 更多... | |
| struct | vlink::ConvertPluginInterface::SchemaInfo |
Backend channel schema metadata returned by get_schema(). 更多... | |
| struct | vlink::ConvertPluginInterface::FrontendChannel |
| Frontend-advertised channel description used by inbound conversion hooks. 更多... | |
| struct | vlink::ConvertPluginInterface::PublishInfo |
| VLink publish destination resolved from an inbound frontend channel. 更多... | |
命名空间 | |
| 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 |
data_base64 field.The built-in Rerun JSON bridge currently handles data_base64 for EncodedImage, Image, DepthImage, SegmentationImage, EncodedDepthImage, Asset3D, AssetVideo and Tensor. Image, DepthImage and SegmentationImage also require width / height (or resolution). Tensor additionally requires shape and may provide dim_names. Direct VLink-to-Rerun mappings still cover a broader set of archetypes than the JSON bridge.
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() is called once per accepted type to register the channel.convert() runs for every incoming payload on accepted types.can_publish(), get_publish(), convert_publish()) handle inbound frontend command/control flows.