mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-07 12:06:58 +03:00
3 new entries in the config section, for setting file paths for
- Root CA
- Client Certificate
- Client Private Key
(all set as expert parameters)
- logging cert filenames
added config entries for MQTT TLS
3 new entries in the config section, for setting file paths for
- Root CA
- Client Certificate
- Client Private Key
- logging cert filenames
MQTT-TLS: Updates for the PR comments
- config.ini now has default values closer to "real" life filenames
- MQTT cert entries are hidden as Expert parameters
- Fixed debug logging at MQTT interface for unhandled messages
42 lines
1.0 KiB
C++
42 lines
1.0 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;
|
|
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
|