ClassFlowControll.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #ifndef __FLOWCONTROLL__
  2. #define __FLOWCONTROLL__
  3. #include <string>
  4. #include "ClassFlow.h"
  5. #include "ClassFlowMakeImage.h"
  6. #include "ClassFlowAlignment.h"
  7. #include "ClassFlowCNNGeneral.h"
  8. #include "ClassFlowPostProcessing.h"
  9. #ifdef ENABLE_MQTT
  10. #include "ClassFlowMQTT.h"
  11. #endif //ENABLE_MQTT
  12. #ifdef ENABLE_INFLUXDB
  13. #include "ClassFlowInfluxDB.h"
  14. #endif //ENABLE_INFLUXDB
  15. #include "ClassFlowCNNGeneral.h"
  16. #include "ClassFlowWriteList.h"
  17. #define READOUT_TYPE_VALUE 0
  18. #define READOUT_TYPE_PREVALUE 1
  19. #define READOUT_TYPE_RAWVALUE 2
  20. #define READOUT_TYPE_ERROR 3
  21. class ClassFlowControll :
  22. public ClassFlow
  23. {
  24. protected:
  25. std::vector<ClassFlow*> FlowControll;
  26. ClassFlowPostProcessing* flowpostprocessing;
  27. ClassFlowAlignment* flowalignment;
  28. ClassFlowCNNGeneral* flowanalog;
  29. ClassFlowCNNGeneral* flowdigit;
  30. // ClassFlowDigit* flowdigit;
  31. ClassFlowMakeImage* flowmakeimage;
  32. ClassFlow* CreateClassFlow(std::string _type);
  33. bool AutoStart;
  34. float AutoIntervall;
  35. bool SetupModeActive;
  36. void SetInitialParameter(void);
  37. std::string aktstatus;
  38. int aktRunNr;
  39. public:
  40. void InitFlow(std::string config);
  41. bool doFlow(string time);
  42. void doFlowMakeImageOnly(string time);
  43. bool getStatusSetupModus(){return SetupModeActive;};
  44. string getReadout(bool _rawvalue, bool _noerror);
  45. string getReadoutAll(int _type);
  46. string UpdatePrevalue(std::string _newvalue, std::string _numbers, bool _extern);
  47. string GetPrevalue(std::string _number = "");
  48. bool ReadParameter(FILE* pfile, string& aktparamgraph);
  49. string getJSON();
  50. string getNumbersName();
  51. string TranslateAktstatus(std::string _input);
  52. #ifdef ENABLE_MQTT
  53. string GetMQTTMainTopic();
  54. #endif //ENABLE_MQTT
  55. esp_err_t GetJPGStream(std::string _fn, httpd_req_t *req);
  56. esp_err_t SendRawJPG(httpd_req_t *req);
  57. std::string doSingleStep(std::string _stepname, std::string _host);
  58. bool isAutoStart(long &_intervall);
  59. std::string* getActStatus();
  60. std::vector<HTMLInfo*> GetAllDigital();
  61. std::vector<HTMLInfo*> GetAllAnalog();
  62. t_CNNType GetTypeDigital();
  63. t_CNNType GetTypeAnalog();
  64. #ifdef ENABLE_MQTT
  65. bool StartMQTTService();
  66. #endif //ENABLE_MQTT
  67. int CleanTempFolder();
  68. string name(){return "ClassFlowControll";};
  69. };
  70. #endif