// // ECellCommandProvider.h // ECellBluetooth_Example // // Created by lemo. on 2019/5/14. // Copyright © 2019 chentingfeng. All rights reserved. // #import #import NS_ASSUME_NONNULL_BEGIN @interface ECellCommandProvider : NSObject #pragma mark ======= Set Command ======= /// 同步基础配置(时间/语言)跟随系统同步(默认连接上自动同步) | Synchronization basic configuration (platform/device information/time/language) follows system synchronization(Automatic synchronization on the default connection) + (void)syncConfig; /// 设置当前日期 | Set current date /// @param year 年 | year /// @param month 月 | month /// @param day 日 | day /// @param hour 时 | hour /// @param min 分 | min /// @param second 秒 | second /// @param is12Hour 时间制 | time system + (void)setDateCommandYear:(NSInteger)year month:(NSInteger)month day:(NSInteger)day hour:(NSInteger)hour min:(NSInteger)min second:(NSInteger)second is12Hour:(BOOL)is12Hour callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 系统用户设置 | Set System user Settings /// @param languageCode 0:中文 1:英文 2.俄罗斯语 3.西班牙语 4.德国 5.意大利 6.法国 7.葡萄牙 8.波兰语 9.荷兰 10.希腊 11.土耳其 12.罗马尼亚 13.日语 14.繁体(目前只支持M6) 15.希伯来语 16.丹麦语 17.塞尔维亚语 18:其他 | 0: Chinese 1: English 2. Russian 3. Spanish 4. Germany 5. Italy 6. France 7. Portugal 8. Polish 9. Netherlands 10. Greece 11. Turkey 12. Romania 13. Japanese 14. Traditional (currently only supported M6) 15. Hebrew 16. Danish 17. Serbian 18: others /// @param is12Hour 时间制 | time system + (void)setSystemUserCommandLanguageCode:(NSInteger)languageCode is12Hour:(BOOL)is12Hour callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 用户信息设置 | Set User information Settings /// @param gender 0:女 1:男 | 0: female 1: male /// @param age 年龄 | age /// @param height 身高(cm) | height(cm) /// @param weight 体重(kg) | weight(kg) /// @param goal 运动目标(步数) | Moving target (steps) /// @param BMI BMI + (void)setUserInfoCommandGender:(NSInteger)gender age:(NSInteger)age height:(NSInteger)height weight:(NSInteger)weight goal:(NSInteger)goal BMI:(NSInteger)BMI callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 设置推送 | Set the push /// @param pushValue 推送值 0:推送所有 1:关闭推送(bit0:来电 bit1:短信 bit2:QQ bit3: 微信 bit4:whatsapp bit5:Messenger bit6:Twitter bit7:linkedin bit8:Instagram bit9:facebook bit10:others bit11:line bit12:viber bit13:skype bit14:Outlook)| /// push value 0:push all 1:close push(Bit0: call bit1: SMS bit2: QQ bit3: WeChat bit4: whatsapp bit5: Messenger bit6: Twitter bit7: linkedin Bit8: Instagram bit9: facebook bit10: others bit11:line bit12:viber bit13:skype bit14:Outlook) + (void)setPushCommandPushValue:(NSInteger)pushValue callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 设置心率检测 | Set heart rate detection /// @param isOpen 开关 | switch /// @param startHour 开始时 | start hour /// @param startMin 开始分 | start min /// @param endHour 结束时 | end hour /// @param endMin 结束分 | end min /// @param interval 间隔(分钟)10的倍数 | interval(min) + (void)setHeartRateCheckCommandIsOpen:(BOOL)isOpen startHour:(NSInteger)startHour startMin:(NSInteger)startMin endHour:(NSInteger)endHour endMin:(NSInteger)endMin interval:(NSInteger)interval callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 设置勿扰模式 | Set do not disturb mode /// @param isOpen 开关 | switch /// @param startHour 开始时 | start hour /// @param startMin 开始分 | start min /// @param endHour 结束时 | end hour /// @param endMin 结束分 | end min + (void)setNotDisturbCommandIsOpen:(BOOL)isOpen startHour:(NSInteger)startHour startMin:(NSInteger)startMin endHour:(NSInteger)endHour endMin:(NSInteger)endMin callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 设置喝水提醒 | Set a water reminder /// @param isOpen 开关 | switch /// @param startHour 开始时 | start hour /// @param startMin 开始分 | start min /// @param endHour 结束时 | end hour /// @param endMin 结束分 | end min /// @param cycle 重复 0:表示仅一次 1:表示每天重复(bit0 - bit6分别表示周一到周日的重复设置,所有位都为0时,表示只提醒一次) | Repeat 0: only once 1: every day (bit0-bit6 is the repeat setting from Monday to Sunday, and when all bits are 0, it is only reminded once) /// @param interval 间隔(分钟)| interval(min) + (void)setDrinkRemindCommandIsOpen:(BOOL)isOpen startHour:(NSInteger)startHour startMin:(NSInteger)startMin endHour:(NSInteger)endHour endMin:(NSInteger)endMin cycle:(NSInteger)cycle interval:(NSInteger)interval callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 设置久坐提醒 | Set a sedentary reminder /// @param isOpen 开关 | switch /// @param startHour 开始时 | start hour /// @param endHour 结束时 | end hour /// @param cycle 重复 0:表示仅一次 1:表示每天重复(bit0 - bit6分别表示周一到周日的重复设置,所有位都为0时,表示只提醒一次) | Repeat 0: only once 1: every day (bit0-bit6 is the repeat setting from Monday to Sunday, and when all bits are 0, it is only reminded once) /// @param sittingTime 久坐时间(分钟)超过这个时间提醒 | Sitting time (min) Over this time reminder /// @param sittingThreshold 久坐阈值(步数)以小时为单位久坐时间内,步数低于这个阈值才提醒 | Sedentary threshold(Step) + (void)setSedentaryCommandIsOpen:(BOOL)isOpen startHour:(NSInteger)startHour endHour:(NSInteger)endHour cycle:(NSInteger)cycle sittingTime:(NSInteger)sittingTime sittingThreshold:(NSInteger)sittingThreshold callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 设置闹钟 | Set the alarm clock /// @param alarms 闹钟模型数组(最多5个)| Alarm clock model array (up to 5) /// alarms: @[@{@"hour": Int, @"min": Int, @"cycle": Int, @"label": Int(0:闹钟 1:会议), @"isOpen": BOOL}] + (void)setAlarmClockCommandAlarms:(NSArray *)alarms callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 设置单位 | Set the unit /// @param measure 度量单位(0:公制 1:英制) | Unit of measure (0: metric 1: imperial) /// @param temperature 温度(0: 摄氏度 1:华氏摄氏度)| Temperature (0: Celsius 1: Fahrenheit) + (void)setUnitCommandMeasure:(NSInteger)measure temperature:(NSInteger)temperature callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 设置运动目标 | Set a moving target /// @param step 步数 | step /// @param sportMode 0: 日常计步 1:走路 2: 跑步 3: 骑行 4: 爬山 | 0: daily step counting 1: walking 2: running 3: cycling 4: climbing + (void)setSportTargetCommandStep:(NSInteger)step sportMode:(NSInteger)sportMode callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 天气推送 | Set weather push /// @param lowTemperature 低温 | low temperature /// @param highTemperature 高温 | hight temperature /// @param weatherType 天气类型(0:晴 1:阴 2:雨 3:雪) | weather type(0: fine 1: Yin 2: rain 3: snow) /// @param currenTemperature 当前温度 | curren temperature + (void)setWeatherPushCommandLowTemperature:(NSInteger)lowTemperature highTemperature:(NSInteger)highTemperature weatherType:(NSInteger)weatherType currenTemperature:(NSInteger)currenTemperature callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 设置提醒模式 /// @param remindType 提醒方式 1:亮屏 2:震动 3:亮屏+震动 | Reminder 1: bright screen 2: vibration 3: bright screen + vibration + (void)setRemindModelCommandRemindType:(NSInteger)remindType callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; #pragma mark ======= Get Command ======= /// 获取固件版本信息 | Get firmware information + (void)getFirmwareInfoCommand:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType, NSDictionary *_Nullable json))callback; /// 获取电量 | Get attery + (void)getBatteryCommand:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType, NSDictionary *_Nullable json))callback; /// 获取配置信息 | Get configuration information + (void)getProfileCommand:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType, NSDictionary *_Nullable json))callback; /// 获取当前实时数据 | Get the current real-time data /// @param type 1:睡眠 2:心率 3:计步 4:运动模式 | 1: sleep 2: heart rate 3: count steps 4: exercise mode + (void)getRealTimeDataCommandType:(NSInteger)type callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType, NSDictionary *_Nullable json))callback; /// 获取指定日期健康数据 | Gets health data for the specified date /// @param type 1:睡眠,2:心率,3:计步,4:运动 5:血压 6:血氧 | 1: sleep, 2: heart rate, 3: step counting, 4: exercise 5: blood pressure 6: blood oxygen /// @param year 年 /// @param month 月 /// @param day 日 /// 设备最多保存七天数据 | The device holds data for up to seven days + (void)getHealthDataCommandType:(NSInteger)type year:(NSInteger)year month:(NSInteger)month day:(NSInteger)day callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType, NSDictionary *_Nullable json))callback; #pragma mark ======= Control Command ======= /// 查找设备 | Find device + (void)findDeviceCommand:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 抬手亮屏 | Raised my hand against the bright screen /// @param hand 0:左手 1:右手 | 0: left hand 1: right hand /// @param raise 0:抬手亮屏关闭 1:抬手亮屏开启 | 0: turn off the bright screen 1: turn on the bright screen /// @param flip 0:翻腕亮屏关闭 1:翻腕亮屏开启 | 0: turn wrist bright screen off 1: turn wrist bright screen on + (void)gesturesControlCommandHand:(NSInteger)hand raise:(NSInteger)raise flip:(NSInteger)flip callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 远程拍照控制 | Remote camera control /// @param isOpen 0:相机已关闭 1:相机已打开 | 0: camera closed 1: camera on + (void)cameraControlCommandIsOpen:(NSInteger)isOpen callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; #pragma mark ======= Listen Command ======= /// 设备主动上报蓝牙数据 | The device actively reports bluetooth data + (void)listenDevceReportCommand:(void(^_Nullable)(ECell_BLE_REPORT_COMMAND reportCmd, NSDictionary *_Nullable json))callback; #pragma mark ======= Send Command ======= /// FLASH数据发送命令 | FLASH data send command /// @param total 总包数 /// @param curren 当前包序号 /// @param lenght 数据长度 /// @param data 数据 + (void)sendFlashDataCommandTotal:(NSInteger)total curren:(NSInteger)curren lenght:(NSInteger)lenght data:(NSData *)data callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 表盘推送启动 | Dial push start /// @param number 第几个表盘 | number dial /// @param type 0:删除表盘 1:增加表盘 2:更新表盘 | 0: delete dial 1: add dial 2: update dial /// @param fileLenght 文件大小 | The file lenght + (void)sendDialPushCommandNumber:(NSInteger)number type:(NSInteger)type fileLenght:(NSInteger)fileLenght callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 透传数据 /// @param paramData 参数数据 /// @param callback 回调结果 + (void)customParamData:(nullable NSData *)paramData callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType, NSDictionary *_Nullable json))callback; /// 恢复出厂设置 /// @param callback 回调结果 + (void)restoreFactoryCommand:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 睡眠设置 /// @param ONOFF 0:关闭 1:开启 /// @param startHour 开始时间(时分秒,格式如:221000:晚上22点10分00秒) /// @param endHour 结束时间(时分秒,格式如:061000:早上6点10分00秒) /// @param callback 回调结果 + (void)setSleepCommandWithONOFF:(BOOL)ONOFF startHour:(NSInteger)startHour endHour:(NSInteger)endHour callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 解除绑定 /// @param callback 回调结果 + (void)rescindDindingCommand:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 气象指数推送 /// @param UV 紫外线 /// @param pressure 气压 /// @param altitude 海拔 /// @param callback 回调结果 + (void)weatherIndexWithCommandWithUV:(NSString *)UV Pressure:(NSString *)pressure Altitude:(NSString *)altitude callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 固件升级启动 /// @param updateData 固件升级包数据 /// @param callback 回调结果 + (void)firmwareUpdateWithUpdateData:(NSData *)updateData callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; /// 设备绑定 /// @param uid 用户ID /// @param mscMsg MAC信息 /// @param callback 回调结果 + (void)setDeviceBindingWithUid:(NSString *)uid MacMsg:(NSString *)mscMsg callback:(void(^_Nullable)(ECell_BLE_COMMAND_ERROR_TYPE errorType))callback; @end NS_ASSUME_NONNULL_END