10 if (message->content_case() == data::Message::ContentCase::kError)
13 if (message->error() != data::Error::NONE)
15 throw Exception(
"A remote error has occurred");
19 throw Exception(
"Unexpected acknowledge received");
22 else if (message->content_case() == data::Message::ContentCase::kKvGetResponse)
24 if (message->kv_get_response().key() ==
_key)
26 return message->kv_get_response().value();
Exception class thrown by all library classes.
virtual data::Variant ExtractResponse(const Node *node, const data::Message *message) override
Called when a response for the original message has been received.
std::string _key
The expected key in the telemetry response.
Represents a Node the Endpoint knows about and can send messages to.