소스 검색

修改:1. 更新牙刷SDK代码 2.增加牙刷得分算法

tags/v1.5.1^0
larryzhang 2 년 전
부모
커밋
e5721bdba6
55개의 변경된 파일1871개의 추가작업 그리고 1557개의 파일을 삭제
  1. 4
    4
      AILinkBleSDKDemo.xcodeproj/project.pbxproj
  2. BIN
      AILinkBleSDKDemo/AILinkBleSDK.framework/AILinkBleSDK
  3. 125
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/AILinkBleSDK-umbrella.h
  4. 113
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELAutomaticThermometerBleManager.h
  5. 29
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELAutomaticThermometerDataModel.h
  6. 129
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELAutomaticThermometerFunction1Model.h
  7. 67
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELAutomaticThermometerFunction2Model.h
  8. 77
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELAutomaticThermometerHeader.h
  9. 2
    2
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBabyScaleBleManager.h
  10. 38
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBabyScaleDisposeDataTool.h
  11. 54
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBfsLeaOneDataModel.h
  12. 3
    3
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBleDisposeDataTool.h
  13. 1
    1
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBlePublicTool.h
  14. 44
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBloodAnalysisDataTool.h
  15. 44
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBloodBleWifiAnalysisDataTool.h
  16. 1
    1
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBluetoothManager+BleWifi_Callback.h
  17. 2
    2
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBluetoothManager+Settings.h
  18. 3
    3
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBluetoothManager+Settings_Callback.h
  19. 16
    3
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBluetoothManager.h
  20. 2
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBodyFatScaleBleHeader.h
  21. 4
    4
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBodyFatScaleBleManager.h
  22. 3
    3
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBodyIndexAlgorithmModel.h
  23. 7
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELCM02_BleHeader.h
  24. 27
    1
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELCM02_BleManager.h
  25. 4
    4
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELCM02_BleSupportFunctionModel.h
  26. 9
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELCM02_HeartbeatBleModel.h
  27. 1
    1
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELEightScaleBleManager.h
  28. 47
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELFasciaGunBleDataModel.h
  29. 65
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELFasciaGunBleManager.h
  30. 1
    1
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELFoodThermometerBleManager.h
  31. 44
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELForeheadAnalysisDataTool.h
  32. 7
    7
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELHeightBodyFatScaleBleManager.h
  33. 44
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELHeightGaugeAnalysisDataTool.h
  34. 177
    10
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELHygrothermographBleHeader.h
  35. 203
    4
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELHygrothermographBleManager.h
  36. 5
    2
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELPeripheralModel.h
  37. 60
    24
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELSDKHeader.h
  38. 3
    3
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELSkipBleDataModel.h
  39. 34
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELTLVModel.h
  40. 107
    2
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELThermometerBleManager.h
  41. 6
    1
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELThermometerBleModel.h
  42. 21
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELThermometerDisposeDataTool.h
  43. 12
    2
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELToothbrushBleManager.h
  44. 40
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELToothbrushScoreAlgorithmTool.h
  45. 20
    2
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELToothburshHeader.h
  46. 22
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELbloodPresureBleWifiDataModel.h
  47. 128
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ElBloodBleWifiManager.h
  48. BIN
      AILinkBleSDKDemo/AILinkBleSDK.framework/Info.plist
  49. 6
    0
      AILinkBleSDKDemo/AILinkBleSDK.framework/Modules/module.modulemap
  50. BIN
      AILinkBleSDKDemo/AILinkBleSDK.framework/_CodeSignature/CodeDirectory
  51. BIN
      AILinkBleSDKDemo/AILinkBleSDK.framework/_CodeSignature/CodeRequirements
  52. BIN
      AILinkBleSDKDemo/AILinkBleSDK.framework/_CodeSignature/CodeRequirements-1
  53. 0
    1467
      AILinkBleSDKDemo/AILinkBleSDK.framework/_CodeSignature/CodeResources
  54. BIN
      AILinkBleSDKDemo/AILinkBleSDK.framework/_CodeSignature/CodeSignature
  55. 10
    0
      README.md

+ 4
- 4
AILinkBleSDKDemo.xcodeproj/project.pbxproj 파일 보기

@@ -1008,7 +1008,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 202107171815;
CURRENT_PROJECT_VERSION = 20221109;
DEVELOPMENT_TEAM = YEU77XR292;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -1027,7 +1027,7 @@
"$(PROJECT_DIR)/AILinkBleSDKDemo/EightScale/HTBodyfat_SDK",
"$(PROJECT_DIR)/AILinkBleSDKDemo/13_EightScale/HTBodyfat_SDK",
);
MARKETING_VERSION = 1.1.2;
MARKETING_VERSION = 1.5.1;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = com.pingwang.AILinkBleSDKDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -1040,7 +1040,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 202107171815;
CURRENT_PROJECT_VERSION = 20221109;
DEVELOPMENT_TEAM = YEU77XR292;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -1059,7 +1059,7 @@
"$(PROJECT_DIR)/AILinkBleSDKDemo/EightScale/HTBodyfat_SDK",
"$(PROJECT_DIR)/AILinkBleSDKDemo/13_EightScale/HTBodyfat_SDK",
);
MARKETING_VERSION = 1.1.2;
MARKETING_VERSION = 1.5.1;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = com.pingwang.AILinkBleSDKDemo;
PRODUCT_NAME = "$(TARGET_NAME)";

BIN
AILinkBleSDKDemo/AILinkBleSDK.framework/AILinkBleSDK 파일 보기


+ 125
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/AILinkBleSDK-umbrella.h 파일 보기

@@ -0,0 +1,125 @@
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif

#import "ELAiFreshNutritionScaleBleHeader.h"
#import "ELAiFreshNutritionScaleBleManager.h"
#import "ELAiFreshNutritionScaleDataModel.h"
#import "ELBleDisposeDataTool.h"
#import "ELBlePublicTool.h"
#import "ELBleWifiDetailModel.h"
#import "ELBluetoothManager+BleWifi.h"
#import "ELBluetoothManager+BleWifi_Callback.h"
#import "ELBluetoothManager+Settings.h"
#import "ELBluetoothManager+Settings_Callback.h"
#import "ELBluetoothManager.h"
#import "ELBodyIndexAlgorithmModel.h"
#import "ELEncryptTool.h"
#import "ELHeightAlgorithmusModel.h"
#import "ELPeripheralModel.h"
#import "ELSDKHeader.h"
#import "ELTempAlgorithmusModel.h"
#import "ELTLVModel.h"
#import "ELWeightAlgorithmusModel.h"
#import "ELAutomaticThermometerBleManager.h"
#import "ELAutomaticThermometerDataModel.h"
#import "ELAutomaticThermometerFunction1Model.h"
#import "ELAutomaticThermometerFunction2Model.h"
#import "ELAutomaticThermometerHeader.h"
#import "ELBabyScaleBleHeader.h"
#import "ELBabyScaleBleHeightModel.h"
#import "ELBabyScaleBleManager.h"
#import "ELBabyScaleBleWeightModel.h"
#import "ELBabyScaleDisposeDataTool.h"
#import "ELBloodBleWifiAnalysisDataTool.h"
#import "ElBloodBleWifiManager.h"
#import "ELbloodPresureBleWifiDataModel.h"
#import "ELBloodAnalysisDataTool.h"
#import "ELBloodBleDataModel.h"
#import "ELBloodBleManager.h"
#import "ELBloodBleSDKHeader.h"
#import "ELBloodSugarBleHeader.h"
#import "ELBloodSugarBleManager.h"
#import "ELBodyFatScaleBleHeader.h"
#import "ELBodyFatScaleBleManager.h"
#import "ELBodyFatScaleBleUserModel.h"
#import "ELBodyFatScaleBleWeightModel.h"
#import "ELBodyFatScaleDeviceModel.h"
#import "ELUnitConvertTool.h"
#import "ELBroadcastHeightGaugeBleDataModel.h"
#import "ELBroadcastHeightGaugeBleHeader.h"
#import "ELBroadcastHeightGaugeBleManager.h"
#import "ELBroadcastNutritionFoodScaleBleHeader.h"
#import "ELBroadcastNutritionFoodScaleBleManager.h"
#import "ELBroadcastNutritionFoodScaleDataModel.h"
#import "ELBfsLeaOneDataModel.h"
#import "ELBroadcastScaleBleHeader.h"
#import "ELBroadcastScaleBleManager.h"
#import "ELBroadcastScaleDataModel.h"
#import "ELCM02_BatteryBleModel.h"
#import "ELCM02_BleHeader.h"
#import "ELCM02_BleManager.h"
#import "ELCM02_BleSupportFunctionModel.h"
#import "ELCM02_HeartbeatBleModel.h"
#import "ELCoffeeScaleBleDataModel.h"
#import "ELCoffeeScaleBleHeader.h"
#import "ELCoffeeScaleBleManager.h"
#import "ELEightScaleBleBfrDataModel.h"
#import "ELEightScaleBleDataModel.h"
#import "ELEightScaleBleManager.h"
#import "ELEightScaleSDKHeader.h"
#import "ELFaceMaskBleDataModel.h"
#import "ELFaceMaskBleHeader.h"
#import "ELFaceMaskBleManager.h"
#import "ELFasciaGunBleDataModel.h"
#import "ELFasciaGunBleManager.h"
#import "ELFoodThermometerBleManager.h"
#import "ELFoodThermometerHead.h"
#import "ELForeheadAnalysisDataTool.h"
#import "ELForeheadBleDataModel.h"
#import "ELForeHeadBleManager.h"
#import "ELForeheadHeader.h"
#import "ELHeightBodyFatScaleBleHeader.h"
#import "ELHeightBodyFatScaleBleManager.h"
#import "ELHeightBodyFatScaleBleWeightBodyModel.h"
#import "ELHeightGaugeAnalysisDataTool.h"
#import "ELHeightGaugeBleDataModel.h"
#import "ELHeightGaugeBleManager.h"
#import "ELHeightGaugeHeader.h"
#import "ELHygrothermographBleHeader.h"
#import "ELHygrothermographBleManager.h"
#import "ELHygrothermographBleRecordData.h"
#import "ELNutritionScaleBleHeader.h"
#import "ELNutritionScaleBleManager.h"
#import "ELNutritionScaleDataModel.h"
#import "ELOximeterBleManager.h"
#import "ELOximeterBleModel.h"
#import "ELOximeterDeviceModel.h"
#import "ELRemoteControlBleHeader.h"
#import "ELRemoteControlBleManager.h"
#import "ELRemoteControlDeviceModel.h"
#import "ELSkipBleDataModel.h"
#import "ELSkipBleHeader.h"
#import "ELSkipBleManager.h"
#import "ELThermometerBleManager.h"
#import "ELThermometerBleModel.h"
#import "ELThermometerDeviceModel.h"
#import "ELThermometerDisposeDataTool.h"
#import "ELToothbrushBleManager.h"
#import "ELToothbrushScoreAlgorithmTool.h"
#import "ELToothburshHeader.h"
#import "ELWheelMonitorBleHeader.h"
#import "ELWheelMonitorBleManager.h"
#import "ELWheelMonitorBleModel.h"

FOUNDATION_EXPORT double AILinkBleSDKVersionNumber;
FOUNDATION_EXPORT const unsigned char AILinkBleSDKVersionString[];


+ 113
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELAutomaticThermometerBleManager.h 파일 보기

@@ -0,0 +1,113 @@
//
// ELAutomaticThermometerBleManager.h
// Elink
//
//

#import "ELBluetoothManager.h"
#import "ELAutomaticThermometerDataModel.h"
#import "ELAutomaticThermometerHeader.h"
#import "ELAutomaticThermometerFunction1Model.h"
#import "ELAutomaticThermometerFunction2Model.h"


NS_ASSUME_NONNULL_BEGIN

@protocol ELAutomaticThermometerBleDelegate;



@interface ELAutomaticThermometerBleManager : ELBluetoothManager


@property (nonatomic,weak) id<ELAutomaticThermometerBleDelegate> automaticThermometerDelegate;

+ (ELAutomaticThermometerBleManager *)shareManager;


// APP 获取设备支持的功能
- (void)sendCmdQuerryDeviceFunctions1;
- (void)sendCmdQuerryDeviceFunctions2;
- (void)sendCmdQuerryDeviceFunctions2Ext;
// 同步单位设置
- (void)sendCmdChangeUnit:(ELDeviceTemperatureUnit)unit;
// 同步音量设置
- (void)sendCmdChangeVol:(UInt8)vol;
// 同步语言设置
- (void)sendCmdChangeLanguage:(UInt8)language;
// 同步自动开机
- (void)sendCmdChangeAutoPowerOnEnabled:(BOOL)enabled;
// 同步测温距离
- (void)sendCmdChangeMeasuringDistance:(UInt8)distance;
// 同步体表校准值
//- (void)sendCmdChangeBodyCalibrationValue:(UInt8)value;
- (void)sendCmdChangeBodyCalibrationAdd;
- (void)sendCmdChangeBodyCalibrationSub;
// 同步计量校准值
//- (void)sendCmdChangeMeasurementCalibrationValue:(UInt8)value;
- (void)sendCmdChangeMeasurementCalibrationAdd;
- (void)sendCmdChangeMeasurementCalibrationSub;
// 同步报警值
//- (void)sendCmdChangeAlarmValue:(UInt16)value;
- (void)sendCmdChangeAlarmValueCelsius:(NSInteger)valueCelsius valueFahrenheit:(NSInteger)valueFahrenheit;
// 同步音效
- (void)sendCmdChangeSoundEffect:(UInt8)effect;
// 同步报警音效
- (void)sendCmdChangeAlarmSoundEffect:(UInt8)effect;
//同步温度值播报开关
- (void)sendCmdChangeTemperatureVoiceSwitchEnabled:(BOOL)enabled;
//同步灵敏度设置
- (void)sendCmdChangeSensibility:(UInt8)value;
//同步自动关机设置
- (void)sendCmdChangeAutoPowerOff:(UInt8)value;
// 恢复默认值
- (void)sendCmdResetDevice;

@end

@interface ELAutomaticThermometerBleManager ()

- (void)autoScan;
- (void)stopAutoScan;
- (void)checkStatus;

@end


@protocol ELAutomaticThermometerBleDelegate <NSObject>

@optional
// 回调蓝牙状态)
- (void)automaticThermometerManagerUpdateState:(ELBluetoothState)state;

// 回调所有体温计设备
- (void)automaticThermometerManagerScanDevices:(NSArray<ELPeripheralModel *> *)devices;

//正在连接中倒计时
- (void)deviceBleCountDown:(NSInteger)count;

//ble version
//- (void)firmwareVersion:(NSString *)version;



// 设备上发温度数据
- (void)automaticThermometerManagerReceiveData:(ELAutomaticThermometerDataModel *)model;

