ClassFlowPostProcessing.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #pragma once
  2. #ifndef CLASSFFLOWPOSTPROCESSING_H
  3. #define CLASSFFLOWPOSTPROCESSING_H
  4. #include "ClassFlow.h"
  5. #include "ClassFlowTakeImage.h"
  6. #include "ClassFlowCNNGeneral.h"
  7. #include "ClassFlowDefineTypes.h"
  8. #include <string>
  9. class ClassFlowPostProcessing :
  10. public ClassFlow
  11. {
  12. protected:
  13. bool UpdatePreValueINI;
  14. int PreValueAgeStartup;
  15. bool ErrorMessage;
  16. bool IgnoreLeadingNaN; // SPECIAL CASE for User Gustl ???
  17. ClassFlowCNNGeneral* flowAnalog;
  18. ClassFlowCNNGeneral* flowDigit;
  19. string FilePreValue;
  20. ClassFlowTakeImage *flowTakeImage;
  21. bool LoadPreValue(void);
  22. string ShiftDecimal(string in, int _decShift);
  23. string ErsetzteN(string, double _prevalue);
  24. float checkDigitConsistency(double input, int _decilamshift, bool _isanalog, double _preValue);
  25. void InitNUMBERS();
  26. void handleDecimalSeparator(string _decsep, string _value);
  27. void handleMaxRateValue(string _decsep, string _value);
  28. void handleDecimalExtendedResolution(string _decsep, string _value);
  29. void handleMaxRateType(string _decsep, string _value);
  30. void handleAnalogDigitalTransitionStart(string _decsep, string _value);
  31. void handleAllowNegativeRate(string _decsep, string _value);
  32. std::string GetStringReadouts(general);
  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, string& aktparamgraph);
  40. bool doFlow(string time);
  41. string getReadout(int _number);
  42. string getReadoutParam(bool _rawValue, bool _noerror, int _number = 0);
  43. string getReadoutError(int _number = 0);
  44. string getReadoutRate(int _number = 0);
  45. string getReadoutTimeStamp(int _number = 0);
  46. void SavePreValue();
  47. string getJsonFromNumber(int i, std::string _lineend);
  48. string GetPreValue(std::string _number = "");
  49. bool SetPreValue(double zw, 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. string name(){return "ClassFlowPostProcessing";};
  55. };
  56. #endif //CLASSFFLOWPOSTPROCESSING_H