ClassFlowControll.h 2.3 KB

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