ClassFlowPostProcessing.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #pragma once
  2. #ifndef CLASSFFLOWPOSTPROCESSING_H
  3. #define CLASSFFLOWPOSTPROCESSING_H
  4. #include <string>
  5. #include "ClassFlow.h"
  6. #include "ClassFlowTakeImage.h"
  7. #include "ClassFlowCNNGeneral.h"
  8. #include "ClassFlowDefineTypes.h"
  9. class ClassFlowPostProcessing : public ClassFlow
  10. {
  11. protected:
  12. bool UpdatePreValueINI;
  13. int PreValueAgeStartup;
  14. ClassFlowCNNGeneral *flowAnalog;
  15. ClassFlowCNNGeneral *flowDigit;
  16. std::string FilePreValue;
  17. ClassFlowTakeImage *flowTakeImage;
  18. bool LoadPreValue(void);
  19. std::string ShiftDecimal(std::string in, int _decShift);
  20. std::string ErsetzteN(std::string, double _prevalue);
  21. void InitNUMBERS();
  22. void handleDecimalShift(std::string _decsep, std::string _value);
  23. void handleMaxRateValue(std::string _decsep, std::string _value);
  24. void handleExtendedResolution(std::string _decsep, std::string _value);
  25. void handleMaxRateType(std::string _decsep, std::string _value);
  26. void handleAnalogToDigitTransitionStart(std::string _decsep, std::string _value);
  27. void handleSkipErrorMessage(std::string _decsep, std::string _value);
  28. void handleAllowNegativeRate(std::string _decsep, std::string _value);
  29. void handleIgnoreLeadingNaN(std::string _decsep, std::string _value);
  30. void handleChangeRateThreshold(std::string _decsep, std::string _value);
  31. void handleMaxFlowRate(std::string _decsep, std::string _value);
  32. std::vector<double> addNumbersTogether(std::vector<double> DigitValues, std::vector<double> AnalogValues);
  33. void WriteDataLog(int _index);
  34. public:
  35. bool PreValueUse;
  36. std::vector<NumberPost *> NUMBERS;
  37. ClassFlowPostProcessing(std::vector<ClassFlow *> *lfc, ClassFlowCNNGeneral *_analog, ClassFlowCNNGeneral *_digit);
  38. virtual ~ClassFlowPostProcessing() {};
  39. bool ReadParameter(FILE *pFile, std::string &aktparamgraph);
  40. bool doFlow(std::string time);
  41. std::string getReadout(int _number);
  42. std::string getReadoutParam(bool _rawValue, bool _noerror, int _number = 0);
  43. std::string getReadoutError(int _number = 0);
  44. std::string getReadoutRate(int _number = 0);
  45. std::string getReadoutTimeStamp(int _number = 0);
  46. void SavePreValue();
  47. std::string getJsonFromNumber(int i, std::string _lineend);
  48. std::string GetPreValue(std::string _number = "");
  49. bool SetPreValue(double _newvalue, string _numbers, bool _extern = false);
  50. std::string GetJSON(std::string _lineend = "\n");
  51. std::string getNumbersName();
  52. void UpdateNachkommaDecimalShift();
  53. std::vector<NumberPost *> *GetNumbers() { return &NUMBERS; };
  54. std::string name() { return "ClassFlowPostProcessing"; };
  55. };
  56. #endif // CLASSFFLOWPOSTPROCESSING_H