ClassFlowControll.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. 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. ClassFlowTakeImage* flowtakeimage;
  29. ClassFlow* CreateClassFlow(std::string _type);
  30. bool AutoStart;
  31. float AutoInterval;
  32. void SetInitialParameter(void);
  33. std::string aktstatusWithTime;
  34. std::string aktstatus;
  35. int aktRunNr;
  36. public:
  37. bool SetupModeActive;
  38. void InitFlow(std::string config);
  39. bool doFlow(string time);
  40. void doFlowTakeImageOnly(string time);
  41. bool getStatusSetupModus(){return SetupModeActive;};
  42. string getReadout(bool _rawvalue, bool _noerror, int _number);
  43. string getReadoutAll(int _type);
  44. bool UpdatePrevalue(std::string _newvalue, std::string _numbers, bool _extern);
  45. string GetPrevalue(std::string _number = "");
  46. bool ReadParameter(FILE* pfile, string& aktparamgraph);
  47. string getJSON();
  48. string getNumbersName();
  49. string TranslateAktstatus(std::string _input);
  50. #ifdef ALGROI_LOAD_FROM_MEM_AS_JPG
  51. void DigitalDrawROI(CImageBasis *_zw);
  52. void AnalogDrawROI(CImageBasis *_zw);
  53. #endif
  54. esp_err_t GetJPGStream(std::string _fn, httpd_req_t *req);
  55. esp_err_t SendRawJPG(httpd_req_t *req);
  56. std::string doSingleStep(std::string _stepname, std::string _host);
  57. bool isAutoStart(long &_interval);
  58. std::string* getActStatusWithTime();
  59. std::string* getActStatus();
  60. void setActStatus(std::string _aktstatus);
  61. std::vector<HTMLInfo*> GetAllDigital();
  62. std::vector<HTMLInfo*> GetAllAnalog();
  63. t_CNNType GetTypeDigital();
  64. t_CNNType GetTypeAnalog();
  65. #ifdef ENABLE_MQTT
  66. bool StartMQTTService();
  67. #endif //ENABLE_MQTT
  68. int CleanTempFolder();
  69. string name(){return "ClassFlowControll";};
  70. };
  71. #endif