ClassFlowControll.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. #ifdef ALGROI_LOAD_FROM_MEM_AS_JPG
  37. bool bNewAlgROI = false;
  38. #endif
  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. #ifdef ALGROI_LOAD_FROM_MEM_AS_JPG
  52. void SetNewAlgROI(bool _value);
  53. #endif
  54. string TranslateAktstatus(std::string _input);
  55. #ifdef ENABLE_MQTT
  56. string GetMQTTMainTopic();
  57. #endif //ENABLE_MQTT
  58. #ifdef ALGROI_LOAD_FROM_MEM_AS_JPG
  59. void DigitalDrawROI(CImageBasis *_zw);
  60. void AnalogDrawROI(CImageBasis *_zw);
  61. #endif
  62. esp_err_t GetJPGStream(std::string _fn, httpd_req_t *req);
  63. esp_err_t SendRawJPG(httpd_req_t *req);
  64. std::string doSingleStep(std::string _stepname, std::string _host);
  65. bool isAutoStart(long &_intervall);
  66. std::string* getActStatus();
  67. std::vector<HTMLInfo*> GetAllDigital();
  68. std::vector<HTMLInfo*> GetAllAnalog();
  69. t_CNNType GetTypeDigital();
  70. t_CNNType GetTypeAnalog();
  71. #ifdef ENABLE_MQTT
  72. bool StartMQTTService();
  73. #endif //ENABLE_MQTT
  74. int CleanTempFolder();
  75. string name(){return "ClassFlowControll";};
  76. };
  77. #endif