ClassFlowControll.h 2.2 KB

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