// 设备上发支持的功能
- (void)automaticThermometerManagerDeviceFunctions1:(ELAutomaticThermometerFunction1Model *)functions;
- (void)automaticThermometerManagerDeviceFunctions2:(ELAutomaticThermometerFunction2Model *)functions;
- (void)automaticThermometerManagerDeviceFunctions2Ext:(ELAutomaticThermometerFunction2Model *)functions;

// 设备上发同步设置
//- (void)automaticThermometerManagerChangeOptions:(NSData *)data;
- (void)automaticThermometerManagerChangeOptionsType:(AutomaticThermometerBleDataType)type value:(NSInteger)value success:(BOOL)success;
- (void)automaticThermometerManagerChangeOptionsType:(AutomaticThermometerBleDataType)type valueCelsius:(NSInteger)valueCelsius valueFahrenheit:(NSInteger)valueFahrenheit success:(BOOL)success;

// 设备上发错误码
- (void)automaticThermometerManagerBackDeviceErrorCode:(AutomaticThermometerBleErrorCode)code;


@end

NS_ASSUME_NONNULL_END

+ 29
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELAutomaticThermometerDataModel.h 파일 보기

@@ -0,0 +1,29 @@
//
// ELAutomaticThermometerDataModel.h
// Elink
//
//

#import <Foundation/Foundation.h>
#import "ELSDKHeader.h"
#import "ELAutomaticThermometerHeader.h"

NS_ASSUME_NONNULL_BEGIN

@interface ELAutomaticThermometerDataModel : NSObject


@property (nonatomic, assign) AutomaticThermometerBleDataType dataType; //0x01:体表温度 0x02:计量温度

@property (nonatomic, assign) UInt16 temperature;//温度
@property (nonatomic, assign) ELDeviceTemperatureUnit unit;//单位 0:℃ 1:℉

@property (nonatomic, assign) NSInteger tempPoint; //小数点偏移位置 0:无小数点。 N:N 位小数点。

@property (nonatomic, copy, readonly) NSString *temperatureString;


@end


NS_ASSUME_NONNULL_END

+ 129
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELAutomaticThermometerFunction1Model.h 파일 보기

@@ -0,0 +1,129 @@
//
// ELAutomaticThermometerFunction1Model.h
// AILinkBleSDK
//
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_OPTIONS(NSUInteger, ELAutomaticThermometerSupportLanguage) {
ELAutomaticThermometerSupportLanguage_None = 0,
ELAutomaticThermometerSupportLanguage_DI = 1 << 0, // 滴
ELAutomaticThermometerSupportLanguage_DINGDONG = 1 << 1, // 叮咚
ELAutomaticThermometerSupportLanguage_EN = 1 << 2, // 英语
ELAutomaticThermometerSupportLanguage_IT = 1 << 3, // 意大利语
ELAutomaticThermometerSupportLanguage_HR = 1 << 4, // 韩语
ELAutomaticThermometerSupportLanguage_SP = 1 << 5, // 西班牙语
ELAutomaticThermometerSupportLanguage_JP = 1 << 6, // 日语
ELAutomaticThermometerSupportLanguage_JP1 = 1 << 7, // 日语1
ELAutomaticThermometerSupportLanguage_FR = 1 << 8, // 法语
ELAutomaticThermometerSupportLanguage_UI = 1 << 9, // 越南语
ELAutomaticThermometerSupportLanguage_CB = 1 << 10, // 柬埔寨语
ELAutomaticThermometerSupportLanguage_ML = 1 << 11, // 马来语
ELAutomaticThermometerSupportLanguage_RL = 1 << 12, // 印尼语
ELAutomaticThermometerSupportLanguage_AR = 1 << 13, // 阿拉伯语
ELAutomaticThermometerSupportLanguage_TL = 1 << 14, // 泰语
ELAutomaticThermometerSupportLanguage_PL = 1 << 15, // 波兰语
ELAutomaticThermometerSupportLanguage_CH = 1 << 16, // 中文
ELAutomaticThermometerSupportLanguage_CH0 = 1 << 17, // 中文0
ELAutomaticThermometerSupportLanguage_CH1 = 1 << 18, // 中文1
ELAutomaticThermometerSupportLanguage_CH2 = 1 << 19, // 中文2
ELAutomaticThermometerSupportLanguage_CH3 = 1 << 20, // 中文3
};

typedef NS_OPTIONS(NSUInteger, ELAutomaticThermometerSupportLanguageExt) {
ELAutomaticThermometerSupportLanguageExt_None = 0,
};

typedef NS_ENUM(NSUInteger, ELAutomaticThermometerSupportLanguageValue) {
ELAutomaticThermometerSupportLanguageValue_None = 0x00,
ELAutomaticThermometerSupportLanguageValue_DI = 0x01, // 滴
ELAutomaticThermometerSupportLanguageValue_DINGDONG = 0x02, // 叮咚
ELAutomaticThermometerSupportLanguageValue_EN = 0x03, // 英语
ELAutomaticThermometerSupportLanguageValue_IT = 0x04, // 意大利语
ELAutomaticThermometerSupportLanguageValue_HR = 0x05, // 韩语
ELAutomaticThermometerSupportLanguageValue_SP = 0x06, // 西班牙语
ELAutomaticThermometerSupportLanguageValue_JP = 0x07, // 日语
ELAutomaticThermometerSupportLanguageValue_JP1 = 0x08, // 日语1
ELAutomaticThermometerSupportLanguageValue_FR = 0x09, // 法语
ELAutomaticThermometerSupportLanguageValue_UI = 0x0A, // 越南语
ELAutomaticThermometerSupportLanguageValue_CB = 0x0B, // 柬埔寨语
ELAutomaticThermometerSupportLanguageValue_ML = 0x0C, // 马来语
ELAutomaticThermometerSupportLanguageValue_RL = 0x0D, // 印尼语
ELAutomaticThermometerSupportLanguageValue_AR = 0x0E, // 阿拉伯语
ELAutomaticThermometerSupportLanguageValue_TL = 0x0F, // 泰语
ELAutomaticThermometerSupportLanguageValue_PL = 0x10, // 波兰语
ELAutomaticThermometerSupportLanguageValue_CH = 0x11, // 中文
ELAutomaticThermometerSupportLanguageValue_CH0 = 0x12, // 中文0
ELAutomaticThermometerSupportLanguageValue_CH1 = 0x13, // 中文1
ELAutomaticThermometerSupportLanguageValue_CH2 = 0x14, // 中文2
ELAutomaticThermometerSupportLanguageValue_CH3 = 0x15, // 中文3
};

typedef NS_OPTIONS(NSUInteger, ELAutomaticThermometerSupportSoundEffect) {
ELAutomaticThermometerSupportSoundEffect_None = 0,
ELAutomaticThermometerSupportSoundEffect_Off = 1 << 0, // 关闭
ELAutomaticThermometerSupportSoundEffect_DingDong = 1 << 6, // 叮咚(默认)
ELAutomaticThermometerSupportSoundEffect_Di = 1 << 7, // 嘀
};

typedef NS_OPTIONS(NSUInteger, ELAutomaticThermometerSupportMeasuringDistance) {
ELAutomaticThermometerSupportMeasuringDistance_NONE = 0,
ELAutomaticThermometerSupportMeasuringDistance_0_6 = 1 << 0, // 0.6m
ELAutomaticThermometerSupportMeasuringDistance_0_8 = 1 << 1, // 0.8m
ELAutomaticThermometerSupportMeasuringDistance_1_0 = 1 << 2, // 1.0m
ELAutomaticThermometerSupportMeasuringDistance_1_2 = 1 << 3, // 1.2m
ELAutomaticThermometerSupportMeasuringDistance_1_4 = 1 << 4, // 1.4m
ELAutomaticThermometerSupportMeasuringDistance_1_6 = 1 << 5, // 1.6m
ELAutomaticThermometerSupportMeasuringDistance_1_8 = 1 << 6, // 1.8m
ELAutomaticThermometerSupportMeasuringDistance_2_0 = 1 << 7, // 2.0m
};

@interface ELAutomaticThermometerFunction1Model : NSObject

// 音量配置
@property (nonatomic, assign) BOOL supportVol;
@property (nonatomic, assign) BOOL supportVolGear0;
@property (nonatomic, assign) UInt8 supportVolGearMax;
@property (nonatomic, assign) UInt8 valueVol;
@property (nonatomic, copy, readonly) NSArray<NSNumber *> *valueVolGearList;
// 语言配置
@property (nonatomic, assign) UInt32 supportLanguage;
@property (nonatomic, assign) UInt32 supportLanguageExt;
@property (nonatomic, assign) UInt32 valueLanguage;
@property (nonatomic, copy, readonly) NSArray<NSNumber *> *languageList;
// 音效配置
@property (nonatomic, assign) UInt8 supportSoundEffect; // Bit7: 嘀 Bit6: 叮咚
@property (nonatomic, assign) UInt8 valueSoundEffect; // 0x80: 嘀 0x40: 叮咚(默认)
@property (nonatomic, copy, readonly) NSArray<NSNumber *> *soundEffectList;
// 上电自动开机
@property (nonatomic, assign) BOOL supportAutoPowerOn;
@property (nonatomic, assign) BOOL valueAutoPowerOnEnabled;
// 测温距离
@property (nonatomic, assign) UInt8 supportMeasuringDistance;
@property (nonatomic, assign) UInt8 valueMeasuringDistance;
@property (nonatomic, copy, readonly) NSArray<NSNumber *> *measuringDistanceList;



+ (instancetype)defaultModel;


@end

NS_ASSUME_NONNULL_END

+ 67
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELAutomaticThermometerFunction2Model.h 파일 보기

@@ -0,0 +1,67 @@
//
// ELAutomaticThermometerFunction2Model.h
// AILinkBleSDK
//
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface ELAutomaticThermometerFunction2Model : NSObject

// 报警值(2bytes ,大端序,精度0.1℃)
@property (nonatomic, assign) UInt16 rawValueAlerm; // 精度 0.1℃ 例如 37.5℃(默认报警值) 则 rawValueAlerm = 0x016D
@property (nonatomic, assign) UInt16 rawMinValueAlerm; // 精度 0.1℃ 例如 37.5 则 rawValueAlerm = 0x016D
@property (nonatomic, assign) UInt16 rawMaxValueAlerm; // 精度 0.1℃ 例如 37.5℃ 则 rawValueAlerm = 0x016D
// 报警值(2bytes ,大端序,精度0.1℉)
@property (nonatomic, assign) UInt16 rawValueAlermFahrenheit; // 精度 0.1℉ 例如 37.5℉ 则 rawValueAlerm = 0x016D

// 体表温度校准
@property (nonatomic, assign) BOOL supportBodyCalibration; // 体表温度校准(YES=支持, NO=不支持)
@property (nonatomic, assign) BOOL negativeBodyCalibration; // 体表温度校准正负号(YES=负温度, NO=正温度)
@property (nonatomic, assign) UInt8 rawValueBodyCalibration; // 体表温度校准值(精度 0.1℃)(默认 0)
@property (nonatomic, copy, readonly) NSString *valueBodyCalibrationString;
@property (nonatomic, assign) BOOL negativeFahrenheitBodyCalibration; // 体表温度校准正负号(YES=负温度, NO=正温度)
@property (nonatomic, assign) UInt8 rawValueFahrenheitBodyCalibration; // 体表温度校准值(精度 0.1℉)(默认 0)
@property (nonatomic, copy, readonly) NSString *valueFahrenheitBodyCalibrationString;

// 计量温度校准
@property (nonatomic, assign) BOOL supportMeasurementCalibration; // 计量温度校准(YES=支持, NO=不支持)
@property (nonatomic, assign) BOOL negativeMeasurementCalibration; // 计量温度校准正负号(YES=负温度, NO=正温度)
@property (nonatomic, assign) UInt8 rawValueMeasurementCalibration; // 计量温度校准值(精度 0.1℃)(默认 0)
@property (nonatomic, copy, readonly) NSString *valueMeasurementCalibrationString;
@property (nonatomic, assign) BOOL negativeFahrenheitMeasurementCalibration; // 计量温度校准正负号(YES=负温度, NO=正温度)
@property (nonatomic, assign) UInt8 rawValueFahrenheitMeasurementCalibration; // 计量温度校准值(精度 0.1℉)(默认 0)
@property (nonatomic, copy, readonly) NSString *valueFahrenheitMeasurementCalibrationString;

// 当前温度单位
@property (nonatomic, assign) UInt8 currentUnit; // 当前温度单位 0=℃.(默认) 1=℉


// 温度值播报开关
@property (nonatomic, assign) BOOL supportTemperatureVoiceSwitch; // 温度值播报开关(YES=支持, NO=不支持)
@property (nonatomic, assign) BOOL valueTemperatureVoiceSwitchEnabled; // 设备当前状态(YES=开启温度值播报(默认) , NO=不开启温度值播报), 当设备支持温度值播报开关时,该状态位有有效

// 报警音效配置
@property (nonatomic, assign) UInt8 supportAlarmSoundEffect; // Bit7: 音效1 Bit6: 音效2 Bi0:支持关闭报警音效
@property (nonatomic, assign) UInt8 valueAlarmSoundEffect; // 0x80: 音效1 0x40: 音效2 0x01:关闭报警音效
@property (nonatomic, copy, readonly) NSArray<NSNumber *> *soundAlarmEffectList;

// 灵敏度配置
@property (nonatomic, assign) BOOL supportSensibility; // Bit7: 1=支持调节灵敏度. 0=不支持调节灵敏度
@property (nonatomic, assign) UInt8 supportSensibilityGearMax; // Bit5-Bit0:灵敏度档位数量(例如有5档,则对应1-5档)
@property (nonatomic, assign) UInt8 valueSensibility;
@property (nonatomic, copy, readonly) NSArray<NSNumber *> *valueSensibilityGearList;

// 自动关机配置
@property (nonatomic, assign) UInt8 supportAutoPowerOff;
@property (nonatomic, assign) UInt8 valueAutoPowerOff;
@property (nonatomic, copy, readonly) NSArray<NSNumber *> *autoPowerOffList;


+ (instancetype)defaultModel;

@end

NS_ASSUME_NONNULL_END

+ 77
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELAutomaticThermometerHeader.h 파일 보기

@@ -0,0 +1,77 @@
//
// ELAutomaticThermometerHeader.h
// AILinkBleSDK
//
//

#ifndef ELAutomaticThermometerHeader_h
#define ELAutomaticThermometerHeader_h


