Struct ChannelSet¶
Defined in File remote_data_loader_backend.hpp
Struct Documentation¶
-
struct ChannelSet¶
A helper for building topic and schema metadata for a StreamedSource.
Handles schema extraction from Foxglove schema types, schema ID assignment, and deduplication. If multiple channels share the same schema, only one schema entry will be created.
foxglove::remote_data_loader_backend::ChannelSet channels; channels.insert<foxglove::messages::Vector3>("/topic1"); channels.insert<foxglove::messages::Vector3>("/topic2"); // reuses schema ID foxglove::remote_data_loader_backend::StreamedSource source; source.topics = std::move(channels.topics); source.schemas = std::move(channels.schemas);
Public Functions
-
template<typename T>
inline void insert(const std::string &topic)¶ Insert a channel for schema type
Ton the given topic.Tmust have a staticschema()method returningfoxglove::Schema(all generated types infoxglove::messagessatisfy this). The message encoding is assumed to be “protobuf”.- Template Parameters:
T – A Foxglove schema type (e.g.
foxglove::messages::Vector3).- Parameters:
topic – The topic name for this channel.
- Throws:
std::overflow_error – if more than 65535 distinct schemas are added.
-
template<typename T>