ClassFlowControll.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #ifndef __FLOWCONTROLL__
  2. #define __FLOWCONTROLL__
  3. #include <string>
  4. #include "ClassFlow.h"
  5. #include "ClassFlowMakeImage.h"
  6. #include "ClassFlowAlignment.h"
  7. #include "ClassFlowCNNGeneral.h"
  8. #include "ClassFlowPostProcessing.h"
  9. #ifdef ENABLE_MQTT
  10. #include "ClassFlowMQTT.h"
  11. #endif //ENABLE_MQTT
  12. #include "ClassFlowInfluxDB.h"
  13. #include "ClassFlowCNNGeneral.h"
  14. #include "ClassFlowWriteList.h"
  15. #define READOUT_TYPE_VALUE 0
  16. #define READOUT_TYPE_PREVALUE 1
  17. #define READOUT_TYPE_RAWVALUE 2
  18. #define READOUT_TYPE_ERROR 3
  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. esp_err_t GetJPGStream(std::string _fn, httpd_req_t *req);
  54. esp_err_t SendRawJPG(httpd_req_t *req);
  55. std::string doSingleStep(std::string _stepname, std::string _host);
  56. bool isAutoStart(long &_intervall);
  57. std::string* getActStatus();
  58. std::vector<HTMLInfo*> GetAllDigital();
  59. std::vector<HTMLInfo*> GetAllAnalog();
  60. t_CNNType GetTypeDigital();
  61. t_CNNType GetTypeAnalog();
  62. #ifdef ENABLE_MQTT
  63. bool StartMQTTService();
  64. #endif //ENABLE_MQTT
  65. int CleanTempFolder();
  66. string name(){return "ClassFlowControll";};
  67. };
  68. #endif