mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 04:26:58 +03:00
* Migrated parameters, see https://github.com/jomjol/AI-on-the-edge-device/pull/2023
* remove no longer used "topic" parameter. This is a backport from b21e3c6c9d
* Fix wrong url-encoding, see https://github.com/jomjol/AI-on-the-edge-device/issues/2036 resp. https://github.com/jomjol/AI-on-the-edge-device/issues/2036
* Threashold -> Threshold
* updated changelog
---------
Co-authored-by: CaCO3 <caco@ruinelli.ch>
42 lines
993 B
C++
42 lines
993 B
C++
#ifdef ENABLE_MQTT
|
|
|
|
#pragma once
|
|
|
|
#ifndef CLASSFFLOWMQTT_H
|
|
#define CLASSFFLOWMQTT_H
|
|
|
|
#include "ClassFlow.h"
|
|
|
|
#include "ClassFlowPostProcessing.h"
|
|
|
|
#include <string>
|
|
|
|
class ClassFlowMQTT :
|
|
public ClassFlow
|
|
{
|
|
protected:
|
|
std::string uri, topic, topicError, clientname, topicRate, topicTimeStamp, topicUptime, topicFreeMem;
|
|
std::string OldValue;
|
|
ClassFlowPostProcessing* flowpostprocessing;
|
|
std::string user, password;
|
|
bool SetRetainFlag;
|
|
int keepAlive; // Seconds
|
|
float roundInterval; // Minutes
|
|
|
|
std::string maintopic;
|
|
void SetInitialParameter(void);
|
|
|
|
public:
|
|
ClassFlowMQTT();
|
|
ClassFlowMQTT(std::vector<ClassFlow*>* lfc);
|
|
ClassFlowMQTT(std::vector<ClassFlow*>* lfc, ClassFlow *_prev);
|
|
|
|
string GetMQTTMainTopic();
|
|
bool Start(float AutoInterval);
|
|
|
|
bool ReadParameter(FILE* pfile, string& aktparamgraph);
|
|
bool doFlow(string time);
|
|
string name(){return "ClassFlowMQTT";};
|
|
};
|
|
#endif //CLASSFFLOWMQTT_H
|
|
#endif //ENABLE_MQTT
|