-
Notifications
You must be signed in to change notification settings - Fork 0
/
InfluxDBWriter.h
45 lines (37 loc) · 1.22 KB
/
InfluxDBWriter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// InfluxDBWriter.h
#ifndef INFLUXDB_WRITER_H
#define INFLUXDB_WRITER_H
#include <string>
#include <iostream>
class InfluxDBWriter {
public:
InfluxDBWriter(const char* ipAddress, int portNumber, const char* organization,
const char* bucket, const char* precision, const char* measurement,
const char* tags, const char* influxToken, size_t maxDataPointSize,
size_t maxBatchSize, const char* val_names[],
size_t val_size, const char decimal, const uint32_t batchSize);
bool writeToInfluxDB();
bool checkHealth();
bool appendToBuffer(const timespec& time1, const float* val_values);
private:
const char* ipAddress;
int portNumber;
const char* organization;
const char* bucket;
const char* precision;
const char* measurement;
const char* tags;
const char* influxToken;
size_t maxDataPointSize;
size_t maxBatchSize;
const char** val_names;
const float* val_values;
size_t val_size;
const char decimal;
const uint32_t batchSize;
char* influxUrl;
char* influxUrl_health;
char* dataPoint;
size_t dataSize;
};
#endif // INFLUXDB_WRITER_H