// 设备返回数据 type
typedef NS_ENUM(NSInteger, AutomaticThermometerBleDataType) {
// 体表温度
AutomaticThermometerBleDataType_BodyTemperature = 0x01,
// 计量温度
AutomaticThermometerBleDataType_MeasurementTemperature = 0x02,
// 同步单位设置
AutomaticThermometerBleDataType_ChangeUnit = 0x11,
// 同步音量设置
AutomaticThermometerBleDataType_ChangeVol = 0x13,
// 同步语言设置
AutomaticThermometerBleDataType_ChangeLanguage = 0x15,
// 同步自动开机
AutomaticThermometerBleDataType_ChangeAutoPowerOn = 0x17,
// 同步测温距离
AutomaticThermometerBleDataType_ChangeMeasuringDistance = 0x19,
// 同步体表校准值
AutomaticThermometerBleDataType_ChangeBodyCalibrationValue = 0x1B,
// 同步计量校准值
AutomaticThermometerBleDataType_ChangeMeasurementCalibrationValue = 0x1D,
// 同步报警值
AutomaticThermometerBleDataType_ChangeAlarmValue = 0x1F,
// 同步音效
AutomaticThermometerBleDataType_ChangeSoundEffect = 0x21,
// 恢复默认值
AutomaticThermometerBleDataType_ChangeResetDevice = 0x23,
// 同步报警音效
AutomaticThermometerBleDataType_ChangeAlermSoundEffect = 0x25,
// 同步温度值播报开关
AutomaticThermometerBleDataType_ChangeTemperatureVoice = 0x27,
// 同步灵敏度设置
AutomaticThermometerBleDataType_ChangeSensibility = 0x29,
// 同步自动关机设置
AutomaticThermometerBleDataType_ChangeAutoPowerOff = 0x2B,
// 设备支持的功能1
AutomaticThermometerBleDataType_DeviceFunctions1 = 0x81,
// 设备支持的功能2
AutomaticThermometerBleDataType_DeviceFunctions2 = 0x83,
// 设备支持的功能2扩展
AutomaticThermometerBleDataType_DeviceFunctions2Ext = 0x85,
// 设备上发错误码)
AutomaticThermometerBleDataType_DeviceBackErrorCode = 0xFF,
};

typedef NS_ENUM(NSInteger , AutomaticThermometerBleResultType) {
// success(设置成功 )
AutomaticThermometerBleResultType_Succeed = 0x00,
// failure(设置失败)
AutomaticThermometerBleResultType_Failure = 0x01,
// unsupport(不支持设置)
AutomaticThermometerBleResultType_Unsupported = 0x02,
};

typedef NS_ENUM(NSInteger , AutomaticThermometerBleErrorCode) {
// 温度过高(高于 42.0℃显示为 Hi)
AutomaticThermometerBleErrorCode_HighTemperature = 0x00,
// 温度过低(低于 32.0℃显示为 Lo)
AutomaticThermometerBleErrorCode_LowTemperature = 0x01,
};


#endif /* ELAutomaticThermometerHeader_h */


+ 2
- 2
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBabyScaleBleManager.h 파일 보기

@@ -47,9 +47,9 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, weak) id<BabyScaleBleDelegate> babyScaleDelegate;

+(ELBabyScaleBleManager *)shareManager;
//MARK:Hold YES is locked, NO is peeled (return to zero)(hold YES为锁定,NO去皮(归零))
#pragma mark Hold YES is locked, NO is peeled (return to zero)(hold YES为锁定,NO去皮(归零))
-(void)changeHold:(BOOL)hold;
//MARK:Height and weight unit switching(身高和体重单位切换)
#pragma mark Height and weight unit switching(身高和体重单位切换)
-(void)changeHeightUnit:(ELDeviceHeightUnit)heightUnit AndWeightUnit:(ELDeviceWeightUnit)weightUnit;

@end

+ 38
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBabyScaleDisposeDataTool.h 파일 보기

@@ -0,0 +1,38 @@
//
// ELBabyScaleDisposeDataTool.h
// Elink
//
// Created by iot_user on 2019/4/23.
// Copyright © 2019 iot_iMac. All rights reserved.
//

#import "ELBleDisposeDataTool.h"
#import "ELBabyScaleBleWeightModel.h"
#import "ELBabyScaleBleHeightModel.h"
#import "ELBabyScaleBleHeader.h"



NS_ASSUME_NONNULL_BEGIN

@interface ELBabyScaleDisposeDataTool : ELBleDisposeDataTool
#pragma mark ============ 蓝牙数据处理 ==============
#pragma mark 重量
+(ELBabyScaleBleWeightModel *)disposeWeightData:(Byte *)dataByte;
#pragma mark 体重单位切换
+(ELDeviceWeightUnit)disposeChangeWeightUnit:(Byte *)dataByte;
/**
MARK:Hold
0:保持hold,1:取消hold
MCU与APP都可触发这条指令,当此指令触发,则APP与MCU都把重量锁住或释放
*/
+(HoldDataType)disposeHoldData:(Byte *)dataByte;
#pragma mark 身高
+(ELBabyScaleBleHeightModel *)disposeHeightData:(Byte *)dataByte;
#pragma mark 身高单位切换
+(ELDeviceHeightUnit)disposeChangeHeightUnit:(Byte *)dataByte;
#pragma mark ============ 其他方法 ==============

@end

NS_ASSUME_NONNULL_END

+ 54
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBfsLeaOneDataModel.h 파일 보기

@@ -0,0 +1,54 @@
//
// ELBfsLeaOneDataModel.h
// Elink
//
// Created by cliCk on 2021/1/16.
// Copyright © 2021 iot_iMac. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ELBroadcastScaleBleHeader.h"

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(NSInteger, LeaOneDevType) {
/** 体重秤 */
LeaOneDevType_Weight = 0 ,
/** 体脂秤 */
LeaOneDevType_Bfr ,
};

/** lea one 秤返回的数据对象模型 */
@interface ELBfsLeaOneDataModel : NSObject

/** 流水号 */
@property (nonatomic, assign) NSInteger serialNumber;

/** 设备返回的原始体重 */
@property (nonatomic, assign) NSInteger rawWeight;

/** 电阻 */
@property (nonatomic, assign) NSInteger adc;

/** mac地址 */
@property (nonatomic, copy) NSString *mac;

/** 设备类型 */
@property (nonatomic, assign) LeaOneDevType devType;

/** 单位 (仅支持 kg,斤,lb和st:lb) */
@property (nonatomic, assign) ELDeviceWeightUnit unit;

/** 小数位 */
@property (nonatomic, assign) NSInteger weightPoint;

/** 是否为锁定数据 */
@property (nonatomic, assign) BOOL isLockData;

+ (instancetype)initWithDevBleData:(NSData *)data;

+ (BOOL)isLeaOneBroadcastScale:(NSData *)baseData;

@end

NS_ASSUME_NONNULL_END

+ 3
- 3
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBleDisposeDataTool.h 파일 보기

@@ -14,12 +14,12 @@ NS_ASSUME_NONNULL_BEGIN

@interface ELBleDisposeDataTool : NSObject

//MARK:校验和
#pragma mark 校验和
+(BOOL)checksum:(NSData *)data;
//MARK: 广播设备校验和
#pragma mark 广播设备校验和
+(BOOL)broadcastChecksum:(NSData *)data;

#pragma mark ============ 解析A6数据 ==============
#pragma mark ============ 解析A6数据 ==============
/**
解析电池数据


+ 1
- 1
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBlePublicTool.h 파일 보기

@@ -11,7 +11,7 @@
NS_ASSUME_NONNULL_BEGIN

@interface ELBlePublicTool : NSObject
//MARK:Keep decimal places, support for retaining 7 significant digits(保留小数位,支持保留7位有效数字)
#pragma mark Keep decimal places, support for retaining 7 significant digits(保留小数位,支持保留7位有效数字)
+(NSString *)retainPointValue:(double)value withPoint:(NSUInteger)point;
/**
Turn time into time (将时间转成时间截)

+ 44
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBloodAnalysisDataTool.h 파일 보기

@@ -0,0 +1,44 @@
//
// ELBloodAnalysisDataTool.h
// Elink
//
// Created by iot_user on 2019/5/11.
// Copyright © 2019 iot_iMac. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ELBloodBleDataModel.h"
#import "ELSDKHeader.h"

NS_ASSUME_NONNULL_BEGIN

@interface ELBloodAnalysisDataTool : NSObject

+(ELBloodBleDataModel *)analysisBloodData:(NSData *)playload;

/**
解析设置单位
@param playload 原始数据
@return 结果
*/
+(ELSetBluetoothResponseType)analysisSetUnitResult:(NSData *)playload;

/**
解析异常
@param playload 原始数据
@return 异常
*/
+(ELBloodFailCode)analysisFailCode:(NSData *)playload;
 
/**
交互指令

@param playload 原始数据
@return 交互指令类型
*/
+(ELBloodInteractionType)analysisInteraction:(NSData *)playload;
@end

NS_ASSUME_NONNULL_END

+ 44
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBloodBleWifiAnalysisDataTool.h 파일 보기

@@ -0,0 +1,44 @@
//
// ELBloodBleWifiAnalysisDataTool.h
// AILinkBleSDK
//
// Created by iot on 2022/7/12.
// Copyright © 2022 IOT. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ELbloodPresureBleWifiDataModel.h"
#import "ELSDKHeader.h"
NS_ASSUME_NONNULL_BEGIN

@interface ELBloodBleWifiAnalysisDataTool : NSObject

+ (ELbloodPresureBleWifiDataModel *)analysisBloodData:(NSData *)playload;

/**
解析设置单位
@param playload 原始数据
@return 结果
*/
+ (ELSetBluetoothResponseType)analysisSetUnitResult:(NSData *)playload;

/**
解析异常
@param playload 原始数据
@return 异常
*/
+ (ELBloodFailCode)analysisFailCode:(NSData *)playload;
 
/**
交互指令

@param playload 原始数据
@return 交互指令类型
*/
+ (ELBloodInteractionType)analysisInteraction:(NSData *)playload;

@end

NS_ASSUME_NONNULL_END

+ 1
- 1
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBluetoothManager+BleWifi_Callback.h 파일 보기

@@ -13,7 +13,7 @@
NS_ASSUME_NONNULL_BEGIN


//MARK:Bluetooth Wifi protocol(蓝牙Wifi协议)
#pragma mark Bluetooth Wifi protocol(蓝牙Wifi协议)
@protocol ElBleWifiDelegate <NSObject>

@optional

+ 2
- 2
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBluetoothManager+Settings.h 파일 보기

@@ -14,7 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
@interface ELBluetoothManager (Settings)


#pragma mark ============ A6 Set or query instructions(设置或查询指令) ==============
#pragma mark ============ A6 Set or query instructions(设置或查询指令) ==============



@@ -145,7 +145,7 @@ NS_ASSUME_NONNULL_BEGIN
@param vid Manufacturer ID: less than 65536(厂家ID:小于65536)
@param pid Product ID: Less than 65536(产品ID:小于65536)
*/
-(void)setC_V_P_IDWithIsSetCID:(BOOL)setC isSetVID:(BOOL)setV isSetPID:(BOOL)setP CID:(unsigned int)cid VID:(unsigned int)vid PID:(unsigned int)pid;
-(void)setC_V_P_IDWithIsSetCID:(BOOL)setC isSetVID:(BOOL)setV isSetPID:(BOOL)setP CID:(unsigned int)cid VID:(unsigned int)vid PID:(unsigned int)pid DEPRECATED_MSG_ATTRIBUTE("do not support this method any more since 20220505, as same as Android SDK");

/**
Set module communication mode

+ 3
- 3
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBluetoothManager+Settings_Callback.h 파일 보기

@@ -11,7 +11,7 @@
NS_ASSUME_NONNULL_BEGIN


//MARK: Broadcast Equipment Protocol(广播设备协议)
#pragma mark Broadcast Equipment Protocol(广播设备协议)

@protocol ELBleBroadcastDelegate <NSObject>

@@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN



//MARK:蓝牙通用协议
#pragma mark 蓝牙通用协议
@protocol ELBluetoothManagerDelegate <NSObject>
@optional

@@ -57,7 +57,7 @@ NS_ASSUME_NONNULL_BEGIN
/** 回调已经连接到系统的设备 */
//- (void)bluetoothManagerLinkedSysPeripheral:(NSArray *_Nonnull)peripherals;

#pragma mark ============ A6 Set or query the callback of the instruction execution result(设置或查询指令执行结果的回调) ==============
#pragma mark ============ A6 Set or query the callback of the instruction execution result(设置或查询指令执行结果的回调) ==============
/**
Set or query the callback of the instruction execution result(设置指令蓝牙响应回调方法(握手指令除外))


+ 16
- 3
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBluetoothManager.h 파일 보기

@@ -14,8 +14,20 @@
#import "ELBluetoothManager+BleWifi_Callback.h"


//版本号 SDK Version
#define AiLinkBleSDKVersion @"1.5.1" //20221109 更新牙刷sdk 并增加得分算法


NS_ASSUME_NONNULL_BEGIN

/// 有些设备需要页面获取到发送的数据内容,给服务器,监听该通知获得发送数据,保险起见需要判断一个header.内容是data
/// 发送A7不加密数据
static NSString *SEND_A7_BLE_DATA_CONTENT = @"SEND_A7_BLE_DATA_CONTENT";
/// 发送A7加密数据
static NSString *SEND_A7_ENCRYPTED_BLE_DATA_CONTENT = @"SEND_A7_ENCRYPTED_BLE_DATA_CONTENT";
/// 设备返回A7解密的payload数据
static NSString *GET_A7_DECRYPT_BLE_PAYLOAD_DATA_CONTENT = @"GET_A7_DECRYPT_BLE_PAYLOAD_DATA_CONTENT";

@interface ELBluetoothManager : NSObject

@property (nonatomic, assign, readonly) BOOL isOn;
@@ -83,7 +95,7 @@ NS_ASSUME_NONNULL_BEGIN
-(void)syncMCUNowDate;


#pragma mark ============ 发送指令的3种方法 ==============
#pragma mark ============ 发送指令的3种方法 ==============
/**
Shortcut method to send A6 data to BLE(发送A6数据给BLE的快捷方法)
@param data The stitched payload part(拼接好的payload部分)
@@ -96,6 +108,7 @@ NS_ASSUME_NONNULL_BEGIN
*/
-(void)sendCmdToMCUWithA7PayloadData:(NSData *)data deviceType:(ELSupportDeviceType)type;

/// 直接发送A7命令,不加载在队列中
-(void)immediatelySendCmdToMCUWithA7PayloadData:(NSData *)data deviceType:(ELSupportDeviceType)type;

/**
@@ -106,7 +119,7 @@ NS_ASSUME_NONNULL_BEGIN
-(void)sendData:(NSData *)data;


#pragma mark ============ Please rewrite the following methods in the subclass(请在子类重写以下方法) BEGIN==============
#pragma mark ============ Please rewrite the following methods in the subclass(请在子类重写以下方法) BEGIN==============

-(void)bluetoothUpdateState:(ELBluetoothState)state;

@@ -159,7 +172,7 @@ Callback decrypted A7 transparent data (payload part), type device type( 回调
/// @param data custom data(自定义数据)
-(void)bluetoothReceiveBroadcastDataWithCid:(int)cid vid:(int)vid pid:(int)pid mac:(NSString *_Nonnull)mac data:(NSData *_Nonnull)data;

#pragma mark ============ Please rewrite the following methods in the subclass(子类重写方法) END==============
#pragma mark ============ Please rewrite the following methods in the subclass(子类重写方法) END==============




+ 2
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBodyFatScaleBleHeader.h 파일 보기

@@ -68,6 +68,8 @@ typedef NS_ENUM(NSInteger , ELBodyFatScaleBleDataType) {
ELBodyFatScaleBleDataType_MCUBackHeartRateMeasureSuccess = 0x0C ,
/** MCU->APP:心率测量失败 */
ELBodyFatScaleBleDataType_MCUBackHeartRateMeasureFailed = 0x0D ,
/** MCU->APP:MCU请求补全体脂数据 */
ELBodyFatScaleBleDataType_MCUBackNeedsFillBodyData = 0x0E ,

