mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-07 03:56:57 +03:00
* Rename module tag name * Rename server_tflite.cpp -> MainFlowControl.cpp * Remove redundandant MQTTMainTopic function * Update * Remove obsolete GetMQTTMainTopic
41 lines
962 B
C++
41 lines
962 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);
|
|
|
|
bool Start(float AutoInterval);
|
|
|
|
bool ReadParameter(FILE* pfile, string& aktparamgraph);
|
|
bool doFlow(string time);
|
|
string name(){return "ClassFlowMQTT";};
|
|
};
|
|
#endif //CLASSFFLOWMQTT_H
|
|
#endif //ENABLE_MQTT
|