4 #include <swarmio/data/Variant.pb.h> 5 #include <swarmio/data/telemetry/SubscribeRequest.pb.h> 59 Tracker(
const Node* node, uint64_t identifier,
const data::telemetry::SubscribeRequest& request)
60 : _identifier(identifier), _request(request), _node(node), _currentTick(0), _valid(true) { }
88 const data::telemetry::SubscribeRequest&
GetRequest()
const 110 return _currentTick++;
data::telemetry::SubscribeRequest _request
The original subscribe request.
const Node * GetNode() const
Get target node.
uint32_t GetAndIncrementTick()
Increment current tick and return value.
std::atomic< uint32_t > _currentTick
Tick counter for the updates.
const data::telemetry::SubscribeRequest & GetRequest() const
Get original request.
Telemetry Service can subscribe to receive updates from remote nodes on named values.
const Node * _node
Subscriber.
Tracker(const Node *node, uint64_t identifier, const data::telemetry::SubscribeRequest &request)
Construct a new Tracker object.
bool IsValid() const
Is the tracker still valid?
uint64_t GetIdentifier() const
Get original message identifier.
uint32_t GetTick() const
Get current tick.
void Invalidate()
Mark the tracker as invalid.
std::atomic< bool > _valid
Is the tracker still valid.
Represents a Node the Endpoint knows about and can send messages to.
uint64_t _identifier
The identifier of the original request.