/** App发送指令切换单位 */
ELBodyFatScaleBleDataType_AppSendUnit = 0x81 ,

+ 4
- 4
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBodyFatScaleBleManager.h 파일 보기

@@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN

/**Callback all body fat scales detected( 回调扫描到的所有体脂秤 )*/
- (void)bodyFatScaleManagerScanDevices:(NSArray<ELBodyFatScaleDeviceModel *> *)scaleDevices;
//MARK:回调A7指令数据
#pragma mark 回调A7指令数据

/**
Callback to set unit result(回调设置单位结果)
@@ -74,7 +74,7 @@ MCU requests user information( MCU 请求用户信息)
1:超重
*/
-(void)bodyFatScaleManagerCallBackErrorCode:(NSInteger)code;
//MARK:回调A6指令数据
#pragma mark 回调A6指令数据

/**
Send success or failure callback for offline user list(发送离线用户列表的成功或失败回调)
@@ -122,13 +122,13 @@ MCU requests user information( MCU 请求用户信息)
+ (ELBodyFatScaleBleManager *)shareManager;


#pragma mark ============ 下发A7指令 ==============
#pragma mark ============ 下发A7指令 ==============
- (void)changeBodyFatScaleUnit:(ELDeviceWeightUnit)unit;
- (void)sendCurrentUserToBle:(ELBodyFatScaleBleUserModel *)usr;

-(void)sendReceivedDataResult:(BOOL)result;

#pragma mark ============ 下发A6指令 ==============
#pragma mark ============ 下发A6指令 ==============

-(void)sendOfflineUserListToBle:(NSArray <ELBodyFatScaleBleUserModel *> *)userListArr;


+ 3
- 3
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELBodyIndexAlgorithmModel.h 파일 보기

@@ -155,7 +155,7 @@ typedef NS_ENUM(NSUInteger, AILinkWeightType) {
NS_ASSUME_NONNULL_BEGIN

@interface ELBodyIndexAlgorithmModel : NSObject
#pragma mark ============ 标准判断临界值数组 ==============
#pragma mark ============ 标准判断临界值数组 ==============

/// 四肢肌肉指数 标准判断
/// @param sex 性别
@@ -227,7 +227,7 @@ NS_ASSUME_NONNULL_BEGIN
/// @param weightUnit 体重单位
+ (NSArray<NSString *> *)getWeightScopeHeight:(NSString *)height weightUnit:(ELDeviceWeightUnit)weightUnit;

#pragma mark ============ 判断标准数组 ==============
#pragma mark ============ 判断标准数组 ==============
//四肢肌肉指数标准词条
+(NSArray<NSNumber *> *)getLimbMuscleIndexStandardArray;
///1 体重 判断标准词条Array<AILinkWeightType>
@@ -261,7 +261,7 @@ NS_ASSUME_NONNULL_BEGIN
///18 肥胖等级 判断标准词条Array<AILinkFatLevelType>
+ (NSArray<NSNumber *> *)getFatlevelStandardArray;

#pragma mark ============ 标准判断 ==============
#pragma mark ============ 标准判断 ==============

/// 获取四肢肌肉指数等级
/// @param index 四肢肌肉指数

+ 7
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELCM02_BleHeader.h 파일 보기

@@ -39,6 +39,13 @@ typedef NS_ENUM(NSInteger, CM02_BleDataType) {
CM02_BleDataType_ControlVersion = 0x10 ,
/** 查询仪表固件版本 */
CM02_BleDataType_DashboardVersion = 0x11 ,
/** 开始仪表OTA指令 */
CM02_BleDataType_StartOTA = 0xA0 ,
/** 发送仪表OTA数据 */
CM02_BleDataType_SendOTAData = 0xA1 ,
/** 发送仪表OTA完成指令 */
CM02_BleDataType_EndOTA = 0xA2 ,
};

/** 开机状态 */

+ 27
- 1
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELCM02_BleManager.h 파일 보기

@@ -53,7 +53,18 @@ NS_ASSUME_NONNULL_BEGIN
/** CM02回复仪表编号,硬件版本和软件版本号 */
- (void)CM02ManagerBackDashboardCode:(NSString *)code hardwareVersion:(NSString *)hardwareVersion softwareVersion:(NSString *)softwareVersion;

#pragma mark - 仪表OTA

/** 返回ota是否可以升级和可以接收的最大长度 */
- (void)CM02ManagerBackCanOTA:(BOOL)can maxLength:(int)length;

/** 返回ota升级数据结果以及接受到的数据包编号 */
- (void)CM02ManagerBackOTASendResult:(BOOL)canSendNext index:(long long)index;

/** 返回ota升级结果 */
- (void)CM02ManagerBackOTAUpdateResult:(BOOL)result;

#pragma mark -

@end

@@ -117,7 +128,22 @@ NS_ASSUME_NONNULL_BEGIN
/** 查询仪表盘固件版本 */
- (void)getDashboardVersion;

#pragma mark - 断开设备清除缓存信息
#pragma mark - 仪表OTA

/** 发送OTA开始指令
* @param size : ota文件长度
* @param data : crc32校验码,4个byte
* @param length : 单次发送OTA数据包最大的长度
*/
- (void)sendStartOTAWithFileSize:(long long)size crc32Data:(NSData *)data maxPacketLength:(int)length;

/** 发送OTA数据 */
- (void)sendOTAUpdateFileWithIndex:(long long)index data:(NSData *)data;

/** 发送OTA完成指令 */
- (void)sendEndOTACommand;

#pragma mark - 断开设备清除缓存信息

- (void)cleanData;


+ 4
- 4
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELCM02_BleSupportFunctionModel.h 파일 보기

@@ -26,11 +26,11 @@ NS_ASSUME_NONNULL_BEGIN
/** 支持的档位个数 */
@property (nonatomic, assign) NSInteger gearNum;

/** 是否支持助力模式 */
@property (nonatomic, assign) BOOL helpMode;
/** 是否支持定速巡航功能, 0:不支持,1:支持 */
@property (nonatomic, assign, getter=isCruiseSupported) BOOL cruiseSupported;

/** 定速巡航开关 */
@property (nonatomic, assign) BOOL cruiseControl;
/** 是否支持定速巡航开关, 0:不支持,1:支持 */
@property (nonatomic, assign, getter=isCruiseControlSupported) BOOL cruiseControlSupported;

/** 是否支持零启动和非零启动切换 */
@property (nonatomic, assign) BOOL speedStartChange;

+ 9
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELCM02_HeartbeatBleModel.h 파일 보기

@@ -50,9 +50,18 @@ NS_ASSUME_NONNULL_BEGIN
/** 模式 */
@property (nonatomic, assign) enum CM02_Mode mode;

/** 车辆支持的最高速度,单位KM/H */
@property (nonatomic, assign) NSInteger topSpeedSupported;

/** 最低档位是否从0开始 */
@property (nonatomic, assign, getter=isGearStartAtZero) BOOL gearStartAtZero;

/** 档位(1-7) */
@property (nonatomic, assign) NSInteger gear;

/** 支持的档位个数 */
@property (nonatomic, assign) NSInteger gearsCount;


/** 转把是否有效 */
@property (nonatomic, assign) BOOL turnHandleEffective;

+ 1
- 1
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELEightScaleBleManager.h 파일 보기

@@ -91,7 +91,7 @@ NS_ASSUME_NONNULL_BEGIN
+(instancetype)shareManager;


#pragma mark ============ 发送数据指令给蓝牙 ==============
#pragma mark ============ 发送数据指令给蓝牙 ==============

/// Switch weight unit(切换体重单位)
/// @param unit Weight unit(体重单位)

+ 47
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELFasciaGunBleDataModel.h 파일 보기

@@ -0,0 +1,47 @@
//
// ELFasciaGunBleDataModel.h
// AILinkBleSDK
//
// Created by LarryZhang on 2022/1/15.
// Copyright © 2022 IOT. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(UInt8, FasciaGunChargingStatus);

@interface ELFasciaGunBleDataModel : NSObject

@property (nonatomic, assign) BOOL started;

@property (nonatomic, assign) UInt16 workingTime;


@property (nonatomic, assign) UInt8 currentGear;
@property (nonatomic, assign) UInt8 maxGear;


@property (nonatomic, assign) BOOL countdownEnabled;
@property (nonatomic, assign) UInt16 countdownTime;


@property (nonatomic, assign) UInt8 pressureValue;


@property (nonatomic, assign) FasciaGunChargingStatus chargingStatus;
@property (nonatomic, assign) UInt8 batteryLevel;

@end


typedef NS_ENUM(UInt8, FasciaGunChargingStatus) {
FasciaGunChargingStatus_Uncharged = 0x00,
FasciaGunChargingStatus_Charging = 0x01,
FasciaGunChargingStatus_Full = 0x02,
FasciaGunChargingStatus_Unsupported = 0xFF,
};

NS_ASSUME_NONNULL_END

+ 65
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELFasciaGunBleManager.h 파일 보기

@@ -0,0 +1,65 @@
//
// ELFasciaGunBleManager.h
// AILinkBleSDK
//
// Created by LarryZhang on 2022/1/15.
// Copyright © 2022 IOT. All rights reserved.
//

#import "ELBluetoothManager.h"
#import "ELFasciaGunBleDataModel.h"

NS_ASSUME_NONNULL_BEGIN

@protocol FasciaGunBleDelegate;

@interface ELFasciaGunBleManager : ELBluetoothManager

@property (nonatomic, weak) id<FasciaGunBleDelegate> fasciaGunDelegate;

+ (instancetype)shareManager;

- (void)autoScan;
- (void)stopAutoScan;
- (void)checkStatus;

@end

@interface ELFasciaGunBleManager (sendCmd)

- (void)sendCmdToDeviceStart:(BOOL)started withGear:(UInt8)gear;

- (void)sendCmdToDeviceGear:(UInt8)gear;

- (void)sendCmdToDeviceCountdown:(UInt16)timeInterval enable:(BOOL)enabled;

@end


@protocol FasciaGunBleDelegate <NSObject>

@optional

/// 蓝牙连接状态
/// @param state 连接状态
- (void)fasciaGunBleReceiveState:(ELBluetoothState)state;

/// 附近的设备
/// @param devices 设备列表
- (void)fasciaGunBleReceiveDevices:(NSArray<ELPeripheralModel *> *_Nullable)devices;

//正在连接中倒计时
- (void)fasciaGunBleCountDown:(NSInteger)count;


- (void)fasciaGunBleReceiveStatusDataModel:(ELFasciaGunBleDataModel *_Nonnull)model;

- (void)fasciaGunBleReceiveStart:(BOOL)started withGear:(UInt8)gear;

- (void)fasciaGunBleReceiveGear:(UInt8)gear;

- (void)fasciaGunBleReceiveCountdown:(UInt16)timeInterval enabled:(BOOL)enabled;


@end
NS_ASSUME_NONNULL_END

+ 1
- 1
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELFoodThermometerBleManager.h 파일 보기

@@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
//Bluetooth status callback(回调蓝牙状态)
- (void)deviceBleReceiveState:(ELBluetoothState)state;

//Callback FoodThermometer device list(回调设备列表)
//Callback FoodThermometer device list(回调牙刷设备列表)
- (void)deviceBleReceiveDevices:(NSArray<ELPeripheralModel *> *)devices;

//设备返回基础信息

+ 44
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELForeheadAnalysisDataTool.h 파일 보기

@@ -0,0 +1,44 @@
//
// ELForeheadAnalysisDataTool.h
// Elink
//
// Created by iot_user on 2019/5/10.
// Copyright © 2019 iot_iMac. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ELForeheadBleDataModel.h"
#import "ELForeheadHeader.h"


NS_ASSUME_NONNULL_BEGIN

@interface ELForeheadAnalysisDataTool : NSObject

/**
解析温度数据

@param playload 原始数据
@return ELForeheadBleDataModel
*/
+(ELForeheadBleDataModel *)analysisStabilityData:(NSData *)playload;

/**
解析设置单位

@param playload 原始数据
@return 结果
*/
+(ELSetBluetoothResponseType)analysisSetUnitResult:(NSData *)playload;

/**
解析异常

@param playload 原始数据
@return 异常
*/
+(ForeheadFailCode)analysisFailCode:(NSData *)playload;

@end

NS_ASSUME_NONNULL_END

+ 7
- 7
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELHeightBodyFatScaleBleManager.h 파일 보기

@@ -53,7 +53,7 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)heightBodyFatScaleManagerReportDevStateWithWorkMode:(HeightBodyFatScale_WorkModeType)mode power:(NSInteger)power charging:(BOOL)charging weightUnit:(ELDeviceWeightUnit)weightUnit height:(ELDeviceHeightUnit)heightUnit videoState:(BOOL)video;

#pragma mark - 身高体脂秤模式
#pragma mark - 身高体脂秤模式

/** MCU上报称重状态 */
- (void)heightBodyFatScaleManagerReportWeighingState:(HeightBodyFatScale_WeightStableType)stable weightNumber:(NSInteger)weight weightPoint:(NSInteger)point unit:(ELDeviceWeightUnit)unit;
@@ -83,7 +83,7 @@ NS_ASSUME_NONNULL_BEGIN
/** MCU上报体脂数据 */
- (void)heightBodyFatScaleManagerReportBodyFatDataWithDataModel:(ELHeightBodyFatScaleBleWeightBodyModel *)model;

#pragma mark - 抱婴模式
#pragma mark - 抱婴模式

/** MCU上报称重状态
* @param stable : 测量状态
@@ -95,12 +95,12 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)heightBodyFatScaleManagerReportBabyModetWithWeighingState:(HeightBodyFatScale_WeightStableType)stable adultWeight:(NSInteger)adultWeight allWeight:(NSInteger)allWeight babyWeight:(NSInteger)babyWeight point:(NSInteger)point unit:(ELDeviceWeightUnit)unit;

#pragma mark - 体重模式
#pragma mark - 体重模式

/** MCU上报称重状态 */
- (void)heightBodyFatScaleManagerReportWeightModeWithWeighingState:(HeightBodyFatScale_WeightStableType)stable weightNumber:(NSInteger)weight point:(NSInteger)point unit:(ELDeviceWeightUnit)unit;

#pragma mark - 体重身高模式
#pragma mark - 体重身高模式

