iOS AILinkBleSDK - 蓝牙SDK
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

ELCM02_BleHeader.h 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  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. CM02_BleDataType_WeatherPush = 0x13 ,
  42. /** 导航数据 */
  43. CM02_BleDataType_NaviData = 0x14 ,
  44. /** 当前时区*/
  45. CM02_BleDataType_CurrentTimeZone = 0x15 ,
  46. /** 开始仪表OTA指令 */
  47. CM02_BleDataType_StartOTA = 0xA0 ,
  48. /** 发送仪表OTA数据 */
  49. CM02_BleDataType_SendOTAData = 0xA1 ,
  50. /** 发送仪表OTA完成指令 */
  51. CM02_BleDataType_EndOTA = 0xA2 ,
  52. };
  53. /** 开机状态 */
  54. typedef NS_ENUM(NSInteger, CM02_PoweronState_Type) {
  55. /** 开机状态 */
  56. CM02_PoweronState_Type_Poweron = 0 ,
  57. /** 准备关机 */
  58. CM02_PoweronState_Type_ReadyShutDown ,
  59. };
  60. /** 公里制单位 */
  61. typedef NS_ENUM(NSInteger, CM02_Unit_Type) {
  62. /** 公里制 */
  63. CM02_Unit_Type_Kilometer = 0 ,
  64. /** 英里制 */
  65. CM02_Unit_Type_Mile = 1 ,
  66. };
  67. /** 模式 */
  68. typedef NS_ENUM(NSInteger, CM02_Mode) {
  69. CM02_Mode_None = 0 ,
  70. };
  71. /** 密码是否正确枚举定义 */
  72. typedef NS_ENUM(NSInteger, CM02_PasswordCorrect_Type) {
  73. /** 密码正确 */
  74. CM02_PasswordCorrect_Type_Correct = 0 ,
  75. /** 密码错误 */
  76. CM02_PasswordCorrect_Type_Wrong = 1 ,
  77. };
  78. /** 开锁相关的功能枚举定义 */
  79. typedef NS_ENUM(NSInteger, CM02_LockState_Type) {
  80. /** 解锁 */
  81. CM02_LockState_Type_UnLock = 0 ,
  82. /** 上锁 */
  83. CM02_LockState_Type_Lock = 1 ,
  84. /** 验证密码 */
  85. CM02_LockState_Type_VerifyPassword = 2 ,
  86. /** 查询仪表开锁验证密码功能状态 */
  87. CM02_LockState_Type_Query_VerifyPassword_Status = 3 ,
  88. /** 打开仪表开锁验证密码功能(需要携带密码) */
  89. CM02_LockState_Type_VerifyPassword_On = 4 ,
  90. /** 关闭仪表开锁验证密码功能(需要携带密码) */
  91. CM02_LockState_Type_VerifyPassword_Off = 5 ,
  92. };
  93. /** 结果枚举定义 */
  94. typedef NS_ENUM(NSInteger, CM02_Result_Type) {
  95. /** 成功 */
  96. CM02_Result_Type_Success = 0 ,
  97. /** 失败 */
  98. CM02_Result_Type_Faild ,
  99. /** 不支持 */
  100. CM02_Result_Type_NotSupport ,
  101. };
  102. /** 电池电流枚举定义 */
  103. typedef NS_ENUM(NSInteger, CM02_BatteryElectricCurrent_Type) {
  104. /** 实时电流 */
  105. CM02_BatteryElectricCurrent_Type_Real = 0 ,
  106. /** 电流限流 */
  107. CM02_BatteryElectricCurrent_Type_Limit = 1 ,
  108. };
  109. /** 设备类型 */
  110. typedef NS_ENUM(NSInteger, CM02_DeviceType) {
  111. /** 仪表桥接:表示BM模块作为核心板,搭配客户的底板,作为仪表功能 */
  112. CM02_DeviceType_InstrumentBridge = 0 ,
  113. /** BLE透传:表示BM模块只提供BLE功能,作为透传模块,和客户的仪表通过uart连接,做透传功能 */
  114. CM02_DeviceType_BlePassThrough = 1 ,
  115. };
  116. /** 导航状态 */
  117. typedef NS_ENUM(NSInteger, ElectricScooter_NavigationState) {
  118. /** 关闭导航 */
  119. ElectricScooter_NavigationState_Off = 0 ,
  120. /** 开启导航 */
  121. ElectricScooter_NavigationState_On ,
  122. /** 更新导航数据 */
  123. ElectricScooter_NavigationState_UpdateData ,
  124. };
  125. /** 导航方向代码 */
  126. typedef NS_ENUM(NSInteger, ElectricScooter_NavigationPushCode) {
  127. /** 直行 */
  128. ElectricScooter_NavigationPushCode_Straight = 0 ,
  129. /** 左转 */
  130. ElectricScooter_NavigationPushCode_TurnLeft ,
  131. /** 右转 */
  132. ElectricScooter_NavigationPushCode_TurnRight ,
  133. /** 左转掉头 */
  134. ElectricScooter_NavigationPushCode_TurnRoundLeft ,
  135. /** 右转掉头 */
  136. ElectricScooter_NavigationPushCode_TurnRoundRight ,
  137. };
  138. #endif /* ELCM02_BleHeader_h */