32 if (message->content_case() == data::Message::ContentCase::kTmUpdate)
34 return message->tm_update();
38 throw Exception(
"Last update received is invalid");
61 :
Awaiter(endpoint, requestIdentifier), _target(target)
74 data::Message request;
75 request.mutable_tm_unsubscribe_request()->set_identifier(GetIdentifier());
76 GetEndpoint()->Send(&request, _target);
const Node * _target
Target node.
A special mailbox that handles responses to a message.
UpdateAwaiter(Endpoint *endpoint, uint64_t requestIdentifier, const Node *target)
Construct a new UpdateAwaiter object.
virtual void MailboxWillBeDisconnected() noexceptoverride
On disconnect, an unsubscribe request is sent in order to stop the flow of messages gracefully...
Exception class thrown by all library classes.
virtual void MailboxWillBeDisconnected() noexcept
Called right before the mailbox is disconnected from its endpoint or if the attached endpoint is abou...
An Awaiter that has a longer lifetime and is updated periodically.
Abstract base class for Endpoint implementations.
const Node * GetTarget() const
Get target node.
virtual data::telemetry::Update ExtractResponse(const Node *node, const data::Message *message) override
Called when a response for the original message has been received.
virtual bool IsFinished() override
Telemetry update awaiters remain valid for their entire lifetime.
Represents a Node the Endpoint knows about and can send messages to.