/** MCU上报称重状态 */
- (void)heightBodyFatScaleManagerReportWeightHeightModeWithWeighingState:(HeightBodyFatScale_WeightStableType)stable weightNumber:(NSInteger)weight point:(NSInteger)point unit:(ELDeviceWeightUnit)unit;
@@ -109,7 +109,7 @@ NS_ASSUME_NONNULL_BEGIN
- (void)heightBodyFatScaleManagerReportWeightHeightMOdeWithHeightNumber:(NSInteger)height point:(NSInteger)point unit:(ELDeviceHeightUnit)unit;


#pragma mark -
#pragma mark -

/** MCU发送测量完成 */
- (void)heightBodyFatScaleManagerSendCompletedWithWorkMode:(HeightBodyFatScale_WorkModeType)type;
@@ -122,7 +122,7 @@ NS_ASSUME_NONNULL_BEGIN

+ (ELHeightBodyFatScaleBleManager *)shareManager;

//MARK:发送指令
#pragma mark 发送指令

///设置用户信息
- (void)sendUserDataWithSex:(NSInteger)sex age:(NSInteger)age height:(NSInteger)cm;
@@ -148,7 +148,7 @@ NS_ASSUME_NONNULL_BEGIN
//App回复测量完成
- (void)sendWeighingCompleted;

//MARK:A6指令
#pragma mark A6指令


@end

+ 44
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELHeightGaugeAnalysisDataTool.h 파일 보기

@@ -0,0 +1,44 @@
//
// ELHeightGaugeAnalysisDataTool.h
// Elink
//
// Created by iot_user on 2019/5/10.
// Copyright © 2019 iot_iMac. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ELHeightGaugeBleDataModel.h"
#import "ELSDKHeader.h"


NS_ASSUME_NONNULL_BEGIN

@interface ELHeightGaugeAnalysisDataTool : NSObject

/**
解析温度数据

@param playload 原始数据
@return ELHeightGaugeBleDataModel
*/
+(ELHeightGaugeBleDataModel *)analysisStabilityData:(NSData *)playload;

/**
解析设置单位

@param playload 原始数据
@return 结果
*/
+(ELSetBluetoothResponseType)analysisSetUnitResult:(NSData *)playload;

/**
解析异常

@param playload 原始数据
@return 异常
*/
+(ELHeightGaugeFailCode)analysisFailCode:(NSData *)playload;

@end

NS_ASSUME_NONNULL_END

+ 177
- 10
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELHygrothermographBleHeader.h 파일 보기

@@ -10,25 +10,192 @@
#define ELHygrothermographBleHeader_h

/** 温湿度计 ble head type 枚举定义 */
typedef NS_ENUM (NSInteger, Hygrothermograph_BleHeadType) {
typedef NS_ENUM (NSInteger, TH_BleHeadType) {
/** App获取设备状态 */
Hygrothermograph_BleHeadType_App_GetDevState = 0x01 ,
TH_BleHeadType_App_GetDevState = 0x01 ,
/** 设备定时返回设备状态 */
Hygrothermograph_BleHeadType_MCU_ReturnDevState = 0x02 ,
TH_BleHeadType_MCU_ReturnDevState = 0x02 ,
/** App设备变化阀值 */
Hygrothermograph_BleHeadType_App_SetDevThreshold = 0x03 ,
TH_BleHeadType_App_SetDevThreshold = 0x03 ,
/** 设备定时返回阀值 */
Hygrothermograph_BleHeadType_MCU_ReturnDevThreshold = 0x04 ,
TH_BleHeadType_MCU_ReturnDevThreshold = 0x04 ,
/** App读取设备的历史数据 */
Hygrothermograph_BleHeadType_App_GetDevRecordData = 0x05 ,
TH_BleHeadType_App_GetDevRecordData = 0x05 ,
/** 设备返回历史数据 */
Hygrothermograph_BleHeadType_MCU_ReturnRecordData = 0x06 ,
TH_BleHeadType_MCU_ReturnRecordData = 0x06 ,
/** 设置采样频率和保存频率 */
Hygrothermograph_BleHeadType_APP_SetSamplingFrequency = 0x07 ,
TH_BleHeadType_APP_SetSamplingFrequency = 0x07 ,
/** 设备返回采样频率和保存频率 */
Hygrothermograph_BleHeadType_MCU_ReturnSamplingFrequency = 0x08 ,
TH_BleHeadType_MCU_ReturnSamplingFrequency = 0x08 ,
/** App返回收到历史数据反馈 */
Hygrothermograph_BleHeadType_App_DataFeedback = 0x09 ,
TH_BleHeadType_App_DataFeedback = 0x09 ,
/** APP设置、读取温湿度校准 */
TH_BleHeadType_App_SetOrGetCalibrationNum = 0x0A ,
/** MCU返回温湿度校准值 */
TH_BleHeadType_MCU_ReturnCalibrationNum = 0x0B ,
/** APP获取设备信息 */
// TH_BleHeadType_App_GetDevInfo = 0x10 ,
/** 设备返回设备信息 */
TH_BleHeadType_MCU_ReturnDevInfo = 0x11 ,
/** APP获取设备报警功能 设备回复报警功能信息 */
TH_BleHeadType_AlarmDataInfo = 0x12 ,
/** APP设置设备报警功能 */
TH_BleHeadType_App_SetAlarmDataInfo = 0x13 ,
/** APP设置设备wifi/4G例行上报时间 */
TH_BleHeadType_App_Set_Wifi_4G_UploadTime = 0x14 ,
/** 设备返回设备wifi/4G例行上报时间 */
TH_BleHeadType_MCU_Return_Wifi_4G_UploadTime = 0x15 ,
/** APP获取wifi网络状态 */
TH_BleHeadType_App_GetWiFiStatus = 0x16 ,
/** 设备返回wifi网络状态 */
TH_BleHeadType_MCU_ReturnWiFiStatus = 0x17 ,
/// APP设置/读取设备蜂鸣器功能
TH_BleHeadType_App_SetOrGetBuzzerState = 0x20 ,
/// 设备返回蜂鸣器状态
TH_BleHeadType_MCU_ReturnBuzzerState = 0x021 ,
/// APP设置/读取设备闹钟功能
TH_BleHeadType_App_SetOrGetAlarmClock = 0x22 ,
/// 设备返回闹钟
TH_BleHeadType_MCU_ReturnAlarmClock = 0x23 ,
/// APP设置/读取设备整点报时功能
TH_BleHeadType_App_SetOrUpdateReportPunctually = 0X24 ,
/// 设备返回整点报时功能
TH_BleHeadType_MCU_ReturnReportPunctually = 0x25 ,
/// 7.4.10 APP设置/读取设备小夜灯
TH_BleHeadType_App_SetOrGetNightLightState = 0x26 ,
/// 设备返回小夜灯状态
TH_BleHeadType_MCU_ReturnNightLightState = 0x27 ,
/// 7.4.11 APP设置/读取背光亮度
TH_BleHeadType_App_SetOrGetGroundLightState = 0x28 ,
/// 设备返回背光状态
TH_BleHeadType_MCU_ReturnGroundLightState = 0x29 ,
/// 7.4.12 APP设置/读取单位
TH_BleHeadType_App_SetOrGetUnit = 0x2A ,
/// 设备返回单位
TH_BleHeadType_MCU_ReturnUnit = 0x2B ,
/// 7.4.13 APP寻物功能
TH_BleHeadType_App_Lost = 0x2C ,
/// 返回寻物功能状态
TH_BleHeadType_MCU_ReturnLost = 0x2D ,
/// 7.4.14 App绑定设备
TH_BleHeadType_Binding_Status = 0x2E ,
/// BM设备定时返回设备状态
TH_BleHeadType_BM_MCU_ReturnDevState = 0x31 ,
/// BM设备返回历史记录
TH_BleHeadType_BM_MCU_ReturnRecordData = 0x32 ,
/// 清除BM里面的历史记录
TH_BleHeadType_App_ClearRecordData = 0x40 ,
/// 返回清除记录结果
TH_BleHeadType_MCU_ClearRecordDataState = 0x41 ,
/// 查询BM是否支持历史记录
TH_BleHeadType_App_GetSupportRecordData = 0x42,
/// BM回应是否支持历史记录
TH_BleHeadType_App_ReturnSupportRecordData = 0x43,
/// app获取设备支持功能
TH_BleHeadType_App_GetSupportFeatures = 0x80 ,
/// 设备返回支持功能
TH_BleHeadType_MCU_ReturnSupportFeatures = 0x81 ,
};

/** 温湿度计设备类型定义 */
typedef NS_ENUM (NSInteger, Hygrothermograph_DevType) {
Hygrothermograph_DevType_Ble = 0x00 ,
Hygrothermograph_DevType_Ble_WiFi = 0x01 ,
Hygrothermograph_DevType_Ble_4G = 0x02 ,
};


/** 温湿度计Wi-Fi连接状态枚举定义 */
typedef NS_ENUM(NSInteger, Hygrothermograph_ConnectStateType) {
/** 未配置AP */
Hygrothermograph_ConnectStateType_UnSetup = 0x00 ,
/** 连接AP失败,连接时密码错误、AP信号不好、主动断开都会是这个状态 */
Hygrothermograph_ConnectStateType_ConnectFailed = 0x01 ,
/** 连接的AP信号不好 */
Hygrothermograph_ConnectStateType_BadSignal = 0x02 ,
/** 成功连接上AP */
Hygrothermograph_ConnectStateType_Connecd = 0x03 ,
/** 正在连接AP */
Hygrothermograph_ConnectStateType_Connecting = 0x04 ,
};

/** 温湿度计工作状态枚举定义 */
typedef NS_ENUM(NSInteger, Hygrothermograph_WorkStateType) {
/** 唤醒 */
Hygrothermograph_WorkStateType_Wake = 0x00 ,
/** 进入休眠 */
Hygrothermograph_WorkStateType_Sleep = 0x01 ,
/** 模块准备就绪 */
Hygrothermograph_WorkStateType_Ready = 0x02 ,
};

/** 温湿度计配网失败原因枚举定义 */
typedef NS_ENUM(NSInteger, Hygrothermograph_FailedType) {
/** 未知原因 */
Hygrothermograph_FailedType_Unknow = 0x00 ,
/** AP信号差 */
Hygrothermograph_FailedType_APSignalPoor = 0x01 ,
/** 密码错误 */
Hygrothermograph_FailedType_PasswordWrong = 0x02 ,
/** 获取不到IP */
Hygrothermograph_FailedType_CantGetIP = 0x03 ,
};

/// 设备状态枚举定义
typedef NS_ENUM(NSInteger, TH_DevStateType) {
/// APP读取时上报(若BM模块有历史功能,收到该指令不保存历史)
TH_DevStateType_ReadReport = 0x00 ,
/// 普通上报(前后两次差值超过设定值(灵敏度),MCU主动上报)(若BM模块有历史功能,收到该指令保存历史)
TH_DevStateType_NormalReport = 0x01 ,
/// 报警上报(当前值超出报警范围值,MCU主动上报)(若BM模块有历史功能,收到该指令保存历史)
TH_DevStateType_AlarmReport = 0x02 ,
};

/// 闹钟状态枚举定义
typedef NS_ENUM(NSInteger, TH_AlarmClockState) {
/// 增加闹钟
TH_AlarmClockState_Add = 0x00 ,
/// 删除闹钟(不需要处理时间值)
TH_AlarmClockState_Del = 0x01 ,
/// 停止该闹钟(停止对应的编号闹钟,不需要处理时间值)
TH_AlarmClockState_Stop = 0x02 ,
/// 获取设备已存在的闹钟(编号模式时间都设为0)
TH_AlarmClockState_Get = 0x03 ,
};

/// 闹钟模式
typedef NS_ENUM(NSInteger, TH_AlarmClockMode) {
/// 只触发一次
TH_AlarmClockMode_Once = 0x00 ,
/// 每天都触发
TH_AlarmClockMode_Everyday = 0x01 ,
};

/// 温湿度计支持的设备功能
typedef NS_ENUM(NSInteger, TH_Dev_SupportFeatures) {
/// 温湿度校准
TH_Dev_SupportFeatures_Calibration = 0 ,
/// 蜂鸣器报警
TH_Dev_SupportFeatures_BuzzerAlarm = 1 ,
/// 闹钟功能
TH_Dev_SupportFeatures_AlarmClock = 2 ,
/// 整点报时
TH_Dev_SupportFeatures_ReportPunctually = 3 ,
/// 小夜灯
TH_Dev_SupportFeatures_NightLight = 4 ,
/// 背光亮度
TH_Dev_SupportFeatures_GroundLight = 5 ,
/// 寻物功能(APP点击寻物时,设备蜂鸣器会响)
TH_Dev_SupportFeatures_Lost = 6 ,
};


#endif /* ELHygrothermographBleHeader_h */

+ 203
- 4
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELHygrothermographBleManager.h 파일 보기

@@ -7,6 +7,7 @@
//

#import <AILinkBleSDK/ELBluetoothManager.h>
#import "ELHygrothermographBleHeader.h"

NS_ASSUME_NONNULL_BEGIN

@@ -30,6 +31,17 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)hygrothermographManagerReturnDevStatePower:(NSInteger)power bootTime:(long long)time tem:(float)tem hum:(float)hum;


/// 新设备返回当前状态
/// @param power 电量 0~100
/// @param time 设备开机时间,当该值不用发时,为0xFFFFFFFF. 当主控MCU有独立RTC芯片时,需要发. 当MCU主控无独立RTC芯片时,该值填0xFFFFFFFF
/// @param tem 温度
/// @param unit 温度单位
/// @param hum 湿度,单位%
/// @param state 当前设备状态,详细内容见枚举注释
- (void)newTHManagerReturnDevStatePower:(int)power bootTime:(long long)time tem:(float)tem unit:(enum ELDeviceTemperatureUnit)unit hum:(float)hum devState:(enum TH_DevStateType)state;


/** 设备返回阀值
* @param tem : 温度阀值,单位摄氏度
* @param hum : 湿度阀值,单位%
@@ -46,8 +58,103 @@ NS_ASSUME_NONNULL_BEGIN
/** 返回设备采样频率和保存频率 */
- (void)hygrothermographManagerReturnSamplingFrequency:(NSInteger)sampling saveFrequency:(NSInteger)save timeInterval:(NSInteger)timeInterval;

/** 返回温湿度校准值 */
- (void)hygrothermographManagerReturnCalibrationValueWithTem:(float)tem hum:(float)hum;

/** 返回设备信息 */
- (void)hygrothermographManagerReturnDevType:(enum Hygrothermograph_DevType)type version:(NSString *)version IMEI:(NSString *)IMEI;

/** 返回设备报警功能开关
* @param highTem : 高温报警值,单位摄氏度
* @param lowTem : 低温报警值,单位摄氏度
*/
- (void)hygrothermographManagerReturnTemAlarmSwitch:(BOOL)temAlarm
highTemAlarm:(float)highTem
lowTemAlarm:(float)lowTem
humAlarmSwitch:(BOOL)humAlarm
highHumAlarm:(float)highHum
lowHumAlarm:(float)lowHum;

/** 返回wifi/4g例行上报时间 */
- (void)hygrothermographManagerReturnRoutineReportingTime:(int)time;

