|
Sparkplug B C++ Library 1.0.0
Modern C++-23 implementation of Eclipse Sparkplug B 2.2 specification
|
Represents a parsed Sparkplug B MQTT topic. More...
#include <topic.hpp>
Public Member Functions | |
| std::string | to_string () const |
| Converts the topic back to a string. | |
Static Public Member Functions | |
| static stdx::expected< Topic, std::string > | parse (std::string_view topic_str) |
| Parses a Sparkplug B topic string. | |
Public Attributes | |
| std::string | group_id |
| Group ID (topic namespace) | |
| MessageType | message_type |
| Message type (NBIRTH, NDATA, etc.) | |
| std::string | edge_node_id |
| Edge node identifier. | |
| std::string | device_id |
| Device identifier (empty for node-level messages) | |
Represents a parsed Sparkplug B MQTT topic.
Sparkplug B topics follow the format:
spBv1.0/Energy/NBIRTH/Gateway01 - Node birthspBv1.0/Energy/DBIRTH/Gateway01/Sensor01 - Device birthspBv1.0/STATE/ScadaHost1 - Primary application state
|
static |
Parses a Sparkplug B topic string.
| topic_str | Topic string to parse |
| std::string sparkplug::Topic::to_string | ( | ) | const |
Converts the topic back to a string.
| std::string sparkplug::Topic::device_id |
| std::string sparkplug::Topic::edge_node_id |
| std::string sparkplug::Topic::group_id |
| MessageType sparkplug::Topic::message_type |