data_check_helper.h 795 B

1234567891011121314151617181920212223242526
  1. // // ******************************************************************
  2. // // /\ /| @File data_check_helper.h
  3. // // \ V/ @Brief
  4. // // | "") @Author lijinwen, ghz005@uni-trend.com.cn
  5. // // / | @Creation 2024-05-16
  6. // // / \\ @Modified 2024-06-24
  7. // // *(__\_\
  8. // // ******************************************************************
  9. #pragma once
  10. #include <cstdint>
  11. #include "../BaseEnums/data_check_enums.h"
  12. #pragma once
  13. namespace Protocol
  14. {
  15. class DataCheckHelper
  16. {
  17. public:
  18. static bool CheckDataByOddEven(uint8_t data, int32_t data_bit_count, OddEvenCheck check_type);
  19. //比较浮点数是否相等
  20. static bool CheckDoubleIsEqual(double a, double b);
  21. };
  22. }