iOS AILinkBleSDK - 蓝牙SDK
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

ELCM02_BleHeader.h 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. /** 开始仪表OTA指令 */
  41. CM02_BleDataType_StartOTA = 0xA0 ,
  42. /** 发送仪表OTA数据 */
  43. CM02_BleDataType_SendOTAData = 0xA1 ,
  44. /** 发送仪表OTA完成指令 */
  45. CM02_BleDataType_EndOTA = 0xA2 ,
  46. };
  47. /** 开机状态 */
  48. typedef NS_ENUM(NSInteger, CM02_PoweronState_Type) {
  49. /** 开机状态 */
  50. CM02_PoweronState_Type_Poweron = 0 ,
  51. /** 准备关机 */
  52. CM02_PoweronState_Type_ReadyShutDown ,
  53. };
  54. /** 公里制单位 */
  55. typedef NS_ENUM(NSInteger, CM02_Unit_Type) {
  56. /** 公里制 */
  57. CM02_Unit_Type_Kilometer = 0 ,
  58. /** 英里制 */
  59. CM02_Unit_Type_Mile = 1 ,
  60. };
  61. /** 模式 */
  62. typedef NS_ENUM(NSInteger, CM02_Mode) {
  63. CM02_Mode_None = 0 ,
  64. };
  65. /** 密码是否正确枚举定义 */
  66. typedef NS_ENUM(NSInteger, CM02_PasswordCorrect_Type) {
  67. /** 密码正确 */
  68. CM02_PasswordCorrect_Type_Correct = 0 ,
  69. /** 密码错误 */
  70. CM02_PasswordCorrect_Type_Wrong = 1 ,
  71. };
  72. /** 开锁相关的功能枚举定义 */
  73. typedef NS_ENUM(NSInteger, CM02_LockState_Type) {
  74. /** 解锁 */
  75. CM02_LockState_Type_UnLock = 0 ,
  76. /** 上锁 */
  77. CM02_LockState_Type_Lock = 1 ,
  78. /** 验证密码 */
  79. CM02_LockState_Type_VerifyPassword = 2 ,
  80. };
  81. /** 结果枚举定义 */
  82. typedef NS_ENUM(NSInteger, CM02_Result_Type) {
  83. /** 成功 */
  84. CM02_Result_Type_Success = 0 ,
  85. /** 失败 */
  86. CM02_Result_Type_Faild ,
  87. /** 不支持 */
  88. CM02_Result_Type_NotSupport ,
  89. };
  90. /** 电池电流枚举定义 */
  91. typedef NS_ENUM(NSInteger, CM02_BatteryElectricCurrent_Type) {
  92. /** 实时电流 */
  93. CM02_BatteryElectricCurrent_Type_Real = 0 ,
  94. /** 电流限流 */
  95. CM02_BatteryElectricCurrent_Type_Limit = 1 ,
  96. };
  97. /** 设备类型 */
  98. typedef NS_ENUM(NSInteger, CM02_DeviceType) {
  99. /** 仪表桥接:表示BM模块作为核心板,搭配客户的底板,作为仪表功能 */
  100. CM02_DeviceType_InstrumentBridge = 0 ,
  101. /** BLE透传:表示BM模块只提供BLE功能,作为透传模块,和客户的仪表通过uart连接,做透传功能 */
  102. CM02_DeviceType_BlePassThrough = 1 ,
  103. };
  104. #endif /* ELCM02_BleHeader_h */