ClassFlowControll.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. #include "ClassFlowMQTT.h"
  11. #include "ClassFlowInfluxDB.h"
  12. #include "ClassFlowInfluxDBv2.h"
  13. #include "ClassFlowWebhook.h"
  14. #include "ClassFlowCNNGeneral.h"
  15. class ClassFlowControll : public ClassFlow
  16. {
  17. protected:
  18. std::vector<ClassFlow *> FlowControll;
  19. ClassFlowPostProcessing *flowpostprocessing;
  20. ClassFlowAlignment *flowalignment;
  21. ClassFlowCNNGeneral *flowanalog;
  22. ClassFlowCNNGeneral *flowdigit;
  23. // ClassFlowDigit* flowdigit;
  24. ClassFlowTakeImage *flowtakeimage;
  25. ClassFlow *CreateClassFlow(std::string _type);
  26. void SetInitialParameter(void);
  27. std::string aktstatusWithTime;
  28. std::string aktstatus;
  29. int aktRunNr;
  30. public:
  31. bool AutoStart = false;
  32. float AutoInterval = 5;
  33. bool SetupModeActive = false;
  34. bool AlignmentOk = false;
  35. void InitFlow(std::string config);
  36. bool doFlow(std::string time);
  37. void doFlowTakeImageOnly(std::string time);
  38. bool getStatusSetupModus() { return SetupModeActive; };
  39. std::string getReadout(bool _rawvalue, bool _noerror, int _number);
  40. std::string getReadoutAll(int _type);
  41. bool UpdatePrevalue(std::string _newvalue, std::string _numbers, bool _extern);
  42. std::string GetPrevalue(std::string _number = "");
  43. bool ReadParameter(FILE *pFile, string &aktparamgraph);
  44. std::string getJSON();
  45. const std::vector<NumberPost *> &getNumbers();
  46. std::string getNumbersName();
  47. std::string TranslateAktstatus(std::string _input);
  48. #ifdef ALGROI_LOAD_FROM_MEM_AS_JPG
  49. void DigitDrawROI(CImageBasis *TempImage);
  50. void AnalogDrawROI(CImageBasis *TempImage);
  51. #endif
  52. esp_err_t GetJPGStream(std::string file_name, httpd_req_t *req);
  53. esp_err_t SendRawJPG(httpd_req_t *req);
  54. std::string doSingleStep(std::string _stepname, std::string _host);
  55. bool getIsAutoStart();
  56. void setAutoStartInterval(long &_interval);
  57. std::string *getActStatusWithTime();
  58. std::string *getActStatus();
  59. void setActStatus(std::string _aktstatus);
  60. std::vector<HTMLInfo *> GetAllDigit();
  61. std::vector<HTMLInfo *> GetAllAnalog();
  62. t_CNNType GetTypeDigit();
  63. t_CNNType GetTypeAnalog();
  64. bool StartMQTTService();
  65. int CleanTempFolder();
  66. std::string name() { return "ClassFlowControll"; };
  67. };
  68. #endif