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.

ELToothburshHeader.h 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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 = 0x00, //Unsupported gear(不支持的档位)
  13. ToothSupportGearTypeOneGear = 0x01, //First gear(一档)
  14. ToothSupportGearTypeTwoGear = 0x02, //Second gear(二档)
  15. };
  16. //Working gear(工作档位)
  17. typedef NS_ENUM(NSUInteger, ToothbrushGearType) {
  18. ToothbrushGearTypeStop = 0x00, //Stop the motor(停止电机)
  19. ToothbrushGearTypeClean = 0x01, //clean(清洁)
  20. ToothbrushGearTypeWhite = 0x02, //Whitening(美白)
  21. ToothbrushGearTypeMassage = 0x03, //massage(按摩)
  22. ToothbrushGearTypeSenstitive = 0x04, //sensitive(敏感)
  23. ToothbrushGearTypePolish = 0x05, //polishing(抛光)
  24. ToothbrushGearTypeGumCare = 0x06, //Gum care(牙龈护理)
  25. ToothbrushGearTypeRefresh = 0x07, //gargle(漱口)
  26. ToothbrushGearTypeMascare = 0x08, //health care(保健)
  27. ToothbrushGearTypeNewbie = 0x09, //Novice(新手)
  28. ToothbrushGearTypeSoft = 0x0A, //Shurou(舒柔)
  29. ToothbrushGearTypeGentle = 0x0B, //gentle(轻柔)
  30. ToothbrushGearTypePamper = 0x0C, //Care(呵护)
  31. ToothbrushGearTypeCustom = 0xFF, //manual setting(手动设置)
  32. };
  33. typedef NS_ENUM(NSUInteger, ToothbrushDataType) {
  34. ToothbrushDataTypeSetGear = 0x02,//Set gear(设置档位)
  35. ToothbrushDataTypeGetGear = 0x03,//Get the current working gear(获取当前工作的档位)
  36. ToothbrushDataTypeTry = 0x06,//try out(试用)
  37. ToothbrushDataTypeWorkPhase = 0x07,//Work Phase(工作阶段)
  38. ToothbrushDataTypeSetCustomData = 0x09,//Set manual setting mode(设置手动设置模式)
  39. ToothbrushDataTypeGetCustomGear = 0x0A,//Get manually set data(获取手动设置的数据)
  40. ToothbrushDataTypeSwitchWork = 0x0B,//Switch toothbrush(开关牙刷)
  41. ToothbrushDataTypeSetTwoGearDefault = 0x0C,//Set second gear default(设置二档默认)
  42. ToothbrushDataTypeGetTwoGearDefault = 0x0D,//Get second gear default(获取二档默认)
  43. ToothbrushDataTypeToothbrushData = 0xFD,//Brushing data(刷牙数据)
  44. ToothbrushDataTypeReportResult = 0xFE,//Report received data result(上报接收数据结果)
  45. };
  46. typedef NS_ENUM(NSUInteger, ToothbrushA6DataType) {
  47. ToothbrushA6DataTypeTriaxialDirection = 0x02, //Get the three-axis direction of the toothbrush(获取牙刷三轴方向)
  48. ToothbrushA6DataTypeTriaxialData = 0x05, //Get toothbrush three-axis data(获取牙刷三轴数据)
  49. };
  50. typedef NS_ENUM(NSUInteger, ToothbrushSetResult) {
  51. ToothbrushSetResultSuccess,//Set successfully(设置成功)
  52. ToothbrushSetResultFail,//Setting failed for unknown reason(设置失败,原因未知)
  53. ToothbrushSetResultUnsupport,//Does not support settings(不支持设置)
  54. ToothbrushSetResultLowPower,//Setting failed, battery voltage is low(设置失败,电池电压不足)
  55. ToothbrushSetResultCharging,//Setting failed, charging(设置失败,正在充电)
  56. ToothbrushSetResultWorking,//Setting failed, working(设置失败,正在工作)
  57. };
  58. //Work Phase(工作阶段)
  59. typedef NS_ENUM(NSUInteger, ToothbrushWorkPhaseType) {
  60. ToothbrushWorkPhaseTypeLeftTop,
  61. ToothbrushWorkPhaseTypeLeftBottom,
  62. ToothbrushWorkPhaseTypeRightTop,
  63. ToothbrushWorkPhaseTypeRightBottom
  64. };
  65. //Y axis direction(Y轴方向)
  66. typedef NS_ENUM(NSUInteger, ToothbrushTriaxialDirection) {
  67. ToothbrushTriaxialDirectionYTop = 1,//Y axis up(Y轴朝上)
  68. ToothbrushTriaxialDirectionYBottom = 2,//Y axis down(Y轴朝下)
  69. ToothbrushTriaxialDirectionYLeft = 3,//Y axis left(Y轴朝左)
  70. ToothbrushTriaxialDirectionYRight = 4,//Y axis right(Y轴朝右)
  71. };
  72. typedef struct{
  73. int interval;//operating hours(工作时间)
  74. ToothbrushGearType gearType;//Gear(档位)
  75. ToothSupportGearType supportType;//What Gear(什么档)
  76. }ToothbrushWorkGear,ToothbrushWorkGear;
  77. typedef struct{
  78. ToothbrushGearType gear;
  79. ToothSupportGearType supportType;//一档、二档
  80. ToothbrushWorkPhaseType workPhase;
  81. }ToothBrushWorkPhase,ToothBrushWorkPhase;
  82. //
  83. typedef struct{
  84. int frequency;
  85. int duty;
  86. int interval;
  87. }ToothbrushCustomData,ToothbrushCustomData;
  88. //Brushing data(刷牙数据)
  89. typedef struct{
  90. ToothbrushGearType gear;//Working gear(工作档位)
  91. int workTime;//work time(工作时长)
  92. int leftTime;//Time left(左边时长)
  93. int rightTime;//Right time(右边时长)
  94. int battery;//battery(电量)
  95. }ToothbrushData,ToothbrushData;
  96. #endif /* ELToothburshHeader_h */