4#include "detail/compat.hpp"
11inline constexpr std::string_view NAMESPACE =
"spBv1.0";
23enum class MessageType {
78 [[nodiscard]]
static stdx::expected<Topic, std::string>
79 parse(std::string_view topic_str);
Represents a parsed Sparkplug B MQTT topic.
std::string device_id
Device identifier (empty for node-level messages)
std::string edge_node_id
Edge node identifier.
std::string group_id
Group ID (topic namespace)
static stdx::expected< Topic, std::string > parse(std::string_view topic_str)
Parses a Sparkplug B topic string.
std::string to_string() const
Converts the topic back to a string.
MessageType message_type
Message type (NBIRTH, NDATA, etc.)