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.

660 lines
16 KiB

2 years ago
//
// BLEBaseBl.h
// BluetoothDemo
//
// Created by mac on 17/3/13.
// Copyright © 2017年 . All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "BLEBLDelegate.h"
#import "BluetoothDelegate.h"
#import "BlueToothEume_FireBoltt.h"
2 years ago
@interface BLEBaseBlFireBoltt : NSObject <BluetoothDelegate>
2 years ago
@property (nonatomic, weak) id<BLEBLDelegate> delegate;
+ (nullable instancetype)shareInstance;
/**
*/
- (void)findDeviceWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd;
2 years ago
/**
*/
- (void)setIngTimeWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd;
2 years ago
/**
*/
- (void)bindingDeviceWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd;
2 years ago
/**
*/
- (void)syncContactWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
contentArr:(NSArray *)contentArr;
/**
@param cmd
@param payType 1:zfb收款码23Paypal收款码4.
2 years ago
@param qrCodeImg
*/
- (void)qrCodePushWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
PayType:(NSInteger)payType
qrCodeImg:(UIImage *)qrCodeImg;
/**
WIFI
*/
- (void)watchWifiWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd;
2 years ago
/**
*/
- (void)inputStartWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd;
2 years ago
/**
@param cmd
@param content
*/
- (void)inputSendWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
content:(NSString *)content;
/**
@param cmd
@param content
*/
- (void)shearPlateWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
content:(NSString *)content;
/**
*/
- (void)inputEndWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd;
2 years ago
/**
@param cmd
@param dialType
*/
- (void)dialPushWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
dialType:(NSInteger)dialType;
/**
使#
@param cmd
@param urgentNumber
*/
- (void)urgentDialWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
urgentNumber:(NSString *)urgentNumber;
/**
key 0xA0
@param type 1234 (使,720) 5: 6:
@param timeArr (),
*/
- (void)syncHealthWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
Type:(NSInteger)type
timeArr:(NSArray *)timeArr;
/**
*/
- (void)syncDialPushFB;
2 years ago
/**
WIFI需要密码
*/
- (void)wifiPassWordWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
SSID:(NSString *)SSID
PassWord:(NSString *)passWord;
/**
WIFI
*/
- (void)wifiLinkWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
NetworkId:(NSString *)networkId;
/**
WIFI无需密码
*/
- (void)wifiNoPassWordWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
SSID:(NSString *)SSID;
/** 固件升级启动
@param updateData
*/
- (void)firmwareUpdateWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
UpdateData:(NSData *)updateData;
/**
*/
- (void)firmwareVersionWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd;
2 years ago
/**
@param alarmClockArr (&&)
*/
- (void)setAlarmClockWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
AlarmClockArr:(NSArray *)alarmClockArr;
/**
@param gender 0: 1:
@param age
@param height
@param weight
@param goal
*/
- (void)setUserInfoWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
gender:(NSString *)gender
age:(NSString *)age
height:(NSString *)height
weight:(NSString *)weight
Goal:(NSString *)goal
BMI:(NSString *)BMI;
/**
@param ONOFF 0: 1:
*/
- (void)setTheLostWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
ONOFF:(BOOL)ONOFF;
/**
@param ONOFF 0: 1:
@param StartTime
@param endTime
@param cycle
@param sittingTime
@param sittingThreshold
*/
- (void)setSedentaryWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
ONOFF:(BOOL)ONOFF
StartTime:(NSString *)StartTime
EndTime:(NSString *)endTime
Cycle:(NSString *)cycle
SittingTime:(NSString *)sittingTime
SittingThreshold:(NSString *)sittingThreshold;
/**
(使)
@param ONOFF 0: 1:
*/
- (void)setSleepWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
ONOFF:(BOOL)ONOFF;
/**
(key 0x27)
@param cmd
*/
- (void)setSystemUserWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd;
2 years ago
/**
(key 0x28)
@param ONOFF 使 0: 1
@param startTime +
@param endTime +
@param cycle
@param interval
*/
- (void)setDrinkRemindWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
DrinkONOFF:(BOOL)ONOFF
StartTime:(NSString *)startTime
EndTime:(NSString *)endTime
Cycle:(NSString *)cycle
Interval:(NSString *)interval;
/**
(key 0x40)
*/
- (void)requestBatteryWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd;
2 years ago
/**
(key 0x42)
*/
- (void)unbundledDeviceWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd;
2 years ago
/**
(key 0x46) ->使
@param ONOFF 0: 1:
*/
- (void)cameraSwitchWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
ONOFF:(BOOL)ONOFF;
/**
(key 0x49)
@param isVertical 0:1:
*/
- (void)relationDisplayWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
IsVertical:(BOOL)isVertical;
/**
(key 0x4A)
@param hand 0: 1:
@param raise 0: 1:
@param flip 0: 1:
*/
- (void)gesturesControlWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
Hand:(NSInteger)hand
Raise:(BOOL)raise
Flip:(BOOL)flip;
/**
key 0x64
@param ONOFF 使 1: 0:
@param startTime
@param endTime
*/
- (void)notDisturbWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
ONOFF:(BOOL)ONOFF
StartTime:(NSString *)startTime
EndTime:(NSString *)endTime;
/**
key 0x65
@param remindType 1: 2: 3:+
*/
- (void)remindModelWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
RemindType:(NSInteger)remindType;
/**
key 0xB0
@param syncType 1 2 3 4 5 6: 7 8
*/
- (void)realTimesyncWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
SyncType:(NSInteger)syncType;
/**
key 0x2D)
@param cmd
*/
- (void)readBraceletSetWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd;
2 years ago
/**
key 0x2E)
@param cmd
*/
- (void)readProfileWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd;
2 years ago
/**
@param cmd
@param targetSteps
@param sportMode 0: 1: 2: 3:
*/
- (void)setSportTargetWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
TargetSteps:(NSInteger)targetSteps
SportMode:(NSInteger)sportMode;
/**
@param cmd
@param value
*/
- (void)setPushWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
value:(NSInteger)value;
/**
@param cmd
@param ONOFF
@param startTime
@param endTime
@param interval
*/
- (void)setHeartRateCheckWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
RateONOFF:(BOOL)ONOFF
StartTime:(NSString *)startTime
EndTime:(NSString *)endTime
Interval:(NSString *)interval;
/// 天气推送(最多三天,当天、明天、后天)
/// @param cmd 命令类型
/// @param weathers 天气数组[{low: Strting, high: Strting, current: Strting, weatherType: Int}]
- (void)setWeatherPushWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
Weathers:(NSArray *)weathers;
/**
@param cmd
@param lowTemperature 1
@param highTemperature 1
@param weatherType 1
@param lowTemperature2 2
@param highTemperature2 2
@param weatherType2 2
*/
- (void)setWeather2PushWithBleCmdTypeFB:(BleCMD_FireBoltt)cmd
2 years ago
LowTemperature:(NSString *)lowTemperature
HighTemperature:(NSString *)highTemperature
WeatherType:(NSInteger)weatherType
LowTemperature2:(NSString *)lowTemperature2
HighTemperature2:(NSString *)highTemperature2
WeatherType2:(NSInteger)weatherType2;
/**
@param cmd
@param UV 线
@param pressure
@param altitude
*/
- (void)weatherIndexWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
UV:(NSString *)UV
Pressure:(NSString *)pressure
Altitude:(NSString *)altitude;
/**
@param cmd
*/
- (void)restoreFactoryWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd;
2 years ago
/**
@param cmd key 0x01)
@param measure 0: 1:
@param temperature 0: 1:
*/
- (void)unitSettingWithBleCmdTypeFB:(BleCMD_FireBoltt)cmd
2 years ago
measure:(NSInteger)measure
temperature:(NSInteger)temperature;
/**
key 0xE0
@param enterType 0退 1
*/
- (void)enterCheckpointer:(BleCMD_FireBoltt )cmd
2 years ago
enterType:(NSInteger)enterType;
/**
key 0xE1
@param timeDictionary
*/
- (void)submitCheckpointer:(BleCMD_FireBoltt )cmd
2 years ago
timeDictionary:(NSMutableDictionary *)timeDictionary;
/**
*/
- (void)getStateCheckpointer:(BleCMD_FireBoltt)cmd;
2 years ago
/**
*/
- (void)requestSportModeData:(BleCMD_FireBoltt)cmd timeArr:(NSArray *)timeArr ;
2 years ago
/**
@param cmd
@param packetSum
@param packetIndex 1
@param abs 5
@param invoiceData
@param isClear
*/
- (void)invoiceInformationSyncWithBleCmdTypeFB:(BleCMD_FireBoltt)cmd
2 years ago
packetSum:(NSInteger)packetSum
packetIndex:(NSInteger)packetIndex
abs:(NSString *)abs
invoiceData:(NSString *)invoiceData
isClear:(BOOL)isClear;
/**
@param cmd
@param codeType 0zfb 1
2 years ago
@param codeData
@param isClear
*/
- (void)setCollectionCodeWithBleCmdTypeFB:(BleCMD_FireBoltt)cmd
2 years ago
codeType:(NSInteger)codeType
codeData:(NSString *)codeData
isClear:(BOOL)isClear;
/**
@param cmd
@param pushType
*/
- (void)braceletDialPushComplete:(BleCMD_FireBoltt )cmd
2 years ago
pushType:(NSInteger)pushType;
/**
@param cmd
@param pushType
@param dialID ID
@param fileSize
*/
- (void)braceletDialPush:(BleCMD_FireBoltt )cmd
2 years ago
pushType:(NSInteger)pushType
dialID:(NSInteger)dialID
fileSize:(NSInteger)fileSize;
/**
@param cmd
@param pushType
@param Offset
@param keep
@param DialPushData
*/
- (void)braceletDialPushData:(BleCMD_FireBoltt )cmd
2 years ago
pushType:(NSInteger)pushType
offset:(NSInteger)Offset
keep:(NSInteger)keep
dialPushData:(NSData *)DialPushData;
/**
*/
- (void)breatheWithBleCmdTypeFB:(BleCMD_FireBoltt)cmd withTime:(int)time ;
2 years ago
/**
0xB3
*/
- (void)sportStateToDeviceWithBleCmdTypeFB:(BleCMD_FireBoltt)cmd isOn:(int)on sportType:(int)sportType;
2 years ago
/**
GPS信号强度同步到设备
@param cmd
@param dialType
*/
- (void)GPSSignalStrengthWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
dialType:(NSInteger)dialType;
/**
Esim服务
@param cmd
*/
- (void)startEsimWithBleCmdTypeFB:(BleCMD_FireBoltt)cmd;
2 years ago
/**
Esim服务
@param cmd
*/
- (void)endEsimWithBleCmdTypeFB:(BleCMD_FireBoltt)cmd;
2 years ago
/**
EID
@param cmd
*/
- (void)getDeviceEidWithBleCmdTypeFB:(BleCMD_FireBoltt)cmd;
2 years ago
/**
IMEI号
@param cmd
*/
- (void)getDeviceIMEIWithBleCmdTypeFB:(BleCMD_FireBoltt)cmd;
2 years ago
/**
profile列表
@param cmd
*/
- (void)getProfileListWithBleCmdTypeFB:(BleCMD_FireBoltt)cmd;
2 years ago
/**
profile
@param cmd
*/
- (void)enableProfileWithBleCmdTypeFB:(BleCMD_FireBoltt)cmd iccid:(NSString *)iccid;
2 years ago
/**
profile
@param cmd
*/
- (void)disableProfileWithBleCmdTypeFB:(BleCMD_FireBoltt)cmd iccid:(NSString *)iccid;
2 years ago
/**
profile
@param cmd
*/
- (void)deleteProfileWithBleCmdTypeFB:(BleCMD_FireBoltt)cmd iccid:(NSString *)iccid;
2 years ago
/**
@param cmd
@param message message数据
*/
- (void)sendMessageWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
message:(NSString *)message;
/// 发送FLASH数据命令
/// @param cmd 命令类型
/// @param data 数据
- (void)falshSendWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
total:(NSInteger)total
curren:(NSInteger)curren
lenght:(NSInteger)lenght
data:(NSData *)data;
/// 推送表盘
/// @param cmd 命令类型
/// @param number 第几个表盘
/// @param type 0:删除表盘 1:增加表盘 2:更新表盘
/// @param fileLenght 文件大小
- (void)newDialPushWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
number:(NSInteger)number
type:(NSInteger)type
fileLenght:(NSInteger)fileLenght;
/**
@param cmd
@param ONOFF
@param startTime
@param endTime
@param interval
*/
- (void)setTemperatureCheckWithBleCmdTypeFB:(BleCMD_FireBoltt )cmd
2 years ago
RateONOFF:(BOOL)ONOFF
StartTime:(NSString *)startTime
EndTime:(NSString *)endTime
Interval:(NSString *)interval;
/// 杰里表盘推送
- (void)newJerryDialPush:(NSString *)path urlName:(NSString *)urlName fileData:(NSData *)fileData;
@end