Struct SubscriptionRequest
Defined in File SubscriptionRequest.hpp
Struct Documentation
-
struct SubscriptionRequest
Struct for a subscription request.
Public Members
-
std::uint64_t tag = {}
Tag of data being subscribed/unsubscribed.
-
std::string addr = {}
Endpoint address of subscriber.
-
std::uint16_t data_port = {}
Endpoint port of subscriber.
-
std::uint16_t ack_port = {}
Endpoint port to which acknowledgement should be sent. Since we use a bi-directional connection between subscriber and publisher this is the port that the subscriber sends the request out through.
Public Static Functions
-
static std::string to_json(const SubscriptionRequest &req)
Serialize a SubscriptionRequest to a JSON string.
- Parameters:
req – The SubscriptionRequest to serialize
- Returns:
The JSON string
-
static SubscriptionRequest from_json(const std::string &req)
Deserialize a SubscriptionRequest from a JSON string.
- Parameters:
req – The JSON string to deserialize
- Throws:
SubscriptionParseError – if the JSON is invalid
- Returns:
-
std::uint64_t tag = {}