ClassFlowControll.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. #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. ClassFlowMakeImage* flowmakeimage;
  30. ClassFlow* CreateClassFlow(std::string _type);
  31. bool AutoStart;
  32. float AutoIntervall;
  33. bool SetupModeActive;
  34. void SetInitialParameter(void);
  35. std::string aktstatus;
  36. int aktRunNr;
  37. public:
  38. void InitFlow(std::string config);
  39. bool doFlow(string time);
  40. void doFlowMakeImageOnly(string time);
  41. bool getStatusSetupModus(){return SetupModeActive;};
  42. string getReadout(bool _rawvalue, bool _noerror);
  43. string getReadoutAll(int _type);
  44. string 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 ENABLE_MQTT
  51. string GetMQTTMainTopic();
  52. #endif //ENABLE_MQTT
  53. #ifdef ALGROI_LOAD_FROM_MEM_AS_JPG
  54. void DigitalDrawROI(CImageBasis *_zw);
  55. void AnalogDrawROI(CImageBasis *_zw);
  56. #endif
  57. esp_err_t GetJPGStream(std::string _fn, httpd_req_t *req);
  58. esp_err_t SendRawJPG(httpd_req_t *req);
  59. std::string doSingleStep(std::string _stepname, std::string _host);
  60. bool isAutoStart(long &_intervall);
  61. std::string* getActStatus();
  62. void setActStatus(std::string _aktstatus);
  63. std::vector<HTMLInfo*> GetAllDigital();
  64. std::vector<HTMLInfo*> GetAllAnalog();
  65. t_CNNType GetTypeDigital();
  66. t_CNNType GetTypeAnalog();
  67. #ifdef ENABLE_MQTT
  68. bool StartMQTTService();
  69. #endif //ENABLE_MQTT
  70. int CleanTempFolder();
  71. string name(){return "ClassFlowControll";};
  72. };
  73. #endif