RTC Toolkit 6.0.0-pre2
Loading...
Searching...
No Matches
rtctk::componentFramework::TelegrafAdapter Class Reference

Implementation of the Telegraf Adapter. More...

#include <rtctk/componentFramework/telegrafAdapter.hpp>

Public Member Functions

 TelegrafAdapter ()=delete
 Do not allow construction with no arguments.
 
 TelegrafAdapter (const TelegrafAdapter &)=delete
 This class cannot be copy constructed.
 
TelegrafAdapteroperator= (const TelegrafAdapter &)=delete
 This class cannot be copy assigned.
 
 TelegrafAdapter (const elt::mal::Uri &uri, std::string component)
 Constructs an adapter for Telegraf communication.
 
 ~TelegrafAdapter ()=default
 
std::map< std::string, std::string > BaseTags ()
 Constructs and returns a map of base tags for InfluxDB.
 
void SendPoints (const std::vector< InfluxPoint > &points)
 Sends vector of points to Telegraf using UDP and Influx line protocol.
 

Detailed Description

Implementation of the Telegraf Adapter.

Constructor & Destructor Documentation

◆ TelegrafAdapter() [1/3]

rtctk::componentFramework::TelegrafAdapter::TelegrafAdapter ( )
delete

Do not allow construction with no arguments.

◆ TelegrafAdapter() [2/3]

rtctk::componentFramework::TelegrafAdapter::TelegrafAdapter ( const TelegrafAdapter & )
delete

This class cannot be copy constructed.

◆ TelegrafAdapter() [3/3]

rtctk::componentFramework::TelegrafAdapter::TelegrafAdapter ( const elt::mal::Uri & uri,
std::string component )
explicit

Constructs an adapter for Telegraf communication.

Parameters
[in]uriAn URI address where Telegraf is running, e.g.: udp://127.0.0.1:8081, null://npe
[in]componentA name of component, e.g.: tel_repub_1

◆ ~TelegrafAdapter()

rtctk::componentFramework::TelegrafAdapter::~TelegrafAdapter ( )
default

Member Function Documentation

◆ BaseTags()

std::map< std::string, std::string > rtctk::componentFramework::TelegrafAdapter::BaseTags ( )

Constructs and returns a map of base tags for InfluxDB.

These tags typically include default metadata that should be attached to most InfluxDB measurements (e.g., hostname, component name, or pid).

One may use this method as a starting point for building the full set of tags. After obtaining the base tags, additional custom tags can easily be inserted or overridden as needed.

Returns
A map containing the base InfluxDB tags.

◆ operator=()

TelegrafAdapter & rtctk::componentFramework::TelegrafAdapter::operator= ( const TelegrafAdapter & )
delete

This class cannot be copy assigned.

◆ SendPoints()

void rtctk::componentFramework::TelegrafAdapter::SendPoints ( const std::vector< InfluxPoint > & points)

Sends vector of points to Telegraf using UDP and Influx line protocol.

This method is thread-safe. Multiple threads can call SendPoints() concurrently; all calls are serialised internally using a mutex to prevent concurrent access to the UDP socket.

Parameters
pointsvector of InfluxDB points.

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