ClassFlowPostProcessing.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. ClassFlowCNNGeneral* flowAnalog;
  17. ClassFlowCNNGeneral* flowDigit;
  18. string FilePreValue;
  19. ClassFlowTakeImage *flowTakeImage;
  20. bool LoadPreValue(void);
  21. string ShiftDecimal(string in, int _decShift);
  22. string ErsetzteN(string, double _prevalue);
  23. float checkDigitConsistency(double input, int _decilamshift, bool _isanalog, double _preValue);
  24. void InitNUMBERS();
  25. void handleDecimalSeparator(string _decsep, string _value);
  26. void handleMaxRateValue(string _decsep, string _value);
  27. void handleDecimalExtendedResolution(string _decsep, string _value);
  28. void handleMaxRateType(string _decsep, string _value);
  29. void handleAnalogToDigitTransitionStart(string _decsep, string _value);
  30. void handleAllowNegativeRate(string _decsep, string _value);
  31. void handleIgnoreLeadingNaN(string _decsep, string _value);
  32. void handleChangeRateThreshold(string _decsep, string _value);
  33. void handlecheckDigitIncreaseConsistency(std::string _decsep, std::string _value);
  34. void WriteDataLog(int _index);
  35. public:
  36. bool PreValueUse;
  37. std::vector<NumberPost*> NUMBERS;
  38. ClassFlowPostProcessing(std::vector<ClassFlow*>* lfc, ClassFlowCNNGeneral *_analog, ClassFlowCNNGeneral *_digit);
  39. virtual ~ClassFlowPostProcessing(){};
  40. bool ReadParameter(FILE* pfile, string& aktparamgraph);
  41. bool doFlow(string time);
  42. string getReadout(int _number);
  43. string getReadoutParam(bool _rawValue, bool _noerror, int _number = 0);
  44. string getReadoutError(int _number = 0);
  45. string getReadoutRate(int _number = 0);
  46. string getReadoutTimeStamp(int _number = 0);
  47. void SavePreValue();
  48. string getJsonFromNumber(int i, std::string _lineend);
  49. string GetPreValue(std::string _number = "");
  50. bool SetPreValue(double zw, string _numbers, bool _extern = false);
  51. std::string GetJSON(std::string _lineend = "\n");
  52. std::string getNumbersName();
  53. void UpdateNachkommaDecimalShift();
  54. std::vector<NumberPost*>* GetNumbers(){return &NUMBERS;};
  55. string name(){return "ClassFlowPostProcessing";};
  56. };
  57. #endif //CLASSFFLOWPOSTPROCESSING_H