mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-06 11:36:51 +03:00
* initial changes to add domoticz support * error correction * further changes * further changes * Refactoring * further refactoring * further refactoring * Update DomoticzTopicIn.md * Update NUMBER.DomoticzIDX.md * Update DomoticzTopicIn.md * Update NUMBER.DomoticzIDX.md * Update config.ini * Update edit_config_template.html * Update edit_config_template.html * Update edit_config_template.html * Update DomoticzTopicIn.md --------- Co-authored-by: CaCO3 <caco3@ruinelli.ch>
42 lines
1.1 KiB
C++
42 lines
1.1 KiB
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;
|
|
std::string caCertFilename, clientCertFilename, clientKeyFilename;
|
|
bool SetRetainFlag;
|
|
int keepAlive; // Seconds
|
|
float roundInterval; // Minutes
|
|
std::string maintopic, domoticzintopic;
|
|
void SetInitialParameter(void);
|
|
void handleIdx(string _decsep, string _value);
|
|
|
|
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
|