ClassFlowControll.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. #ifdef ENABLE_WEBHOOK
  18. #include "ClassFlowWebhook.h"
  19. #endif //ENABLE_WEBHOOK
  20. #include "ClassFlowCNNGeneral.h"
  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. ClassFlowTakeImage* flowtakeimage;
  32. ClassFlow* CreateClassFlow(std::string _type);
  33. bool AutoStart;
  34. float AutoInterval;
  35. bool SleepWhileIdle;
  36. void SetInitialParameter(void);
  37. std::string aktstatusWithTime;
  38. std::string aktstatus;
  39. int aktRunNr;
  40. public:
  41. bool SetupModeActive;
  42. void InitFlow(std::string config);
  43. bool doFlow(string time);
  44. void doFlowTakeImageOnly(string time);
  45. bool getStatusSetupModus(){return SetupModeActive;};
  46. string getReadout(bool _rawvalue, bool _noerror, int _number);
  47. string getReadoutAll(int _type);
  48. bool UpdatePrevalue(std::string _newvalue, std::string _numbers, bool _extern);
  49. string GetPrevalue(std::string _number = "");
  50. bool ReadParameter(FILE* pfile, string& aktparamgraph);
  51. string getJSON();
  52. const std::vector<NumberPost*> &getNumbers();
  53. string getNumbersName();
  54. string TranslateAktstatus(std::string _input);
  55. #ifdef ALGROI_LOAD_FROM_MEM_AS_JPG
  56. void DigitDrawROI(CImageBasis *_zw);
  57. void AnalogDrawROI(CImageBasis *_zw);
  58. #endif
  59. esp_err_t GetJPGStream(std::string _fn, httpd_req_t *req);
  60. esp_err_t SendRawJPG(httpd_req_t *req);
  61. std::string doSingleStep(std::string _stepname, std::string _host);
  62. bool getIsAutoStart();
  63. void setAutoStartInterval(long &_interval);
  64. void setSleepWhileIdle(bool& _sleepwhileidle);
  65. std::string* getActStatusWithTime();
  66. std::string* getActStatus();
  67. void setActStatus(std::string _aktstatus);
  68. std::vector<HTMLInfo*> GetAllDigit();
  69. std::vector<HTMLInfo*> GetAllAnalog();
  70. t_CNNType GetTypeDigit();
  71. t_CNNType GetTypeAnalog();
  72. #ifdef ENABLE_MQTT
  73. bool StartMQTTService();
  74. #endif //ENABLE_MQTT
  75. int CleanTempFolder();
  76. string name(){return "ClassFlowControll";};
  77. };
  78. #endif