123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- //
- // ELToothburshHeader.h
- // Elink
- //
- // Created by iot_user on 2020/5/11.
- // Copyright © 2020 iot_iMac. All rights reserved.
- //
-
- #ifndef ELToothburshHeader_h
- #define ELToothburshHeader_h
-
- #import "ELSDKHeader.h"
-
- typedef NS_ENUM(NSUInteger, ToothSupportGearType) {
- ToothSupportGearTypeUnknown = 0x00, //Unsupported gear(不支持的档位)
- ToothSupportGearTypeOneGear = 0x01, //First gear(一档)
- ToothSupportGearTypeTwoGear = 0x02, //Second gear(二档)
- };
-
-
- //Working gear(工作档位)
- typedef NS_ENUM(NSUInteger, ToothbrushGearType) {
- ToothbrushGearTypeStop = 0x00, //Stop the motor(停止电机)
- ToothbrushGearTypeClean = 0x01, //clean(清洁)
- ToothbrushGearTypeWhite = 0x02, //Whitening(美白)
- ToothbrushGearTypeMassage = 0x03, //massage(按摩)
- ToothbrushGearTypeSenstitive = 0x04, //sensitive(敏感)
- ToothbrushGearTypePolish = 0x05, //polishing(抛光)
- ToothbrushGearTypeGumCare = 0x06, //Gum care(牙龈护理)
- ToothbrushGearTypeRefresh = 0x07, //gargle(漱口)
- ToothbrushGearTypeMascare = 0x08, //health care(保健)
- ToothbrushGearTypeNewbie = 0x09, //Novice(新手)
- ToothbrushGearTypeSoft = 0x0A, //Shurou(舒柔)
- ToothbrushGearTypeGentle = 0x0B, //gentle(轻柔)
- ToothbrushGearTypePamper = 0x0C, //Care(呵护)
- ToothbrushGearTypeCustom = 0xFF, //manual setting(手动设置)
- };
-
- typedef NS_ENUM(NSUInteger, ToothbrushDataType) {
- ToothbrushDataTypeSetGear = 0x02,//Set gear(设置档位)
- ToothbrushDataTypeGetGear = 0x03,//Get the current working gear(获取当前工作的档位)
- ToothbrushDataTypeTry = 0x06,//try out(试用)
- ToothbrushDataTypeWorkPhase = 0x07,//Work Phase(工作阶段)
- ToothbrushDataTypeSetCustomData = 0x09,//Set manual setting mode(设置手动设置模式)
- ToothbrushDataTypeGetCustomGear = 0x0A,//Get manually set data(获取手动设置的数据)
- ToothbrushDataTypeSwitchWork = 0x0B,//Switch toothbrush(开关牙刷)
- ToothbrushDataTypeSetTwoGearDefault = 0x0C,//Set second gear default(设置二档默认)
- ToothbrushDataTypeGetTwoGearDefault = 0x0D,//Get second gear default(获取二档默认)
- ToothbrushDataTypeToothbrushData = 0xFD,//Brushing data(刷牙数据)
- ToothbrushDataTypeReportResult = 0xFE,//Report received data result(上报接收数据结果)
- };
-
- typedef NS_ENUM(NSUInteger, ToothbrushA6DataType) {
- ToothbrushA6DataTypeTriaxialDirection = 0x02, //Get the three-axis direction of the toothbrush(获取牙刷三轴方向)
- ToothbrushA6DataTypeTriaxialData = 0x05, //Get toothbrush three-axis data(获取牙刷三轴数据)
- };
-
-
- typedef NS_ENUM(NSUInteger, ToothbrushSetResult) {
- ToothbrushSetResultSuccess,//Set successfully(设置成功)
- ToothbrushSetResultFail,//Setting failed for unknown reason(设置失败,原因未知)
- ToothbrushSetResultUnsupport,//Does not support settings(不支持设置)
- ToothbrushSetResultLowPower,//Setting failed, battery voltage is low(设置失败,电池电压不足)
- ToothbrushSetResultCharging,//Setting failed, charging(设置失败,正在充电)
- ToothbrushSetResultWorking,//Setting failed, working(设置失败,正在工作)
- };
- //Work Phase(工作阶段)
- typedef NS_ENUM(NSUInteger, ToothbrushWorkPhaseType) {
- ToothbrushWorkPhaseTypeLeftTop,
- ToothbrushWorkPhaseTypeLeftBottom,
- ToothbrushWorkPhaseTypeRightTop,
- ToothbrushWorkPhaseTypeRightBottom
- };
-
- //Y axis direction(Y轴方向)
- typedef NS_ENUM(NSUInteger, ToothbrushTriaxialDirection) {
- ToothbrushTriaxialDirectionYTop = 1,//Y axis up(Y轴朝上)
- ToothbrushTriaxialDirectionYBottom = 2,//Y axis down(Y轴朝下)
- ToothbrushTriaxialDirectionYLeft = 3,//Y axis left(Y轴朝左)
- ToothbrushTriaxialDirectionYRight = 4,//Y axis right(Y轴朝右)
- };
-
-
-
- typedef struct{
- int interval;//operating hours(工作时间)
- ToothbrushGearType gearType;//Gear(档位)
- ToothSupportGearType supportType;//What Gear(什么档)
- }ToothbrushWorkGear,ToothbrushWorkGear;
-
- typedef struct{
- ToothbrushGearType gear;
- ToothSupportGearType supportType;//一档、二档
- ToothbrushWorkPhaseType workPhase;
- }ToothBrushWorkPhase,ToothBrushWorkPhase;
- //
- typedef struct{
- int frequency;
- int duty;
- int interval;
- }ToothbrushCustomData,ToothbrushCustomData;
-
- //Brushing data(刷牙数据)
- typedef struct{
- ToothbrushGearType gear;//Working gear(工作档位)
- int workTime;//work time(工作时长)
- int leftTime;//Time left(左边时长)
- int rightTime;//Right time(右边时长)
- int battery;//battery(电量)
-
- }ToothbrushData,ToothbrushData;
-
- #endif /* ELToothburshHeader_h */
|