/** wifi/4g设备返回历史记录数据 */
- (void)hygrothermographManagerWiFiReturnRecordDataList:(NSArray<ELHygrothermographBleRecordData *> *)list allListNumber:(long long)allNumber getListNumber:(long long)getNumber;

/** 返回WiFi网络状态 */
- (void)hygrothermographManagerReturnWiFiConnectStatus:(enum Hygrothermograph_ConnectStateType)connectState
workStatus:(enum Hygrothermograph_WorkStateType)workStatus
failedStatus:(enum Hygrothermograph_FailedType)failedStatus;

/** MCU replies to the result of setting the ip address (MCU回复设置ip地址结果 )
* @param result : 1:成功,0:失败,2:不支持
*/
- (void)managerCallBackSetIPAddressResult:(NSInteger)result;

/// 返回设备的ip地址
- (void)hygrothermographManagerBackDevIpAddress:(NSString *)ipAddress;



/// 返回蜂鸣器状态
/// @param open 是否打开
- (void)THManagerBuzzerState:(BOOL)open;

/// 设备返回闹钟功能
/// @param state 闹钟状态
/// @param num 1-5(对应5的个闹钟编号)
/// @param mode 模式
/// @param timeStr 时间,格式为 HH:mm:ss
/// @param open 是否激活
- (void)THManagerAlarmLockState:(enum TH_AlarmClockState)state num:(int)num mode:(enum TH_AlarmClockMode)mode timeStr:(NSString *)timeStr open:(BOOL)open;

/// 设备返回整点报时状态
/// @param open 整点报时开关
- (void)THManagerReportPunctuallyState:(BOOL)open;

/// 设备返回小夜灯状态
/// @param open 小夜灯开关
- (void)THManagerNightLightState:(BOOL)open;

/// 设备返回背光状态
/// @param open 背光灯开关
/// @param brightness 亮度,0-100
- (void)THManagerGounrdLightState:(BOOL)open brightness:(int)brightness;

/// 设备返回当前单位
/// @param unit 单位
- (void)THManagerUnitState:(enum ELDeviceTemperatureUnit)unit;

/// 设备返回寻物状态
/// @param alarm 是否正在报警
- (void)THManagerLostState:(BOOL)alarm;

/// 返回支持的功能列表
/// @param list 数组内容为 TH_Dev_SupportFeatures 枚举
- (void)THManagerSuportList:(NSArray<NSNumber *> *)list;

/// 返回清除历史记录结果
/// @param state 只会返回成功,不会返回失败
- (void)THManagerClearRecordState:(BOOL)state;

/// 返回是否支持历史记录
/// @param state 只会返回成功,不会返回失败
- (void)THManagerSupportRecordData:(BOOL)state;


// 返回绑定状态
- (void)THManagerBindingStatus:(Byte)status;

@end

/**
温湿度协议手动传入cid,因为有需要不连接设备发送数据的应用场景,所以不通过peripheralModel获取cid
*/


/// 温湿度计蓝牙数据发送
@interface ELHygrothermographBleManager : ELBluetoothManager

@property (nonatomic, weak) id<ELHygrothermographBleDelegate> hygrothermographDelegate;
@@ -55,21 +162,113 @@ NS_ASSUME_NONNULL_BEGIN
+ (ELHygrothermographBleManager *)shareManager;

/** 获取设备状态信息 */
- (void)getDevState;
- (void)getDevStateWithCid:(enum ELSupportDeviceType)cid;

/** 设置阀值
* @param tem 区间为 0.1 ~ 10摄氏度 (超过区间就设置为临界值)
* @param hum 区间为 0.1 ~ 10 %(同上)
*/
- (void)setDevThresholdWithTem:(float)tem hum:(float)hum;
- (void)setDevThresholdWithTem:(float)tem hum:(float)hum cid:(enum ELSupportDeviceType)cid;

/** 读取设备历史记录
* 因为设备保存的历史数据过多,APP 不需每次多获取全部历史。 所以 APP 可以根据自身上一次获取到的开机时间,获取新的历 史数据。 例如:APP 首次连接设备获取数据时,则该值为 0. 如果首次已经获取到了开机时间的 100s 时,再次获取时,该值 应该为 100
*/
- (void)getDevRecordDataWithDevTime:(long long)devTime;
- (void)getDevRecordDataWithDevTime:(long long)devTime cid:(enum ELSupportDeviceType)cid;

/** 设置采样频率和保存频率 */
- (void)setSamplingFrequency:(NSInteger)sampling saveFrequency:(NSInteger)save timeInterval:(NSInteger)timeInterval;
- (void)setSamplingFrequency:(NSInteger)sampling saveFrequency:(NSInteger)save timeInterval:(NSInteger)timeInterval cid:(enum ELSupportDeviceType)cid;


/// 7.4.4 APP设置、读取温湿度校准
/// @param set true:设置(APP下发数据时,两个单位的值都要算好,当设备处于哪个单位时,就使用哪个偏置的值,避免了单位转化导致精度丢失), flase:读取
/// @param cTem (单位:℃ .范围-10.0 到 +10.0 ,默认值0)
/// @param fTem (单位:℉ .范围-10.0 到 +10.0 ,默认值0)
/// @param hum (范围-10.0到 +10.0% ,默认值为0)
- (void)setOrGetTemHumCalibrationValueWithSet:(BOOL)set cTem:(float)cTem fTem:(float)fTem hum:(float)hum cid:(enum ELSupportDeviceType)cid;

/** APP获取设备信息 */
- (void)getDevDataInfoWithCid:(enum ELSupportDeviceType)cid;

/** APP获取设备报警功能 */
- (void)getDevAlarmDataInfoWithCid:(enum ELSupportDeviceType)cid;

/** APP设置报警功能 */
- (void)setDevAlarmDataInfoWithTemAlarmSwitch:(BOOL)temAlarm
highTemAlarm:(float)highTem
lowTemAlarm:(float)lowTem
humAlarmSwitch:(BOOL)humAlarm
highHumAlarm:(float)highHum
lowHumAlarm:(float)lowHum
cid:(enum ELSupportDeviceType)cid;

/// 获取设备支持功能
- (void)getDevSupportFeaturesWithCid:(enum ELSupportDeviceType)cid;

/// 设置/读取设备蜂鸣器功能
/// @param set 是否为设置命令,否则读取
/// @param close 是否关闭,默认是打开
- (void)setOrGetBuzzerWithCmd:(BOOL)set close:(BOOL)close cid:(enum ELSupportDeviceType)cid;

/// 设置/读取设备闹钟功能
/// @param state 闹钟状态
/// @param num 1-5(对应5的个闹钟编号)
/// @param mode 模式
/// @param timeStr 时间,格式为 HH:mm:ss
/// @param open 是否激活
- (void)setOrGetAlarmClockWithState:(enum TH_AlarmClockState)state num:(int)num mode:(enum TH_AlarmClockMode)mode timeStr:(NSString *)timeStr open:(BOOL)open cid:(enum ELSupportDeviceType)cid;

/// 设置/读取设备整点报时功能
/// @param set 是否为设置,否则读取
/// @param open 是否打开整点报时,默认关闭
- (void)setOrGetReportPunctuallyWithCmd:(BOOL)set open:(BOOL)open cid:(enum ELSupportDeviceType)cid;

/// 设置/读取设备小夜灯
/// @param set 是否为设置,否则读取
/// @param open 是否打开小夜灯,默认关闭
- (void)setOrGetDevNightLightWithCmd:(BOOL)set open:(BOOL)open cid:(enum ELSupportDeviceType)cid;

/// 设置/读取背光亮度
/// @param set 是否为设置,否则读取
/// @param open 是否打开,默认关闭
/// @param brightness 亮度值0-100
- (void)setOrGetGroundLightWithCmd:(BOOL)set open:(BOOL)open brightness:(int)brightness cid:(enum ELSupportDeviceType)cid;

/// 设置/读取单位
/// @param set 是否为设置,否则读取
/// @param unit 单位
- (void)setOrGetUnitWithCmd:(BOOL)set unit:(ELDeviceTemperatureUnit)unit cid:(enum ELSupportDeviceType)cid;

/// 寻物功能
/// @param start 是否开始寻物
- (void)findingWithCmd:(BOOL)start cid:(enum ELSupportDeviceType)cid;

/// 清除设备历史记录
- (void)clearRecordDataWithCid:(enum ELSupportDeviceType)cid;

/// 查询BM是否支持历史记录
- (void)getSupportRecordDataWithCid:(enum ELSupportDeviceType)cid;

/** app设置设备wifi/4g例行上报时间 */
- (void)setDevRoutineReportingTime:(int)time cid:(enum ELSupportDeviceType)cid;

/** app获取Wi-Fi网络状态 */
- (void)getDevWiFiStatusWithCid:(enum ELSupportDeviceType)cid;

/** 设置设备的IP地址,端口号和访问路径 */
- (void)setDevAccessIpAddress:(NSString *)address portNumber:(NSUInteger)portNum path:(NSString *)path;

/** 获取设备ip地址 */
- (void)getDevAccessIp;

/** 设置Unix时间 */
- (void)setUnixTime:(long long)time;


// App绑定设备 开始
- (void)bindDeviceStart;
// App绑定设备 完成
- (void)bindDeviceDone;


@end


+ 5
- 2
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELPeripheralModel.h 파일 보기

@@ -21,17 +21,20 @@ NS_ASSUME_NONNULL_BEGIN
/**
CID
*/
@property (nonatomic, assign) ELSupportDeviceType deviceType;
@property (nonatomic, assign) ELSupportDeviceType deviceType;// DEPRECATED_MSG_ATTRIBUTE("use ‘cid’ instead");
@property (nonatomic, assign) ELSupportDeviceType cid;

/**
VID
*/
@property (nonatomic, assign) NSInteger vendorID;
@property (nonatomic, assign) NSInteger vid;

/**
PID
*/
@property (nonatomic, assign) NSInteger productID;
@property (nonatomic, assign) NSInteger pid;

@property (nonatomic, copy) NSString *deviceName;
@property (nonatomic, copy) NSString *macAddress;
@@ -80,7 +83,7 @@ NS_ASSUME_NONNULL_BEGIN
*/
+(NSArray<ELPeripheralModel *> *)getDevicesWithPeripherals:(NSArray<__kindof ELPeripheralModel *> *)peripherals supportDeviceType:(ELSupportDeviceType)type;

//MARK:Screen multiple devices(筛选多个设备)
#pragma mark Screen multiple devices(筛选多个设备)
+(NSArray<ELPeripheralModel *> *)getDevicesWithPeripherals:(NSArray<__kindof ELPeripheralModel *> *)peripherals supportDeviceTypes:(NSArray<NSNumber *> *)types;

//Descending order(降序)

+ 60
- 24
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELSDKHeader.h 파일 보기

