test_flow_postrocess_helper.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. #pragma once
  2. #ifndef TEST_FLOW_H
  3. #define TEST_FLOW_H
  4. #include <unity.h>
  5. #include <ClassFlowPostProcessing.h>
  6. #include <ClassFlowCNNGeneral.h>
  7. #include <ClassFlowCNNGeneral.h>
  8. #include <ClassFlowMakeImage.h>
  9. class UnderTestPost : public ClassFlowPostProcessing {
  10. public:
  11. UnderTestPost(std::vector<ClassFlow*>* lfc, ClassFlowCNNGeneral *_analog, ClassFlowCNNGeneral *_digit)
  12. : ClassFlowPostProcessing::ClassFlowPostProcessing(lfc, _analog, _digit) {}
  13. using ClassFlowPostProcessing::InitNUMBERS;
  14. using ClassFlowPostProcessing::RundeOutput;
  15. using ClassFlowPostProcessing::flowAnalog;
  16. using ClassFlowPostProcessing::flowDigit;
  17. };
  18. /**
  19. * @brief Set the Up Class Flow Postprocessing object
  20. *
  21. * @param digType the model type of digits
  22. * @param anaType the model type of analog
  23. * @return UnderTestPost* a created, but not setted up testobject
  24. */
  25. UnderTestPost* setUpClassFlowPostprocessing(t_CNNType digType, t_CNNType anaType);
  26. /**
  27. * @brief creates a testobject (including setup). AnalogType is Class100, because all analog types do the same.
  28. *
  29. * @param analog the analog recognitions
  30. * @param digits the digit recognitions
  31. * @param digType the digit model type (default Digital100)
  32. * @param checkConsistency sets property checkConsistency (default = false)
  33. * @param extendedResolution sets property extendedResolution (default = false)
  34. * @param decimal_shift set property decimal_shift (Nachkommastellen, default = 0)
  35. * @return UnderTestPost* the created testobject
  36. */
  37. UnderTestPost* init_do_flow(std::vector<float> analog, std::vector<float> digits, t_CNNType digType = Digital100,
  38. bool checkConsistency=false, bool extendedResolution=false, int decimal_shift=0);
  39. /**
  40. * @brief creates a testobject an run do flow (including setup). AnalogType is Class100, because all analog types do the same.
  41. *
  42. * @param analog the analog recognitions
  43. * @param digits the digit recognitions
  44. * @param digType the digit model type (default Digital100)
  45. * @param checkConsistency sets property checkConsistency (default = false)
  46. * @param extendedResolution sets property extendedResolution (default = false)
  47. * @param decimal_shift set property decimal_shift (Nachkommastellen, default = 0)
  48. * @return std::string the return value of do_Flow is the Value as string
  49. */
  50. std::string process_doFlow(std::vector<float> analog, std::vector<float> digits, t_CNNType digType = Digital100,
  51. bool checkConsistency=false, bool extendedResolution=false, int decimal_shift=0);
  52. /**
  53. * @brief run do_Flow on the testobject
  54. *
  55. * @param _underTestPost the testobject
  56. * @return std::string the return value of do_Flow is the Value as string
  57. */
  58. std::string process_doFlow(UnderTestPost* _underTestPost);
  59. /**
  60. * @brief Set the Consitency Check on testobject
  61. *
  62. * @param _UnderTestPost the testobject
  63. * @param _checkConsistency true/false if checkConsistency
  64. */
  65. void setConsitencyCheck(UnderTestPost* _UnderTestPost, bool _checkConsistency);
  66. /**
  67. * @brief Set the Pre Value on testobject
  68. *
  69. * @param _UnderTestPost the testobject
  70. * @param _preValue the previous value
  71. */
  72. void setPreValue(UnderTestPost* _UnderTestPost, double _preValue);
  73. /**
  74. * @brief Set the Extended Resolution on undertest
  75. *
  76. * @param _UnderTestPost the testobject
  77. * @param _extendedResolution true/false
  78. */
  79. void setExtendedResolution(UnderTestPost* _UnderTestPost, bool _extendedResolution);
  80. /**
  81. * @brief Set the Decimal Shift (Nachkomma)
  82. *
  83. * @param _UnderTestPost the testobject
  84. * @param decimal_shift count of nachkomma
  85. */
  86. void setDecimalShift(UnderTestPost* _UnderTestPost, int decimal_shift);
  87. /**
  88. * @brief Set the Analogdigit Transistion Start
  89. *
  90. * @param _underTestPost the testobject
  91. * @param _analogdigitTransistionStart the analog to digit transition start
  92. */
  93. void setAnalogdigitTransistionStart(UnderTestPost* _underTestPost, float _analogdigitTransistionStart);
  94. #endif // TEST_FLOW_H