rrd_api_mqtt.h 802 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // SPDX-License-Identifier: GPL-3.0-or-later
  2. /** @file rrd_api_mqtt.h
  3. * @brief Incudes the structure and function definitions
  4. * for the mqtt log charts.
  5. */
  6. #ifndef RRD_API_MQTT_H_
  7. #define RRD_API_MQTT_H_
  8. #include "daemon/common.h"
  9. struct File_info;
  10. typedef struct Chart_data_mqtt chart_data_mqtt_t;
  11. #include "../file_info.h"
  12. #include "../circular_buffer.h"
  13. #include "rrd_api.h"
  14. struct Chart_data_mqtt {
  15. time_t last_update;
  16. /* Number of collected log records */
  17. collected_number num_lines;
  18. /* MQTT metrics - Topic */
  19. struct Chart_str cs_topic;
  20. // Special case: Topic dimension and number are part of Mqtt_metrics_t
  21. };
  22. void mqtt_chart_init(struct File_info *p_file_info);
  23. void mqtt_chart_update(struct File_info *p_file_info);
  24. #endif // RRD_API_MQTT_H_