@@ -43,7 +43,7 @@ typedef NS_ENUM(NSUInteger, ELInetGetCmdType) {
ELInetGetCmdTypeGetSendKeyState = 0x31, //-APP reads the result of sending the decoding key(APP读取下发解码秘钥的结果)
ELInetGetCmdTypeGetSmartLockA6Data = 0x34, //-Door lock 0x34 represents the A6 protocol (see the second level command for details)(门锁0x34代表A6协议(具体见二级指令))
ELInetGetCmdTypeGetBasicInfoData = 0x36, //Obtain basic device information data(获取设备基本信息数据)
#pragma mark ============ Begin 蓝牙Wifi ==============
#pragma mark ============ Begin 蓝牙Wifi ==============
ELInetGetCmdTypeBleWifiGetNearbyWifi = 0x80, //Get nearby Wifi(获取附近Wifi)
ELInetGetCmdTypeBleWifiReceiveWifiName = 0x81, //Reply to wifi name(回复wifi名字)
ELInetGetCmdTypeBleWifiReceiveWifiMac = 0x82, //Reply to wifi mac(回复wifi mac)
@@ -59,7 +59,7 @@ typedef NS_ENUM(NSUInteger, ELInetGetCmdType) {
ELInetGetCmdTypeBleWifiName = 0x94, //获取wifi名称
ELInetGetCmdTypeBleWifiSetPathAddress = 0x96, //Set access path(设置访问的路径
ELInetGetCmdTypeBleWifiGetPathAddress = 0x97, //get access path
#pragma mark ============End 蓝牙Wifi ==============
#pragma mark ============End 蓝牙Wifi ==============
ELInetGetCmdTypeRequestAuthorize = 0x7F, //Request device authorization (请求设备授权)
ELInetGetCmdTypeToothbrushA6Data = 0xC0, //A6 data for toothbrush(牙刷专用A6数据,详情请见协议的2级指令)(See the second order for details)
@@ -84,12 +84,13 @@ typedef NS_ENUM(NSUInteger, ELInetSetCmdType) {
ELInetSetCmdTypeSetCommunicationMode = 0x1F, //Set module serial port mode, I2C mode, SPI mode(设置模块串口模式、I2C模式、SPI模式)
ELInetSetCmdTypeSetMCURestart = 0x21, //Set module restart(设置模块重启)
ELInetSetCmdTypeSetFactoryDataReset = 0x22, //Set factory reset(设置恢复出厂设置)
ELInetSetCmdTypeSetConnectState = 0x25, //Set the Bluetooth connection status(设置蓝牙连接状态)
ELInetSetCmdTypeSetHandshake = 0x23, //Encrypted handshake data returned by Bluetooth(蓝牙返回的加密的握手数据)
ELInetSetCmdTypeSetConnectState = 0x25, //Set the Bluetooth connection status(设置蓝牙连接状态)
ELInetSetCmdTypeSetMCUPowerState = 0x27, //上报电池状态
ELInetSetCmdTypeSetKey = 0x31, //APP sends the decoding key(APP下发解码秘钥)
ELInetSetCmdTypeSetSmartLockA6Data = 0x34, //Door lock 0x34 represents the A6 protocol (see the second level command for details)(门锁0x34代表A6协议(具体见二级指令))
ELInetSetCmdTypeSyncMCUNowDate = 0x37, //Sync the current time of the system(设置手机时间给MCU)
#pragma mark ============ 蓝牙Wifi ==============
#pragma mark ============ 蓝牙Wifi ==============
ELInetSetCmdTypeBleWifiSetWifiMac = 0x84, //设置WIFI Mac地址
ELInetSetCmdTypeBleWifiSetWifiPwd = 0x86, //设置WIFI 密码
ELInetSetCmdTypeBleWifiSetConnectWifi = 0x88, //设置设备连接WIFI
@@ -143,13 +144,27 @@ typedef NS_ENUM(NSUInteger, ELSupportDeviceType) {
ELSupportDeviceTypeBLE_BfrEightScale = 0x0032, //MCU会计算体脂信息的八电极蓝牙秤
ELSupportDeviceTypeElectricScooter= 0x0033 , //滑板车
ELSupportDeviceTypeNutritionScale = 0x0034 , //营养秤(蓝牙连接)
ELSupportDeviceType_WiFi_Hygrothermograph = 0x0036 , //wifi温湿度计
ELSupportDeviceTypeAiFreshNutritionScale = 0x0037 , //好营养营养秤(蓝牙连接)
ELSupportDeviceTypeBLE_WIFIBlood = 0x0038 , //Bluetooth and wifi Blood(蓝牙wifi智能血压计)
ELSupportDeviceTypeFasciaGun = 0x003B , //筋膜枪
ELSupportDeviceType_4G_Hygrothermograph = 0x003A , //4g温湿度计
ELSupportDeviceTypeAutomaticThermometer = 0x003D , //61 //测温仪(蓝牙)
ELSupportDeviceType_BraceletWatch = 0x003E, //Leap手环
ELSupportDeviceTypeVictorClampMeter = 0x0040, //Victor钳表
ELSupportDeviceTypeVictorAnemometer = 0x0044, //胜利风速计
ELSupportDeviceTypeBroadcastScale = (0xffff +0x01) , //655536 Broadcast body fat scale(AILink广播体脂秤)
ELSupportDeviceTypeBroadcastHeightGauge = (0xffff + 0x03) , //65538 广播身高仪
ELSupportDeviceTypeBroadcastScale_Lingyang = (0xffff +0x16) , //65557 凌阳广播体脂秤
ELSupportDeviceTypeBroadcastNutritionFoodScale = (0xffff + 0x04) , //65539 广播营养秤
ELSupportDeviceTypeBroadcastHygrothermograph = (0xffff + 0x06) , //65541 广播温湿度计
};
//Communication mode(通信模式)
@@ -200,11 +215,31 @@ struct ELAutoSleepTimeStruct {
};
//WiFi连接状态
typedef NS_ENUM(NSUInteger, BleWiFiConnectState) {
BleWiFiConnectStateNoWiFi = 0,//0:没配网,没有连接,0: No connection
BleWiFiConnectStateConnectFail = 1 ,//1:尝试连接热点,但是失败1: Attempt to connect to the hotspot, but failed
BleWiFiConnectStateNoNetwork = 2 ,//2:连接热点,热点无网络,2: Connected to the hotspot, the hotspot has no network
BleWiFiConnectStateSuccess = 3 ,//3:连接热点,热点有网络,3: Connected to the hotspot, the hotspot has a network
BleWiFiConnectStateNoConnect = 4 ,//4:有热点信息,未连接,4: There is hotspot information, not connected
/// 0:没配网,没有连接,0: No connection
BleWiFiConnectStateNoWiFi = 0,
/// 1:尝试连接热点,但是失败1: Attempt to connect to the hotspot, but failed
BleWiFiConnectStateConnectFail = 1 ,
/// 2:连接热点,热点无网络,2: Connected to the hotspot, the hotspot has no network
BleWiFiConnectStateNoNetwork = 2 ,
/// 3:连接热点,热点有网络,3: Connected to the hotspot, the hotspot has a network
BleWiFiConnectStateSuccess = 3 ,
/// 4:有热点信息,未连接,4: There is hotspot information, not connected
BleWiFiConnectStateNoConnect = 4 ,
/// 5:ap信号差,连接失败
BleWiFiConnectStatePoorApSignal = 5 ,
/// 6:密码错误
BleWiFiConnectStatePasswordWrong = 6 ,
/// 7:获取不到IP,连接失败
BleWiFiConnectStateCantGetIP = 7 ,
};

//连网失败原因,对于温湿度计来说,如果 BleWiFiConnectState 状态为1,则需要判断该值,牙刷的话byte位够长,可以直接判断BleWiFiConnectState
typedef NS_ENUM(NSUInteger, BleWiFiConnectServerFaildState) {
BleWiFiConnectServerFaildState_Unknow = 0 ,
BleWiFiConnectServerFaildState_ApSignal = 1 ,
BleWiFiConnectServerFaildState_PwdWrong = 2 ,
BleWiFiConnectServerFaildState_CantGetIP = 3 ,
};


@@ -212,9 +247,10 @@ struct ELMCUStateStruct {
int connectState; //Connection status: 0: no connection 1: connected(蓝牙连接状态: 0:无连接 1:已连接 2:配对完成)
BleWiFiConnectState wifiState; //
int workState; //Working status: 0: Wake 1: Go to sleep 2: Module is ready(工作状态: 0:唤醒 1:进入休眠 2:模块准备就绪)
BleWiFiConnectServerFaildState faildState;
};

#pragma mark - AiLink unit
#pragma mark - AiLink unit

/** Type key of unit string(单位字符串的type key) */
#define ELDeviceUnitTypeKey @"type"
@@ -292,8 +328,8 @@ typedef NS_ENUM(NSInteger, ELDeviceWeightUnit) {
};

#define AiLinkBleHeightUnit_CMStr @"cm"
#define AiLinkBleHeightUnit_InchStr @"inch"
#define AiLinkBleHeightUnit_FeetStr @"feet"
#define AiLinkBleHeightUnit_InchStr @"inch"//@"in"//
#define AiLinkBleHeightUnit_FeetStr @"feet"//@"ft"//

#define AiLinkBleHeightUnitDic @{@(ELDeviceHeightUnit_CM):AiLinkBleHeightUnit_CMStr,@(ELDeviceHeightUnit_Inch):AiLinkBleHeightUnit_InchStr,@(ELDeviceHeightUnit_FT_IN):AiLinkBleHeightUnit_FeetStr}
/** AiLink Length unit(长度单位) */
@@ -453,19 +489,19 @@ typedef NS_ENUM(NSInteger, ELDeviceNutritionUnit) {
};


#pragma mark ============ 枚举 ==============
#pragma mark ============ 枚举 ==============
typedef NS_ENUM(NSUInteger, ELBluetoothState) {
ELBluetoothStateUnavailable, //Bluetooth is not available(蓝牙不可用)
ELBluetoothStateAvailable, //Bluetooth available(蓝牙可用)
ELBluetoothStateStopScan, //Stop scanning(停止扫描)
ELBluetoothStateScaning, //Scanning(正在扫描)
ELBluetoothStateWillConnect, //Will connect(将要连接)
ELBluetoothStateDidConnect, //Already connected(已经连接)
ELBluetoothStateConnectFail, //Connection error(连接出错)
ELBluetoothStateDidDiscoverCharacteristics, //Peripheral feature callback(外设特征回调)
ELBluetoothStateDidDisconnect, //Disconnect(断开连接)
ELBluetoothStateDidValidationPass, //approved(通过验证)
ELBluetoothStateFailedValidation, //Failed verification(未通过验证)
ELBluetoothStateUnavailable, //Bluetooth is not available(蓝牙不可用)0
ELBluetoothStateAvailable, //Bluetooth available(蓝牙可用)1
ELBluetoothStateStopScan, //Stop scanning(停止扫描)2
ELBluetoothStateScaning, //Scanning(正在扫描)3
ELBluetoothStateWillConnect, //Will connect(将要连接)4
ELBluetoothStateDidConnect, //Already connected(已经连接)5
ELBluetoothStateConnectFail, //Connection error(连接出错)6
ELBluetoothStateDidDiscoverCharacteristics, //Peripheral feature callback(外设特征回调)7
ELBluetoothStateDidDisconnect, //Disconnect(断开连接)8
ELBluetoothStateDidValidationPass, //approved(通过验证)9
ELBluetoothStateFailedValidation, //Failed verification(未通过验证)10
ELBluetoothStateUnauthorized = 0XFF , //No Bluetooth permission (没有蓝牙权限)

+ 3
- 3
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELSkipBleDataModel.h 파일 보기

@@ -33,11 +33,11 @@ NS_ASSUME_NONNULL_BEGIN
/** 绊绳数据对象模型 */
@interface ELSkipBleTripRopeModel : NSObject

/** 本次连跳的累计时间 */
@property (nonatomic, assign) long long tripTime;
/** 本次连跳的累计时间,字段弄短点,方便后台数据存储 */
@property (nonatomic, assign) long long t;

/** 本次连跳的累计个数 */
@property (nonatomic, assign) NSUInteger tripJump;
@property (nonatomic, assign) NSUInteger j;

@end


+ 34
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELTLVModel.h 파일 보기

@@ -0,0 +1,34 @@
//
// ELTLVModel.h
// AILinkBleSDK
//
// Created by LarryZhang on 2022/9/6.
// Copyright © 2022 IOT. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface ELTLVModel : NSObject

@property(nonatomic, assign) UInt8 type; //T

@property(nonatomic, assign, readonly) UInt8 length; //L

@property(nonatomic, strong) NSData *value; //V



- (instancetype)initWithType:(UInt8)type;

- (instancetype)initWithType:(UInt8)type value:(NSData *)value;

//type 1 Byte lengh 1 Byte
+ (NSArray<ELTLVModel *> *)objectArrayWithData:(NSData * _Nonnull)data;

@property(nonatomic, strong, readonly) NSData *data;

@end

NS_ASSUME_NONNULL_END

+ 107
- 2
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELThermometerBleManager.h 파일 보기

@@ -19,18 +19,38 @@ typedef NS_ENUM(NSInteger , ThermometerBleDataType) {
/** Real-time temperature(实时温度) */
ThermometerBleDataType_RealtimeData = 0x02 ,
/// 6.2.2读取历史数据
ThermometerBleDataType_GetRecordData = 0x03 ,
/// 6.2.3返回历史数据
ThermometerBleDataType_BackRecordData = 0x04 ,
/// 6.2.4获取设备支持功能/返回支持功能
ThermometerBleDataType_SupportFunction = 0x80 ,
/** App release unit settings(app下发单位设置) */
ThermometerBleDataType_AppSendUnit = 0x81 ,
/** The MCU replies to the setting result(MCU回复设置结果) */
ThermometerBleDataType_BackSendUnit = 0x82 ,
/// 6.2.6获取设备当前单位/返回当前单位
ThermometerBleDataType_NowUnit = 0x83 ,
/// 6.2.7获取设备测温模式/返回测试模式
ThermometerBleDataType_GetMeasureTemMode = 0x84 ,
/// 6.2.8设置设备测温模式/返回设置结果
ThermometerBleDataType_SetMeasureTemMode = 0x85 ,
/// 6.2.9获取高温报警值/返回高温报警值
ThermometerBleDataType_GetTemAlarmValue = 0x86 ,
/// 6.2.10设置高温报警值/返回结果
ThermometerBleDataType_SetTemAlarmValue = 0x87 ,
/** Error code sent on the device(设备上发错误码) */
ThermometerBleDataType_DeviceBackErrorCode = 0xFF ,
};

typedef NS_ENUM(NSInteger , ThermometerBleResultType) {
/** success(设置成功 )*/
ThermometerBleResultType_Succeed = 0x01 ,
ThermometerBleResultType_Succeed = 0x00 ,
/** failure(设置失败) */
ThermometerBleResultType_Failure ,
/** unsupport(不支持设置) */
@@ -46,6 +66,39 @@ typedef NS_ENUM(NSInteger , ThermometerBleErrorCode) {
ThermometerBleErrorCode_Failure ,
};

/// 设备类型
typedef NS_ENUM(NSInteger, ThermometerBleDevType) {
/// 体温贴等连续测温设备
ThermometerBleDevType_Continuous = 0 ,
/// 一般体温计
ThermometerBleDevType_Normal = 1 ,
/// 基础体温计
ThermometerBleDevType_Base = 2 ,
};

/// 设备功能枚举定义
typedef NS_ENUM(NSInteger, ThermometerBleSupportFunction) {
/// 单次/连续 测温切换
ThermometerBleSupportFunction_Once_Repeatedly = 0 ,
/// 单位切换
ThermometerBleSupportFunction_Unit = 1 ,
/// 设置高温报警值
ThermometerBleSupportFunction_TemAlarm = 2 ,
/// 历史数据
ThermometerBleSupportFunction_Record = 3 ,
};

/// 测温模式枚举定义
typedef NS_ENUM(NSInteger, ThermometerBleMeasureTemMode) {
/// 单次测量
ThermometerBleMeasureTemMode_Once = 0x00 ,
/// 连续测量
ThermometerBleMeasureTemMode_Repeatedly = 0x01 ,
};



/// 体温计蓝牙代理方法
@protocol ELThermometerBleDelegate <NSObject>

@optional
@@ -65,6 +118,33 @@ typedef NS_ENUM(NSInteger , ThermometerBleErrorCode) {
- (void)thermometerManagerBackDeviceErrorCode:(ThermometerBleErrorCode )code;


/// 返回历史记录数据
/// @param all 历史数据总条数
/// @param nowSend 此次发送的条数
/// @param list 体温计模型列表
- (void)thermometerManagerRecordDataListWithAllNum:(long long)all nowSendNum:(long long)nowSend recordList:(NSArray<ELThermometerBleModel *> *)list;

/// 返回设备支持功能
/// @param type 设备类型
/// @param list 支持功能列表,内容为 ThermometerBleSupportFunction
- (void)thermometerManagerSupportFunctionWithDevType:(enum ThermometerBleDevType)type supportList:(NSArray<NSNumber *> *)list;

/// 返回设备当前单位
/// @param unit 单位
- (void)thermometerManagerDevUnit:(enum ELDeviceTemperatureUnit)unit;

/// 返回当前测温模式
- (void)thermometerManagerMeasureTemMode:(enum ThermometerBleMeasureTemMode)mode;

/// 返回设置测温模式结果
- (void)thermometerManagerSetMeasureTemModeResult:(enum ThermometerBleResultType)result;

/// 返回高温报警值
- (void)thermometerManagerHighTemAlarmValue:(ELThermometerBleModel *)model;

/// 设置高温报警值结果
- (void)thermometerManagerSetHighTemAlarmResult:(enum ThermometerBleResultType)result;

@end

@interface ELThermometerBleManager : ELBluetoothManager
@@ -74,8 +154,33 @@ typedef NS_ENUM(NSInteger , ThermometerBleErrorCode) {

+ (ELThermometerBleManager *)shareManager;

/// 读取历史数据
/// @param count 一次传输可以接收的记录条数,根据MTU大小及单条记录占用字节数合理配置
/// @param time 已经同步过的最后一条历史数据的Unix时间戳(小端序),未同步过历史数据,发0
- (void)getRecordDataWithMaxCount:(NSInteger)count timeStamp:(long long)time;

/// 获取设备支持功能
- (void)getSupportFunction;

/** App release unit settings(app下发单位设置 )*/
- (void)changeThermometerUnit:(ELDeviceTemperatureUnit )unit;
- (void)changeThermometerUnit:(ELDeviceTemperatureUnit)unit;

/// 获取设备当前单位
- (void)getNowUnit;

/// 获取设备测温模式
- (void)getMeasureTemMode;

/// 设置设备测温模式
/// @param mode 模式
- (void)setMeasureTemMode:(enum ThermometerBleMeasureTemMode)mode;

/// 获取高温报警值
- (void)getHighTemAlarmValue;

/// 设置高温报警值
/// @param model 不需要设置时间字段和dataType
- (void)setHighTemAlarmValue:(ELThermometerBleModel *)model;

@end


+ 6
- 1
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELThermometerBleModel.h 파일 보기

@@ -15,11 +15,16 @@ NS_ASSUME_NONNULL_BEGIN

@property (nonatomic,assign) ELDeviceTemperatureUnit unit;//单位
@property (nonatomic,assign) NSUInteger temperature;//温度
///Stability flag: 0 real-time data, 1 stable data(稳定标志:0 实时数据,1 稳定数据)
/// Stability flag: 0 real-time data, 1 stable data(稳定标志:0 实时数据,1 稳定数据)
@property (nonatomic,assign) BOOL dataType;
@property (nonatomic,copy) NSString *unitStr;
@property (nonatomic,assign) NSInteger tempPoint; //小数点偏移位置

/// 数据时间戳
@property (nonatomic, assign) long long timeStamp;

@end



NS_ASSUME_NONNULL_END

+ 21
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELThermometerDisposeDataTool.h 파일 보기

@@ -0,0 +1,21 @@
//
// ELThermometerDisposeDataTool.h
// Elink
//
// Created by cliCk on 2019/5/28.
// Copyright © 2019 iot_iMac. All rights reserved.
//

#import "ELBleDisposeDataTool.h"
#import "ELThermometerBleModel.h"

NS_ASSUME_NONNULL_BEGIN

@interface ELThermometerDisposeDataTool : ELBleDisposeDataTool

/** 温度数据 */
+ (ELThermometerBleModel *)disposeData:(Byte *)dataByte;

@end

NS_ASSUME_NONNULL_END

+ 12
- 2
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELToothbrushBleManager.h 파일 보기

@@ -40,6 +40,9 @@ NS_ASSUME_NONNULL_BEGIN
/// @param workPhase Work stage information(工作阶段信息)
- (void)toothbrushReceiveWorkPhase:(ToothBrushWorkPhase)workPhase;

/** 0xFC 针对当前刷牙时间新增的上报工作状态 */
- (void)toothbrushReceiveNewWorkPhase:(ToothBrushNewWorkPhase)workPhase;

/// Recall the data of manually set gear(回调手动设置档位的数据)
/// @param custom data(数据)
- (void)toothbrushReceiveCustomData:(ToothbrushCustomData)custom;
@@ -78,14 +81,15 @@ NS_ASSUME_NONNULL_BEGIN

- (void)toothbrushtReceiveToothbrushOfflineDataCount:(unsigned char)count result:(unsigned char)result;

/** 回复离线历史记录数据发送状态 */
- (void)toothbrushReceiveRecordDataStatus:(enum ToothbrushOfflineRecrodStatusType)status;


/** MCU replies to the result of setting the ip address (MCU回复设置ip地址结果 )
* @param result : 1:成功,0:失败,2:不支持
*/
- (void)toothbrushManagerCallBackSetIPAddressResult:(NSInteger)result;



@end


@@ -167,6 +171,9 @@ NS_ASSUME_NONNULL_BEGIN
//APP 请求清空离线历史记录 二级指令 0x14
- (void)getOfflineDataClear;

//APP 请求设备继续发送离线历史记录 二级指令 0x16
- (void)getOfflineNextRecord;

//Get three-axis data(获取三轴数据)
- (void)getTriaxialData;

@@ -199,6 +206,9 @@ NS_ASSUME_NONNULL_BEGIN
/** 设置设备的IP地址,端口号和访问路径 */
- (void)setDevAccessIpAddress:(NSString *)address portNumber:(NSUInteger)portNum path:(NSString *)path;

/** app查询BLE工作状态 0xFC */
- (void)getDevBleWorkState:(enum ELSupportDeviceType)cid;

@end

NS_ASSUME_NONNULL_END

+ 40
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELToothbrushScoreAlgorithmTool.h 파일 보기

@@ -0,0 +1,40 @@
//
// ELToothbrushScoreAlgorithmTool.h
// AILinkBleSDK
//
// Created by LarryZhang on 2022/11/9.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface ELToothbrushScoreAlgorithmTool : NSObject

//总得分
+ (int)totalScoreDefaultTime:(int)defaultTime
totalTime:(int)totalTime
leftTime:(int)leftTime
rightTime:(int)rightTime;

//刷牙时长
+ (int)durationScoreDefaultTime:(int)defaultTime
totalTime:(int)totalTime
leftTime:(int)leftTime
rightTime:(int)rightTime;

//刷牙范围
+ (int)rangeScoreDefaultTime:(int)defaultTime
totalTime:(int)totalTime
leftTime:(int)leftTime
rightTime:(int)rightTime;

//刷牙均匀度
+ (int)uniformityScoreDefaultTime:(int)defaultTime
totalTime:(int)totalTime
leftTime:(int)leftTime
rightTime:(int)rightTime;

@end

NS_ASSUME_NONNULL_END

+ 20
- 2
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELToothburshHeader.h 파일 보기

@@ -46,6 +46,7 @@ typedef NS_ENUM(NSUInteger, ToothbrushDataType) {
ToothbrushDataTypeSwitchWork_A70B = 0x0B,//Switch toothbrush(开关牙刷)
ToothbrushDataTypeSetTwoGearDefault_A70C = 0x0C,//Set second gear default(设置二档默认)
ToothbrushDataTypeGetTwoGearDefault_A70D = 0x0D,//Get second gear default(获取二档默认)
ToothbrushDataTypeGetTwoGearDefault_A7FC = 0xFC,//获取当前工作状态(针对获取已工作时长)
ToothbrushDataTypeToothbrushData_A7FD = 0xFD,//Brushing data(刷牙数据)
ToothbrushDataTypeReportResult_A7FE = 0xFE,//Report received data result(上报接收数据结果)
};
@@ -58,6 +59,7 @@ typedef NS_ENUM(NSUInteger, ToothbrushA6DataType) {
ToothbrushA6DataTypeOfflineDataCancel_13 = 0x13, //Cmd toothbrush offline data cancel(APP 取消接收离线历史记录 二级指令 0x13)
ToothbrushA6DataTypeOfflineDataClear_14 = 0x14, //Cmd toothbrush offline data clear(APP 请求清空离线历史记录 二级指令 0x14)
ToothbrushA6DataTypeOfflineData_15 = 0x15, //Data toothbrush offline data(离线历史记录数据上报给 APP 二级指令 0x15)
ToothbrushA6DataTypeGetOfflineData_16 = 0x16, //Obtain offline history records, this command is sent one by one and then sent again when offline history records are received 获取离线历史记录,该命令为逐条发送再收到离线历史记录的时候再次发送该命令
};


@@ -85,6 +87,13 @@ typedef NS_ENUM(NSUInteger, ToothbrushTriaxialDirection) {
ToothbrushTriaxialDirectionYRight_04 = 4,//Y axis right(Y轴朝右)
};

/** 0x16回复命令枚举定义 */
typedef NS_ENUM(NSInteger, ToothbrushOfflineRecrodStatusType) {
ToothbrushOfflineRecrodStatusType_DataCompleted_00 = 0x00 , //数据全部发送完成
ToothbrushOfflineRecrodStatusType_DataAbnormal_01 = 0x01 , //数据发送异常
ToothbrushOfflineRecrodStatusType_SendNextData_02 = 0x02 , //app通知模块可以发送下一组数据
};


typedef struct {
int interval;//operating hours(工作时间)
@@ -97,6 +106,15 @@ typedef struct {
ToothSupportGearType supportType;//一档、二档
ToothbrushWorkPhaseType workPhase;
} ToothBrushWorkPhase, ToothBrushWorkPhase;

typedef struct {
ToothbrushGearType gear; //模式
ToothSupportGearType supportType;//档位 一档、二档
ToothbrushWorkPhaseType workPhase; //工作阶段
int workTime; //已工作时间
int defaultWorktime; //默认工作时长,未获取到为FF
} ToothBrushNewWorkPhase, ToothBrushNewWorkPhase;

//
typedef struct {
int frequency;
@@ -126,8 +144,8 @@ typedef struct {
unsigned short workTime;
unsigned short leftTime;
unsigned short rightTime;
unsigned char battery;
unsigned char battery;//电池电量
unsigned short defaultWorkTime; //默认工作总时长
} ToothbrushOfflineData;

#endif /* ELToothburshHeader_h */

+ 22
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ELbloodPresureBleWifiDataModel.h 파일 보기

@@ -0,0 +1,22 @@
//
// ELbloodPresureBleWifiDataModel.h
// AILinkBleSDK
//
// Created by iot on 2022/7/12.
// Copyright © 2022 IOT. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ELBloodBleSDKHeader.h"
NS_ASSUME_NONNULL_BEGIN

@interface ELbloodPresureBleWifiDataModel : NSObject
@property (nonatomic, copy) NSString *dia;//Diastolic blood pressure(舒张压)
@property (nonatomic, copy) NSString *sys; //Systolic blood pressure(收缩压)
@property (nonatomic, assign) int heartRate; //Heart rate(心率)
@property (nonatomic, assign) ELDeviceBloodPressureUnit unit;//单位
@property (nonatomic, assign) int point; //小数点
@property (nonatomic, assign) long long createTime;//时间
@end

NS_ASSUME_NONNULL_END

+ 128
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Headers/ElBloodBleWifiManager.h 파일 보기

@@ -0,0 +1,128 @@
//
// ElBloodBleWifiManager.h
// AILinkBleSDK
//
// Created by iot on 2022/7/12.
// Copyright © 2022 IOT. All rights reserved.
//

#import <AILinkBleSDK/ELBluetoothManager.h>
#import "ELBloodBleSDKHeader.h"
#import "ELbloodPresureBleWifiDataModel.h"

typedef NS_ENUM(NSUInteger, ELBloodBleWifiDataType) {
ELBloodBleWifiDataTypeStableData = 0x01, //Stable data(稳定数据)
ELBloodBleWifiDataTypeRealTimeData = 0x02, //Real-time data(实时数据)
ELBloodBleWifiDataTypeSetUnit = 0x81, //App release unit settings(app 下发单位设置)
ELBloodBleWifiDataTypeSetUnitResult = 0x82, //Unit setting result(单位设置结果)
ELBloodBleWifiDataTypeInteraction = 0x83, //Interactive command(交互指令)
ELBloodBleWifiDataTypeSetSwitchVoice = 0x85, //Send voice alarm settings(下发语音报警设置)
ELBloodBleDataWifiTypeSwitchVoiceResult = 0x86, //Send voice alarm setting result(下发语音报警设置结果)
ELBloodBleWifiDataTypeFailCode = 0xFF, //Report error code(上报错误码)
};

@protocol ELBloodBleWifiManagerDelegate <NSObject>

@optional
/**
Callback Bluetooth status(回调蓝牙状态)
@param state Bluetooth status(蓝牙状态)
*/
-(void)bloodBleManagerUpdateBleState:(ELBluetoothState)state;

/**
Callback scanned device(回调扫描到的设备)
@param devices 设备
*/
-(void)bloodBleManagerScanDevices:(NSArray<ELPeripheralModel *> *_Nullable)devices;

/**
Call back real-time, stable data(回调实时、稳定数据)

@param model 数据
@param type 类型
*/
-(void)bloodBleManagerReceiceTestData:(ELbloodPresureBleWifiDataModel *_Nonnull)model type:(ELBloodBleDataModelType)type;

/**
Set unit callback(设置单位回调)
@param type 结果
*/
-(void)bloodBleManagerReceiveSetUnitResult:(ELSetBluetoothResponseType)type;

/**
Set the interaction type(设置交互类型)
@param type 结果
*/
-(void)bloodBleManagerReceiveInteractionType:(ELBloodInteractionType)type;


/**
Error code sent on the device(设备上发错误码)
@param code error code(错误码)
*/
-(void)bloodBleManagerReceiveFailCode:(ELBloodFailCode)code;

/**
Send voice alarm setting result(下发语音报警设置结果)

@param type 操作类型
@param result 结果
*/
-(void)bloodBleManagerReceiveSetSwitchVoiceOperationType:(ELBloodBleSwitchVoiceType)type result:(ELSetBluetoothResponseType)result;

@end


NS_ASSUME_NONNULL_BEGIN

@class ELDeviceModel;

@interface ElBloodBleWifiManager : ELBluetoothManager

@property (nonatomic, weak) id<ELBloodBleWifiManagerDelegate> bloodDelegate;

@property (nonatomic, strong) ELDeviceModel *deviceModel;

+(instancetype)shareManager;


//Set unit(设置单位)
- (void)changeUnit:(ELDeviceBloodPressureUnit)unit;

/**
Interact with Bluetooth(与蓝牙交互)

@param type 类型
ELBloodInteractionTypeStartTest = 0, //Start measurement(开始测量)
ELBloodInteractionTypeStopTest = 1, //Stop testing(停止测试)
ELBloodInteractionTypeBoot = 2, //Boot(开机)
ELBloodInteractionTypeShutdown = 3, //Shut down(关机)
*/
- (void)sendInteractiveInstructions:(ELBloodInteractionType)type;

/**
Send voice alarm settings(下发语音报警设置)

@param type operation type
*/
- (void)sendSwitchVoice:(ELBloodBleSwitchVoiceType)type;


///清除wifi记录指令
- (void)bleWifiCleanWifiRecord;

///获取设备连接的wifi名称
- (void)getBleLinkWifiName;


@property (nonatomic,assign) ELBluetoothState bleWifiBloodStatus;

@end

NS_ASSUME_NONNULL_END

BIN
AILinkBleSDKDemo/AILinkBleSDK.framework/Info.plist 파일 보기


+ 6
- 0
AILinkBleSDKDemo/AILinkBleSDK.framework/Modules/module.modulemap 파일 보기

@@ -0,0 +1,6 @@
framework module AILinkBleSDK {
umbrella header "AILinkBleSDK-umbrella.h"

export *
module * { export * }
}

BIN
AILinkBleSDKDemo/AILinkBleSDK.framework/_CodeSignature/CodeDirectory 파일 보기


BIN
AILinkBleSDKDemo/AILinkBleSDK.framework/_CodeSignature/CodeRequirements 파일 보기


BIN
AILinkBleSDKDemo/AILinkBleSDK.framework/_CodeSignature/CodeRequirements-1 파일 보기


+ 0
- 1467
AILinkBleSDKDemo/AILinkBleSDK.framework/_CodeSignature/CodeResources
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


BIN
AILinkBleSDKDemo/AILinkBleSDK.framework/_CodeSignature/CodeSignature 파일 보기


+ 10
- 0
README.md 파일 보기

@@ -0,0 +1,10 @@
# AILinkBleSDK - 蓝牙SDK

### 版本记录

*ELBluetoothManager.h 文件 #define AiLinkBleSDKVersion @“1.5.1”

| 版本 | 日期 | 变更人 | 内容 |
| ------ | -------- | ------ | ---------------------------------- |
| 1.5.0 | 20221107 | larry | 同步 ailink 蓝牙代码 增加 SDK Demo |
| 1.5.1 | 20221110 | larry | 增加牙刷得分算法 |

Loading…
취소
저장