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

ELToothburshHeader.h 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. //
  2. // ELToothburshHeader.h
  3. // Elink
  4. //
  5. // Created by iot_user on 2020/5/11.
  6. // Copyright © 2020 iot_iMac. All rights reserved.
  7. //
  8. #ifndef ELToothburshHeader_h
  9. #define ELToothburshHeader_h
  10. #import "ELSDKHeader.h"
  11. typedef NS_ENUM(NSUInteger, ToothSupportGearType) {
  12. ToothSupportGearTypeUnknown_00 = 0x00, //Unsupported gear(不支持的档位)
  13. ToothSupportGearTypeOneGear_01 = 0x01, //First gear(一档)
  14. ToothSupportGearTypeTwoGear_02 = 0x02, //Second gear(二档)
  15. };
  16. //Working gear(工作档位)
  17. typedef NS_ENUM(NSUInteger, ToothbrushGearType) {
  18. ToothbrushGearTypeStop_00 = 0x00, //Stop the motor(停止电机)
  19. ToothbrushGearTypeClean_01 = 0x01, //clean(清洁)
  20. ToothbrushGearTypeWhite_02 = 0x02, //Whitening(美白)
  21. ToothbrushGearTypeMassage_03 = 0x03, //massage(按摩)
  22. ToothbrushGearTypeSensitive_04 = 0x04, //sensitive(敏感)
  23. ToothbrushGearTypePolish_05 = 0x05, //polishing(抛光)
  24. ToothbrushGearTypeGumCare_06 = 0x06, //Gum care(牙龈护理)
  25. ToothbrushGearTypeRefresh_07 = 0x07, //gargle(漱口)
  26. ToothbrushGearTypeHealthcare_08 = 0x08, //health care(保健)
  27. ToothbrushGearTypeNewbie_09 = 0x09, //Novice(新手)
  28. ToothbrushGearTypeSoft_0A = 0x0A, //Soft(舒柔)
  29. ToothbrushGearTypeGentle_0B = 0x0B, //gentle(轻柔)
  30. ToothbrushGearTypeCare_0C = 0x0C, //Care(呵护)
  31. ToothbrushGearTypeCustom_FF = 0xFF, //manual setting(手动设置)
  32. };
  33. typedef NS_ENUM(NSUInteger, ToothbrushDataType) {
  34. ToothbrushDataTypeSetGear_A702 = 0x02,//Set gear(设置档位)
  35. ToothbrushDataTypeGetGear_A703 = 0x03,//Get the current working gear(获取当前工作的档位)
  36. ToothbrushDataTypeTry_A706 = 0x06,//try out(试用)
  37. ToothbrushDataTypeWorkPhase_A707 = 0x07,//Work Phase(工作阶段)
  38. ToothbrushDataTypeSetCustomData_A709 = 0x09,//Set manual setting mode(设置手动设置模式)
  39. ToothbrushDataTypeGetCustomGear_A70A = 0x0A,//Get manually set data(获取手动设置的数据)
  40. ToothbrushDataTypeSwitchWork_A70B = 0x0B,//Switch toothbrush(开关牙刷)
  41. ToothbrushDataTypeSetTwoGearDefault_A70C = 0x0C,//Set second gear default(设置二档默认)
  42. ToothbrushDataTypeGetTwoGearDefault_A70D = 0x0D,//Get second gear default(获取二档默认)
  43. ToothbrushDataTypeToothbrushData_A7FD = 0xFD,//Brushing data(刷牙数据)
  44. ToothbrushDataTypeReportResult_A7FE = 0xFE,//Report received data result(上报接收数据结果)
  45. };
  46. typedef NS_ENUM(NSUInteger, ToothbrushA6DataType) {
  47. ToothbrushA6DataTypeTriaxialDirection_02 = 0x02, //Get the three-axis direction of the toothbrush(获取牙刷三轴方向)
  48. ToothbrushA6DataTypeTriaxialData_05 = 0x05, //Get toothbrush three-axis data(获取牙刷三轴数据)
  49. ToothbrushA6DataTypeOfflineDataCount_11 = 0x11, //Cmd toothbrush offline data count(APP 获取离线历史记录条数 二级指令 0x11)
  50. ToothbrushA6DataTypeOfflineDataStart_12 = 0x12, //Cmd toothbrush offline data start(APP 请求接收离线历史记录 二级指令 0x12)
  51. ToothbrushA6DataTypeOfflineDataCancel_13 = 0x13, //Cmd toothbrush offline data cancel(APP 取消接收离线历史记录 二级指令 0x13)
  52. ToothbrushA6DataTypeOfflineDataClear_14 = 0x14, //Cmd toothbrush offline data clear(APP 请求清空离线历史记录 二级指令 0x14)
  53. ToothbrushA6DataTypeOfflineData_15 = 0x15, //Data toothbrush offline data(离线历史记录数据上报给 APP 二级指令 0x15)
  54. };
  55. typedef NS_ENUM(NSUInteger, ToothbrushSetResult) {
  56. ToothbrushSetResultSuccess,//Set successfully(设置成功)
  57. ToothbrushSetResultFail,//Setting failed for unknown reason(设置失败,原因未知)
  58. ToothbrushSetResultUnsupported,//Does not support settings(不支持设置)
  59. ToothbrushSetResultLowPower,//Setting failed, battery voltage is low(设置失败,电池电压不足)
  60. ToothbrushSetResultCharging,//Setting failed, charging(设置失败,正在充电)
  61. ToothbrushSetResultWorking,//Setting failed, working(设置失败,正在工作)
  62. };
  63. //Work Phase(工作阶段)
  64. typedef NS_ENUM(NSUInteger, ToothbrushWorkPhaseType) {
  65. ToothbrushWorkPhaseTypeLeftTop,
  66. ToothbrushWorkPhaseTypeLeftBottom,
  67. ToothbrushWorkPhaseTypeRightTop,
  68. ToothbrushWorkPhaseTypeRightBottom
  69. };
  70. //Y axis direction(Y轴方向)
  71. typedef NS_ENUM(NSUInteger, ToothbrushTriaxialDirection) {
  72. ToothbrushTriaxialDirectionYTop_01 = 1,//Y axis up(Y轴朝上)
  73. ToothbrushTriaxialDirectionYBottom_02 = 2,//Y axis down(Y轴朝下)
  74. ToothbrushTriaxialDirectionYLeft_03 = 3,//Y axis left(Y轴朝左)
  75. ToothbrushTriaxialDirectionYRight_04 = 4,//Y axis right(Y轴朝右)
  76. };
  77. typedef struct {
  78. int interval;//operating hours(工作时间)
  79. ToothbrushGearType gearType;//Gear(档位)
  80. ToothSupportGearType supportType;//What Gear(什么档)
  81. } ToothbrushWorkGear, ToothbrushWorkGear;
  82. typedef struct {
  83. ToothbrushGearType gear;
  84. ToothSupportGearType supportType;//一档、二档
  85. ToothbrushWorkPhaseType workPhase;
  86. } ToothBrushWorkPhase, ToothBrushWorkPhase;
  87. //
  88. typedef struct {
  89. int frequency;
  90. int duty;
  91. int interval;
  92. } ToothbrushCustomData, ToothbrushCustomData;
  93. //Brushing data(刷牙数据)
  94. typedef struct {
  95. ToothbrushGearType gear;//Working gear(工作档位)
  96. int workTime;//work time(工作时长)
  97. int leftTime;//Time left(左边时长)
  98. int rightTime;//Right time(右边时长)
  99. int battery;//battery(电量)
  100. } ToothbrushData, ToothbrushData;
  101. //Brushing offline data(刷牙数据)
  102. typedef struct {
  103. unsigned char year;
  104. unsigned char month;
  105. unsigned char day;
  106. unsigned char hour;
  107. unsigned char minute;
  108. unsigned char second;
  109. ToothbrushGearType gearType;
  110. unsigned short workTime;
  111. unsigned short leftTime;
  112. unsigned short rightTime;
  113. unsigned char battery;
  114. } ToothbrushOfflineData;
  115. #endif /* ELToothburshHeader_h */