mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2026-01-31 06:40:49 +03:00
Remove obsolete ClassFlowWriteList (#2264)
This commit is contained in:
@@ -99,8 +99,6 @@ std::string ClassFlowControll::TranslateAktstatus(std::string _input)
|
|||||||
#endif //ENABLE_INFLUXDB
|
#endif //ENABLE_INFLUXDB
|
||||||
if (_input.compare("ClassFlowPostProcessing") == 0)
|
if (_input.compare("ClassFlowPostProcessing") == 0)
|
||||||
return ("Post-Processing");
|
return ("Post-Processing");
|
||||||
if (_input.compare("ClassFlowWriteList") == 0)
|
|
||||||
return ("Writing List");
|
|
||||||
|
|
||||||
return "Unkown Status";
|
return "Unkown Status";
|
||||||
}
|
}
|
||||||
@@ -243,8 +241,6 @@ ClassFlow* ClassFlowControll::CreateClassFlow(std::string _type)
|
|||||||
if (toUpper(_type).compare("[INFLUXDBV2]") == 0)
|
if (toUpper(_type).compare("[INFLUXDBV2]") == 0)
|
||||||
cfc = new ClassFlowInfluxDBv2(&FlowControll);
|
cfc = new ClassFlowInfluxDBv2(&FlowControll);
|
||||||
#endif //ENABLE_INFLUXDB
|
#endif //ENABLE_INFLUXDB
|
||||||
if (toUpper(_type).compare("[WRITELIST]") == 0)
|
|
||||||
cfc = new ClassFlowWriteList(&FlowControll);
|
|
||||||
|
|
||||||
if (toUpper(_type).compare("[POSTPROCESSING]") == 0)
|
if (toUpper(_type).compare("[POSTPROCESSING]") == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,7 +18,6 @@
|
|||||||
#include "ClassFlowInfluxDBv2.h"
|
#include "ClassFlowInfluxDBv2.h"
|
||||||
#endif //ENABLE_INFLUXDB
|
#endif //ENABLE_INFLUXDB
|
||||||
#include "ClassFlowCNNGeneral.h"
|
#include "ClassFlowCNNGeneral.h"
|
||||||
#include "ClassFlowWriteList.h"
|
|
||||||
|
|
||||||
class ClassFlowControll :
|
class ClassFlowControll :
|
||||||
public ClassFlow
|
public ClassFlow
|
||||||
|
|||||||
@@ -1,91 +0,0 @@
|
|||||||
#include <sstream>
|
|
||||||
#include "ClassFlowWriteList.h"
|
|
||||||
#include "Helper.h"
|
|
||||||
|
|
||||||
#include "time_sntp.h"
|
|
||||||
#include "../../include/defines.h"
|
|
||||||
|
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
void ClassFlowWriteList::SetInitialParameter(void)
|
|
||||||
{
|
|
||||||
flowpostprocessing = NULL;
|
|
||||||
previousElement = NULL;
|
|
||||||
ListFlowControll = NULL;
|
|
||||||
disabled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
ClassFlowWriteList::ClassFlowWriteList()
|
|
||||||
{
|
|
||||||
SetInitialParameter();
|
|
||||||
}
|
|
||||||
|
|
||||||
ClassFlowWriteList::ClassFlowWriteList(std::vector<ClassFlow*>* lfc)
|
|
||||||
{
|
|
||||||
SetInitialParameter();
|
|
||||||
|
|
||||||
ListFlowControll = lfc;
|
|
||||||
for (int i = 0; i < ListFlowControll->size(); ++i)
|
|
||||||
{
|
|
||||||
if (((*ListFlowControll)[i])->name().compare("ClassFlowPostProcessing") == 0)
|
|
||||||
{
|
|
||||||
flowpostprocessing = (ClassFlowPostProcessing*) (*ListFlowControll)[i];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool ClassFlowWriteList::ReadParameter(FILE* pfile, string& aktparamgraph)
|
|
||||||
{
|
|
||||||
std::vector<string> splitted;
|
|
||||||
|
|
||||||
aktparamgraph = trim(aktparamgraph);
|
|
||||||
|
|
||||||
if (aktparamgraph.size() == 0)
|
|
||||||
if (!this->GetNextParagraph(pfile, aktparamgraph))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (toUpper(aktparamgraph).compare("[MQTT]") != 0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
while (this->getNextLine(pfile, &aktparamgraph) && !this->isNewParagraph(aktparamgraph))
|
|
||||||
{
|
|
||||||
splitted = ZerlegeZeile(aktparamgraph);
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool ClassFlowWriteList::doFlow(string zwtime)
|
|
||||||
{
|
|
||||||
std::string line = "";
|
|
||||||
|
|
||||||
std::string result;
|
|
||||||
std::string resulterror = "";
|
|
||||||
std::string resultraw = "";
|
|
||||||
std::string resultrate = "";
|
|
||||||
std::string resulttimestamp = "";
|
|
||||||
string zw = "";
|
|
||||||
string namenumber = "";
|
|
||||||
|
|
||||||
if (flowpostprocessing)
|
|
||||||
{
|
|
||||||
std::vector<NumberPost*>* NUMBERS = flowpostprocessing->GetNumbers();
|
|
||||||
|
|
||||||
for (int i = 0; i < (*NUMBERS).size(); ++i)
|
|
||||||
{
|
|
||||||
result = (*NUMBERS)[i]->ReturnValue;
|
|
||||||
resultraw = (*NUMBERS)[i]->ReturnRawValue;
|
|
||||||
resulterror = (*NUMBERS)[i]->ErrorMessageText;
|
|
||||||
resultrate = (*NUMBERS)[i]->ReturnRateValue;
|
|
||||||
resulttimestamp = (*NUMBERS)[i]->timeStamp;
|
|
||||||
|
|
||||||
line = line + resulttimestamp + "\t" + resultraw + "\t" + result + "\t" + resultraw + "\t" + resultrate + "\t" + resulttimestamp + "\t";
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#ifndef CLASSFFLOWPWRITELIST_H
|
|
||||||
#define CLASSFFLOWPWRITELIST_H
|
|
||||||
|
|
||||||
#include "ClassFlow.h"
|
|
||||||
#include "ClassFlowPostProcessing.h"
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
class ClassFlowWriteList :
|
|
||||||
public ClassFlow
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
ClassFlowPostProcessing* flowpostprocessing;
|
|
||||||
void SetInitialParameter(void);
|
|
||||||
|
|
||||||
public:
|
|
||||||
ClassFlowWriteList();
|
|
||||||
ClassFlowWriteList(std::vector<ClassFlow*>* lfc);
|
|
||||||
|
|
||||||
bool ReadParameter(FILE* pfile, string& aktparamgraph);
|
|
||||||
bool doFlow(string time);
|
|
||||||
string name(){return "ClassFlowWriteList";};
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif //CLASSFFLOWPWRITELIST_H
|
|
||||||
Reference in New Issue
Block a user