160 #include "../base/bytes.h"
161 #include "../base/plugin.h"
162 #include "../impl/types.h"
246 virtual bool init(
const std::string& config) = 0;
Fixed-size 128-byte buffer holder with SBO, five ownership modes and integrated codecs.
Definition: bytes.h:120
Abstract plugin base translating between VLink payloads and visualisation backends.
Definition: convert_plugin_interface.h:176
ConvertPluginInterface()=default
virtual ~ConvertPluginInterface()=default
virtual bool convert(const std::string &ser_type, const Bytes &raw, Target target, Bytes &payload)=0
Converts a single raw VLink payload to the backend-specific representation.
virtual bool get_publish(const FrontendChannel &channel, Target target, PublishInfo &publish_info)
Resolves the VLink publish destination for an inbound frontend channel.
Definition: convert_plugin_interface.h:333
Target
Visualisation backend identifier carried by every conversion hook.
Definition: convert_plugin_interface.h:193
@ kRerun
Rerun Viewer (gRPC + Arrow IPC; plugin payload is UTF-8 JSON).
@ kFoxglove
Foxglove Studio (WebSocket transport, FlatBuffers/Protobuf payloads).
virtual bool can_publish(const FrontendChannel &channel, Target target)
Inbound counterpart of can_convert() for frontend-published channels.
Definition: convert_plugin_interface.h:320
virtual bool can_convert(const std::string &ser_type, Target target)=0
Reports whether this plugin handles a (serialisation, target) pair.
virtual bool get_schema(const std::string &ser_type, Target target, SchemaInfo &schema_info)=0
Provides schema metadata for an accepted (serialisation, target) pair.
virtual int64_t get_timestamp(const std::string &ser_type, const Bytes &raw, Target target)
Optionally extracts a per-message timestamp from the raw payload.
Definition: convert_plugin_interface.h:306
virtual bool convert_publish(const FrontendChannel &channel, const Bytes &raw, Target target, Bytes &payload)
Converts a frontend-published payload into a raw VLink payload.
Definition: convert_plugin_interface.h:347
virtual bool init(const std::string &config)=0
Initialises the plugin with an opaque configuration string.
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
Definition: macros.h:174
SchemaType
Coarse runtime schema family used by discovery, bag metadata and proxy routing.
Definition: types.h:207
@ kUnknown
Decoding family unknown.
#define VLINK_PLUGIN_REGISTER(InterfaceType)
Declares a plugin's identity from the demangled name of its abstract interface.
Definition: plugin.h:345
Frontend-advertised channel description used by inbound conversion hooks.
Definition: convert_plugin_interface.h:217
std::string encoding
Frontend payload encoding (json/protobuf/flatbuffers/...).
Definition: convert_plugin_interface.h:219
std::string topic
Channel topic advertised by the frontend client.
Definition: convert_plugin_interface.h:218
std::string schema_name
Frontend-side schema or type name.
Definition: convert_plugin_interface.h:220
std::string schema
Raw schema string or binary payload (transport-specific).
Definition: convert_plugin_interface.h:222
std::string schema_encoding
Encoding of schema when provided.
Definition: convert_plugin_interface.h:221
VLink publish destination resolved from an inbound frontend channel.
Definition: convert_plugin_interface.h:229
SchemaType schema_type
Coarse schema family for the published payload.
Definition: convert_plugin_interface.h:232
std::string url
Destination VLink URL (e.g. "dds://vehicle/cmd").
Definition: convert_plugin_interface.h:230
std::string ser_type
Destination VLink serialisation type.
Definition: convert_plugin_interface.h:231
Backend channel schema metadata returned by get_schema().
Definition: convert_plugin_interface.h:202
std::string type_name
Backend schema or archetype name.
Definition: convert_plugin_interface.h:203
std::string encoding
Wire encoding label (e.g. "flatbuffers", "json").
Definition: convert_plugin_interface.h:204
std::string schema_encoding
Encoding of schema_data when provided.
Definition: convert_plugin_interface.h:205
std::string schema_data
Binary schema bytes or schema text, depending on target.
Definition: convert_plugin_interface.h:206