ClassFlowControll.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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. void SetInitialParameter(void);
  36. std::string aktstatusWithTime;
  37. std::string aktstatus;
  38. int aktRunNr;
  39. public:
  40. bool SetupModeActive;
  41. void InitFlow(std::string config);
  42. bool doFlow(string time);
  43. void doFlowTakeImageOnly(string time);
  44. bool getStatusSetupModus(){return SetupModeActive;};
  45. string getReadout(bool _rawvalue, bool _noerror, int _number);
  46. string getReadoutAll(int _type);
  47. bool UpdatePrevalue(std::string _newvalue, std::string _numbers, bool _extern);
  48. string GetPrevalue(std::string _number = "");
  49. bool ReadParameter(FILE* pfile, string& aktparamgraph);
  50. string getJSON();
  51. const std::vector<NumberPost*> &getNumbers();
  52. string getNumbersName();
  53. string TranslateAktstatus(std::string _input);
  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 getIsAutoStart();
  62. void setAutoStartInterval(long &_interval);
  63. std::string* getActStatusWithTime();
  64. std::string* getActStatus();
  65. void setActStatus(std::string _aktstatus);
  66. std::vector<HTMLInfo*> GetAllDigital();
  67. std::vector<HTMLInfo*> GetAllAnalog();
  68. t_CNNType GetTypeDigital();
  69. t_CNNType GetTypeAnalog();
  70. #ifdef ENABLE_MQTT
  71. bool StartMQTTService();
  72. #endif //ENABLE_MQTT
  73. int CleanTempFolder();
  74. string name(){return "ClassFlowControll";};
  75. };
  76. #endif