|
RTC Toolkit 6.0.0-pre2
|
Represents a single data point for InfluxDB. More...
#include <rtctk/componentFramework/telegrafAdapter.hpp>
Public Member Functions | |
| std::string | ToLineProtocol () const |
| Encodes data to InfluxDB line protocol format. | |
Public Attributes | |
| std::string | table_name |
| Name of the table. | |
| std::map< std::string, std::string > | tags |
| Tags are indexed key–value pairs used for efficient filtering. | |
| std::map< std::string, FieldValue > | fields |
| Fields hold the measured data values. | |
| std::optional< std::chrono::nanoseconds > | timestamp = std::nullopt |
| Optional timestamp of the measurement. | |
Represents a single data point for InfluxDB.
This structure models one point record compatible with the InfluxDB line protocol. Each point consists of a table name (measurement), a set of key–value tags, a set of numeric fields, and an optional timestamp with nanosecond precision.
| std::string rtctk::componentFramework::InfluxPoint::ToLineProtocol | ( | ) | const |
Encodes data to InfluxDB line protocol format.
Converts the contents of this structure into a valid InfluxDB line protocol string.
Example output:
| std::map<std::string, FieldValue> rtctk::componentFramework::InfluxPoint::fields |
Fields hold the measured data values.
They are not indexed.
Example: { "value_hz": 3.2 }.
| std::string rtctk::componentFramework::InfluxPoint::table_name |
Name of the table.
Example: metrics, state, cpu_usage.
| std::map<std::string, std::string> rtctk::componentFramework::InfluxPoint::tags |
Tags are indexed key–value pairs used for efficient filtering.
Example: { "hostname": "server01", "metric_type": "frequency_estimate" }.
| std::optional<std::chrono::nanoseconds> rtctk::componentFramework::InfluxPoint::timestamp = std::nullopt |
Optional timestamp of the measurement.
If not specified, the current server time will be used. Expressed in nanoseconds since the UNIX epoch.