iOS AILinkBleSDK - 蓝牙SDK
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ELCM02_BleHeader.h 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. //
  2. // ELCM02_BleHeader.h
  3. // AILinkBleSDK
  4. //
  5. // Created by cliCk on 2021/9/13.
  6. // Copyright © 2021 IOT. All rights reserved.
  7. //
  8. #ifndef ELCM02_BleHeader_h
  9. #define ELCM02_BleHeader_h
  10. /** 蓝牙协议type定义 */
  11. typedef NS_ENUM(NSInteger, CM02_BleDataType) {
  12. /** 查询设备支持功能 */
  13. CM02_BleDataType_SupportFunction = 0x00 ,
  14. /** 心跳数据交互 */
  15. CM02_BleDataType_Heartbeat = 0x01 ,
  16. /** 设置控制器状态 */
  17. CM02_BleDataType_SetControl = 0x02 ,
  18. /** 清除BM模块参数 */
  19. CM02_BleDataType_ClearBMParam = 0x03 ,
  20. /** 设置模式档位速度 */
  21. CM02_BleDataType_SetupGear = 0x04 ,
  22. /** 设置灯光 */
  23. CM02_BleDataType_SetupLight = 0x05 ,
  24. /** 设置解锁车密码 */
  25. CM02_BleDataType_SetupPassworld = 0x06 ,
  26. /** 锁车及解锁 */
  27. CM02_BleDataType_LockOrUnlock = 0x07 ,
  28. /** 售后密码查询 */
  29. CM02_BleDataType_AfterSalesPassword = 0x08 ,
  30. /** 查询单次行驶里程时间 */
  31. CM02_BleDataType_SingleMileage = 0x0C ,
  32. /** 查询总里程 */
  33. CM02_BleDataType_TotalMileage = 0x0D ,
  34. /** 查询电池信息 */
  35. CM02_BleDataType_Battery = 0x0E ,
  36. /** 查询控制器厂商代码及编号 */
  37. CM02_BleDataType_ControlVersion = 0x10 ,
  38. /** 查询仪表固件版本 */
  39. CM02_BleDataType_DashboardVersion = 0x11 ,
  40. };
  41. /** 开机状态 */
  42. typedef NS_ENUM(NSInteger, CM02_PoweronState_Type) {
  43. /** 开机状态 */
  44. CM02_PoweronState_Type_Poweron = 0 ,
  45. /** 准备关机 */
  46. CM02_PoweronState_Type_ReadyShutDown ,
  47. };
  48. /** 公里制单位 */
  49. typedef NS_ENUM(NSInteger, CM02_Unit_Type) {
  50. /** 公里制 */
  51. CM02_Unit_Type_Kilometer = 0 ,
  52. /** 英里制 */
  53. CM02_Unit_Type_Mile = 1 ,
  54. };
  55. /** 模式 */
  56. typedef NS_ENUM(NSInteger, CM02_Mode) {
  57. CM02_Mode_None = 0 ,
  58. };
  59. /** 密码是否正确枚举定义 */
  60. typedef NS_ENUM(NSInteger, CM02_PasswordCorrect_Type) {
  61. /** 密码正确 */
  62. CM02_PasswordCorrect_Type_Correct = 0 ,
  63. /** 密码错误 */
  64. CM02_PasswordCorrect_Type_Wrong = 1 ,
  65. };
  66. /** 开锁相关的功能枚举定义 */
  67. typedef NS_ENUM(NSInteger, CM02_LockState_Type) {
  68. /** 解锁 */
  69. CM02_LockState_Type_UnLock = 0 ,
  70. /** 上锁 */
  71. CM02_LockState_Type_Lock = 1 ,
  72. /** 验证密码 */
  73. CM02_LockState_Type_VerifyPassword = 2 ,
  74. };
  75. /** 结果枚举定义 */
  76. typedef NS_ENUM(NSInteger, CM02_Result_Type) {
  77. /** 成功 */
  78. CM02_Result_Type_Success = 0 ,
  79. /** 失败 */
  80. CM02_Result_Type_Faild ,
  81. /** 不支持 */
  82. CM02_Result_Type_NotSupport ,
  83. };
  84. /** 电池电流枚举定义 */
  85. typedef NS_ENUM(NSInteger, CM02_BatteryElectricCurrent_Type) {
  86. /** 实时电流 */
  87. CM02_BatteryElectricCurrent_Type_Real = 0 ,
  88. /** 电流限流 */
  89. CM02_BatteryElectricCurrent_Type_Limit = 1 ,
  90. };
  91. /** 设备类型 */
  92. typedef NS_ENUM(NSInteger, CM02_DeviceType) {
  93. /** 仪表桥接:表示BM模块作为核心板,搭配客户的底板,作为仪表功能 */
  94. CM02_DeviceType_InstrumentBridge = 0 ,
  95. /** BLE透传:表示BM模块只提供BLE功能,作为透传模块,和客户的仪表通过uart连接,做透传功能 */
  96. CM02_DeviceType_BlePassThrough = 1 ,
  97. };
  98. #endif /* ELCM02_BleHeader_h */