ProtocolRS232Enums.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // // ******************************************************************
  2. // // /\ /| @File ProtocolRS232Enums.h
  3. // // \ V/ @Brief
  4. // // | "") @Author lijinwen, ghz005@uni-trend.com.cn
  5. // // / | @Creation 2024-05-16
  6. // // / \\ @Modified 2024-05-16
  7. // // *(__\_\
  8. // // ******************************************************************
  9. #pragma once
  10. #include "../EdgePulse.h"
  11. #include "../BaseEnums/DataCheckEnums.h"
  12. namespace Protocol
  13. {
  14. class RS232Enums
  15. {
  16. public:
  17. enum class RS232DecodeEventType: int32_t
  18. {
  19. None,
  20. Start,
  21. Data,
  22. Parity,
  23. };
  24. enum class DataBitWidth: int32_t
  25. {
  26. DataBitWidth_5Bit = 5,
  27. DataBitWidth_6Bit,
  28. DataBitWidth_7Bit,
  29. DataBitWidth_8Bit
  30. };
  31. enum class StopBit: int32_t
  32. {
  33. StopBit_1bit,
  34. StopBit_2bit
  35. };
  36. enum class BPSList: int32_t
  37. {
  38. BPSList_2400,
  39. BPSList_4800,
  40. BPSList_9600,
  41. BPSList_19200,
  42. BPSList_38400,
  43. BPSList_57600,
  44. BPSList_115200,
  45. BPSList_Custom
  46. };
  47. };
  48. }