Public Member Functions | Private Attributes | List of all members
swarmio::services::telemetry::Tracker Class Referencefinal

Telemetry Service can subscribe to receive updates from remote nodes on named values. More...

#include <Tracker.h>

Public Member Functions

uint32_t GetAndIncrementTick ()
 Increment current tick and return value. More...
 
uint64_t GetIdentifier () const
 Get original message identifier. More...
 
const NodeGetNode () const
 Get target node. More...
 
const data::telemetry::SubscribeRequest & GetRequest () const
 Get original request. More...
 
uint32_t GetTick () const
 Get current tick. More...
 
void Invalidate ()
 Mark the tracker as invalid. More...
 
bool IsValid () const
 Is the tracker still valid? More...
 
 Tracker (const Node *node, uint64_t identifier, const data::telemetry::SubscribeRequest &request)
 Construct a new Tracker object. More...
 

Private Attributes

std::atomic< uint32_t > _currentTick
 Tick counter for the updates. More...
 
uint64_t _identifier
 The identifier of the original request. More...
 
const Node_node
 Subscriber. More...
 
data::telemetry::SubscribeRequest _request
 The original subscribe request. More...
 
std::atomic< bool > _valid
 Is the tracker still valid. More...
 

Detailed Description

Telemetry Service can subscribe to receive updates from remote nodes on named values.

Definition at line 16 of file Tracker.h.

Constructor & Destructor Documentation

swarmio::services::telemetry::Tracker::Tracker ( const Node node,
uint64_t  identifier,
const data::telemetry::SubscribeRequest &  request 
)
inline

Construct a new Tracker object.

Parameters
nodeSubscriber
identifierMessage identifier
requestRequest body

Definition at line 59 of file Tracker.h.

Member Function Documentation

uint32_t swarmio::services::telemetry::Tracker::GetAndIncrementTick ( )
inline

Increment current tick and return value.

Returns
uint32_t

Definition at line 108 of file Tracker.h.

uint64_t swarmio::services::telemetry::Tracker::GetIdentifier ( ) const
inline

Get original message identifier.

Returns
uint64_t Identifier

Definition at line 68 of file Tracker.h.

const Node* swarmio::services::telemetry::Tracker::GetNode ( ) const
inline

Get target node.

Returns
const Node* Node

Definition at line 78 of file Tracker.h.

const data::telemetry::SubscribeRequest& swarmio::services::telemetry::Tracker::GetRequest ( ) const
inline

Get original request.

Returns
const data::telemetry::SubscribeRequest&

Definition at line 88 of file Tracker.h.

uint32_t swarmio::services::telemetry::Tracker::GetTick ( ) const
inline

Get current tick.

Returns
uint32_t

Definition at line 98 of file Tracker.h.

void swarmio::services::telemetry::Tracker::Invalidate ( )
inline

Mark the tracker as invalid.

Definition at line 127 of file Tracker.h.

bool swarmio::services::telemetry::Tracker::IsValid ( ) const
inline

Is the tracker still valid?

Returns
True if updates should still be sent

Definition at line 118 of file Tracker.h.

Member Data Documentation

std::atomic<uint32_t> swarmio::services::telemetry::Tracker::_currentTick
private

Tick counter for the updates.

Definition at line 42 of file Tracker.h.

uint64_t swarmio::services::telemetry::Tracker::_identifier
private

The identifier of the original request.

Definition at line 30 of file Tracker.h.

const Node* swarmio::services::telemetry::Tracker::_node
private

Subscriber.

Definition at line 24 of file Tracker.h.

data::telemetry::SubscribeRequest swarmio::services::telemetry::Tracker::_request
private

The original subscribe request.

Definition at line 36 of file Tracker.h.

std::atomic<bool> swarmio::services::telemetry::Tracker::_valid
private

Is the tracker still valid.

Definition at line 48 of file Tracker.h.


The documentation for this class was generated from the following file:


swarmros
Author(s):
autogenerated on Fri Apr 3 2020 03:42:48