ClassFlowInfluxDB.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #pragma once
  2. #ifndef CLASSFINFLUXDB_H
  3. #define CLASSFINFLUXDB_H
  4. #include <string>
  5. #include "ClassFlow.h"
  6. #include "ClassFlowPostProcessing.h"
  7. #include "interface_influxdb.h"
  8. typedef struct
  9. {
  10. bool enabled;
  11. std::string uri;
  12. std::string database;
  13. std::string measurement;
  14. std::string user;
  15. std::string password;
  16. std::string oldValue;
  17. } influxDBv1_controll_config_t;
  18. extern influxDBv1_controll_config_t influxDBv1_controll_config;
  19. class ClassFlowInfluxDB : public ClassFlow
  20. {
  21. protected:
  22. InfluxDB influxDB;
  23. ClassFlowPostProcessing *flowpostprocessing;
  24. void SetInitialParameter(void);
  25. void handleFieldname(std::string _decsep, std::string _value);
  26. void handleMeasurement(std::string _decsep, std::string _value);
  27. public:
  28. ClassFlowInfluxDB();
  29. ClassFlowInfluxDB(std::vector<ClassFlow *> *lfc);
  30. ClassFlowInfluxDB(std::vector<ClassFlow *> *lfc, ClassFlow *_prev);
  31. bool ReadParameter(FILE *pfile, std::string &aktparamgraph);
  32. bool doFlow(std::string temp_time);
  33. std::string name() { return "ClassFlowInfluxDB"; };
  34. };
  35. #endif // CLASSFINFLUXDB_H