@@ -7,38 +7,49 @@ | |||
objects = { | |||
/* Begin PBXBuildFile section */ | |||
788D913726A1849C0009489E /* AILinkBleSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 958B4E0B263C079500476BAE /* AILinkBleSDK.framework */; }; | |||
788D913F26A2C4AE0009489E /* libHTBodyfat_SDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 958B4DFC263C079500476BAE /* libHTBodyfat_SDK.a */; }; | |||
958B4E43263C079500476BAE /* EightScaleScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4DF7263C079500476BAE /* EightScaleScanViewController.m */; }; | |||
958B4E44263C079500476BAE /* EightScaleConnectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4DF8263C079500476BAE /* EightScaleConnectionViewController.m */; }; | |||
958B4E46263C079500476BAE /* ELEightScaleRecordModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4DFD263C079500476BAE /* ELEightScaleRecordModel.m */; }; | |||
958B4E47263C079500476BAE /* ELEightScaleAlgorithmTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4DFF263C079500476BAE /* ELEightScaleAlgorithmTool.m */; }; | |||
958B4E48263C079500476BAE /* BabyScaleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E02263C079500476BAE /* BabyScaleViewController.m */; }; | |||
958B4E49263C079500476BAE /* BabyScaleConnectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E05263C079500476BAE /* BabyScaleConnectViewController.m */; }; | |||
958B4E4A263C079500476BAE /* OximeterScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E08263C079500476BAE /* OximeterScanViewController.m */; }; | |||
958B4E4B263C079500476BAE /* OximeterConnectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E0A263C079500476BAE /* OximeterConnectionViewController.m */; }; | |||
958B4E4D263C079500476BAE /* ELBfsWifiScanVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E0F263C079500476BAE /* ELBfsWifiScanVC.m */; }; | |||
958B4E4E263C079500476BAE /* ELBfsWifiConnectVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E10263C079500476BAE /* ELBfsWifiConnectVC.m */; }; | |||
958B4E4F263C079500476BAE /* ELBfsWifiConnectTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E11263C079500476BAE /* ELBfsWifiConnectTableViewCell.m */; }; | |||
958B4E50263C079500476BAE /* ThermometerScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E14263C079500476BAE /* ThermometerScanViewController.m */; }; | |||
958B4E51263C079500476BAE /* ThermometerConnectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E17263C079500476BAE /* ThermometerConnectViewController.m */; }; | |||
958B4E52263C079500476BAE /* ForeheadConnectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E19263C079500476BAE /* ForeheadConnectViewController.m */; }; | |||
958B4E53263C079500476BAE /* ForeheadScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E1C263C079500476BAE /* ForeheadScanViewController.m */; }; | |||
958B4E54263C079500476BAE /* ToothbrushScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E1E263C079500476BAE /* ToothbrushScanViewController.m */; }; | |||
958B4E55263C079500476BAE /* ToothbrushConnectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E21263C079500476BAE /* ToothbrushConnectionViewController.m */; }; | |||
958B4E56263C079500476BAE /* WheelMonitorConnectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E23263C079500476BAE /* WheelMonitorConnectViewController.m */; }; | |||
958B4E57263C079500476BAE /* WheelMonitorScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E25263C079500476BAE /* WheelMonitorScanViewController.m */; }; | |||
958B4E58263C079500476BAE /* RemoteControlConnectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E2A263C079500476BAE /* RemoteControlConnectViewController.m */; }; | |||
958B4E59263C079500476BAE /* RemoteControlScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E2B263C079500476BAE /* RemoteControlScanViewController.m */; }; | |||
958B4E5A263C079500476BAE /* HeightGuageScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E2D263C079500476BAE /* HeightGuageScanViewController.m */; }; | |||
958B4E5B263C079500476BAE /* HeightGuageConnectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E30263C079500476BAE /* HeightGuageConnectViewController.m */; }; | |||
958B4E5C263C079500476BAE /* BroadcastScaleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E32263C079500476BAE /* BroadcastScaleViewController.m */; }; | |||
958B4E5D263C079500476BAE /* BodyFatScaleScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E35263C079500476BAE /* BodyFatScaleScanViewController.m */; }; | |||
958B4E5E263C079500476BAE /* BodyFatScaleConnectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E36263C079500476BAE /* BodyFatScaleConnectViewController.m */; }; | |||
958B4E5F263C079500476BAE /* BloodConnectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E3B263C079500476BAE /* BloodConnectViewController.m */; }; | |||
958B4E60263C079500476BAE /* BloodScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E3C263C079500476BAE /* BloodScanViewController.m */; }; | |||
958B4E61263C079500476BAE /* BloodSugarScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E40263C079500476BAE /* BloodSugarScanViewController.m */; }; | |||
958B4E62263C079500476BAE /* BloodSugarConnectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E41263C079500476BAE /* BloodSugarConnectionViewController.m */; }; | |||
952D19A1276DE80000ED3A0C /* AILinkBleSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 952D19A0276DE80000ED3A0C /* AILinkBleSDK.framework */; }; | |||
95572623276C38CD003BFBAC /* BloodConnectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725BC276C38CC003BFBAC /* BloodConnectViewController.m */; }; | |||
95572624276C38CD003BFBAC /* BloodScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725BD276C38CC003BFBAC /* BloodScanViewController.m */; }; | |||
95572625276C38CD003BFBAC /* AiFreshNutritionScaleScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725C0276C38CC003BFBAC /* AiFreshNutritionScaleScanViewController.m */; }; | |||
95572626276C38CD003BFBAC /* AiFreshNutritionScaleConnectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725C1276C38CC003BFBAC /* AiFreshNutritionScaleConnectionViewController.m */; }; | |||
95572627276C38CD003BFBAC /* BroadcastScaleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725C5276C38CC003BFBAC /* BroadcastScaleViewController.m */; }; | |||
95572628276C38CD003BFBAC /* BloodSugarScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725C9276C38CC003BFBAC /* BloodSugarScanViewController.m */; }; | |||
95572629276C38CD003BFBAC /* BloodSugarConnectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725CA276C38CC003BFBAC /* BloodSugarConnectionViewController.m */; }; | |||
9557262A276C38CD003BFBAC /* WheelMonitorConnectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725CD276C38CC003BFBAC /* WheelMonitorConnectViewController.m */; }; | |||
9557262B276C38CD003BFBAC /* WheelMonitorScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725CF276C38CC003BFBAC /* WheelMonitorScanViewController.m */; }; | |||
9557262C276C38CD003BFBAC /* BroadcastNutritionScaleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725D2276C38CC003BFBAC /* BroadcastNutritionScaleViewController.m */; }; | |||
9557262D276C38CD003BFBAC /* ELBfsWifiScanVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725D7276C38CC003BFBAC /* ELBfsWifiScanVC.m */; }; | |||
9557262E276C38CD003BFBAC /* ELBfsWifiConnectVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725D8276C38CC003BFBAC /* ELBfsWifiConnectVC.m */; }; | |||
9557262F276C38CD003BFBAC /* ELBfsWifiConnectTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725D9276C38CC003BFBAC /* ELBfsWifiConnectTableViewCell.m */; }; | |||
95572630276C38CD003BFBAC /* CoffeeScaleScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725DC276C38CC003BFBAC /* CoffeeScaleScanViewController.m */; }; | |||
95572631276C38CD003BFBAC /* CoffeeScaleConnectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725DF276C38CC003BFBAC /* CoffeeScaleConnectionViewController.m */; }; | |||
95572632276C38CD003BFBAC /* BabyScaleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725E1276C38CC003BFBAC /* BabyScaleViewController.m */; }; | |||
95572633276C38CD003BFBAC /* BabyScaleConnectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725E4276C38CC003BFBAC /* BabyScaleConnectViewController.m */; }; | |||
95572634276C38CD003BFBAC /* HeightGuageScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725E6276C38CC003BFBAC /* HeightGuageScanViewController.m */; }; | |||
95572635276C38CD003BFBAC /* HeightGuageConnectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725E9276C38CC003BFBAC /* HeightGuageConnectViewController.m */; }; | |||
95572636276C38CD003BFBAC /* OximeterScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725EC276C38CC003BFBAC /* OximeterScanViewController.m */; }; | |||
95572637276C38CD003BFBAC /* OximeterConnectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725EE276C38CC003BFBAC /* OximeterConnectionViewController.m */; }; | |||
95572638276C38CD003BFBAC /* NutritionScaleScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725F0276C38CC003BFBAC /* NutritionScaleScanViewController.m */; }; | |||
95572639276C38CD003BFBAC /* NutritionScaleConnectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725F2276C38CC003BFBAC /* NutritionScaleConnectionViewController.m */; }; | |||
9557263A276C38CD003BFBAC /* FaceMaskConnectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725F6276C38CD003BFBAC /* FaceMaskConnectionViewController.m */; }; | |||
9557263B276C38CD003BFBAC /* FaceMaskScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725F8276C38CD003BFBAC /* FaceMaskScanViewController.m */; }; | |||
9557263C276C38CD003BFBAC /* ThermometerScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725FA276C38CD003BFBAC /* ThermometerScanViewController.m */; }; | |||
9557263D276C38CD003BFBAC /* ThermometerConnectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 955725FD276C38CD003BFBAC /* ThermometerConnectViewController.m */; }; | |||
9557263E276C38CD003BFBAC /* EightScaleScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 95572600276C38CD003BFBAC /* EightScaleScanViewController.m */; }; | |||
9557263F276C38CD003BFBAC /* EightScaleConnectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 95572601276C38CD003BFBAC /* EightScaleConnectionViewController.m */; }; | |||
95572640276C38CD003BFBAC /* libHTBodyfat_SDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 95572605276C38CD003BFBAC /* libHTBodyfat_SDK.a */; }; | |||
95572641276C38CD003BFBAC /* ELEightScaleRecordModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 95572606276C38CD003BFBAC /* ELEightScaleRecordModel.m */; }; | |||
95572642276C38CD003BFBAC /* ELEightScaleAlgorithmTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 95572608276C38CD003BFBAC /* ELEightScaleAlgorithmTool.m */; }; | |||
95572643276C38CD003BFBAC /* BodyFatScaleScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9557260B276C38CD003BFBAC /* BodyFatScaleScanViewController.m */; }; | |||
95572644276C38CD003BFBAC /* BodyFatScaleConnectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9557260C276C38CD003BFBAC /* BodyFatScaleConnectViewController.m */; }; | |||
95572645276C38CD003BFBAC /* FoodThermometerScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 95572610276C38CD003BFBAC /* FoodThermometerScanViewController.m */; }; | |||
95572646276C38CD003BFBAC /* FoodThermometerConnectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 95572613276C38CD003BFBAC /* FoodThermometerConnectionViewController.m */; }; | |||
95572647276C38CD003BFBAC /* ForeheadConnectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 95572615276C38CD003BFBAC /* ForeheadConnectViewController.m */; }; | |||
95572648276C38CD003BFBAC /* ForeheadScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 95572618276C38CD003BFBAC /* ForeheadScanViewController.m */; }; | |||
95572649276C38CD003BFBAC /* ToothbrushScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9557261A276C38CD003BFBAC /* ToothbrushScanViewController.m */; }; | |||
9557264A276C38CD003BFBAC /* ToothbrushConnectionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9557261D276C38CD003BFBAC /* ToothbrushConnectionViewController.m */; }; | |||
9557264B276C38CD003BFBAC /* RemoteControlConnectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 95572621276C38CD003BFBAC /* RemoteControlConnectViewController.m */; }; | |||
9557264C276C38CD003BFBAC /* RemoteControlScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 95572622276C38CD003BFBAC /* RemoteControlScanViewController.m */; }; | |||
958B4EA4263C08E800476BAE /* ELInputAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E69263C08E700476BAE /* ELInputAlertView.m */; }; | |||
958B4EA5263C08E800476BAE /* UILabel+WZAdd.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E6A263C08E700476BAE /* UILabel+WZAdd.m */; }; | |||
958B4EA6263C08E800476BAE /* UIView+Category.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E6B263C08E700476BAE /* UIView+Category.m */; }; | |||
@@ -60,7 +71,6 @@ | |||
958B4EB6263C08E800476BAE /* MASViewAttribute.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E96263C08E800476BAE /* MASViewAttribute.m */; }; | |||
958B4EB7263C08E800476BAE /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 958B4E97263C08E800476BAE /* README.md */; }; | |||
958B4EB8263C08E800476BAE /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E98263C08E800476BAE /* ViewController.m */; }; | |||
958B4EB9263C08E800476BAE /* SceneDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E99263C08E800476BAE /* SceneDelegate.m */; }; | |||
958B4EBA263C08E800476BAE /* SubBleManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E9B263C08E800476BAE /* SubBleManager.m */; }; | |||
958B4EBB263C08E800476BAE /* InheritConnectViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E9D263C08E800476BAE /* InheritConnectViewController.m */; }; | |||
958B4EBC263C08E800476BAE /* InheritScanViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 958B4E9E263C08E800476BAE /* InheritScanViewController.m */; }; | |||
@@ -83,69 +93,91 @@ | |||
/* End PBXContainerItemProxy section */ | |||
/* Begin PBXFileReference section */ | |||
958B4DF6263C079500476BAE /* ELEightScaleRecordModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ELEightScaleRecordModel.h; sourceTree = "<group>"; }; | |||
958B4DF7263C079500476BAE /* EightScaleScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EightScaleScanViewController.m; sourceTree = "<group>"; }; | |||
958B4DF8263C079500476BAE /* EightScaleConnectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EightScaleConnectionViewController.m; sourceTree = "<group>"; }; | |||
958B4DF9263C079500476BAE /* ELEightScaleAlgorithmTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ELEightScaleAlgorithmTool.h; sourceTree = "<group>"; }; | |||
958B4DFB263C079500476BAE /* HTBodyfat_SDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTBodyfat_SDK.h; sourceTree = "<group>"; }; | |||
958B4DFC263C079500476BAE /* libHTBodyfat_SDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libHTBodyfat_SDK.a; sourceTree = "<group>"; }; | |||
958B4DFD263C079500476BAE /* ELEightScaleRecordModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ELEightScaleRecordModel.m; sourceTree = "<group>"; }; | |||
958B4DFE263C079500476BAE /* EightScaleScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EightScaleScanViewController.h; sourceTree = "<group>"; }; | |||
958B4DFF263C079500476BAE /* ELEightScaleAlgorithmTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ELEightScaleAlgorithmTool.m; sourceTree = "<group>"; }; | |||
958B4E00263C079500476BAE /* EightScaleConnectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EightScaleConnectionViewController.h; sourceTree = "<group>"; }; | |||
958B4E02263C079500476BAE /* BabyScaleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BabyScaleViewController.m; sourceTree = "<group>"; }; | |||
958B4E03263C079500476BAE /* BabyScaleConnectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BabyScaleConnectViewController.h; sourceTree = "<group>"; }; | |||
958B4E04263C079500476BAE /* BabyScaleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BabyScaleViewController.h; sourceTree = "<group>"; }; | |||
958B4E05263C079500476BAE /* BabyScaleConnectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BabyScaleConnectViewController.m; sourceTree = "<group>"; }; | |||
958B4E07263C079500476BAE /* OximeterConnectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OximeterConnectionViewController.h; sourceTree = "<group>"; }; | |||
958B4E08263C079500476BAE /* OximeterScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OximeterScanViewController.m; sourceTree = "<group>"; }; | |||
958B4E09263C079500476BAE /* OximeterScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OximeterScanViewController.h; sourceTree = "<group>"; }; | |||
958B4E0A263C079500476BAE /* OximeterConnectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OximeterConnectionViewController.m; sourceTree = "<group>"; }; | |||
958B4E0B263C079500476BAE /* AILinkBleSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = AILinkBleSDK.framework; sourceTree = "<group>"; }; | |||
958B4E0D263C079500476BAE /* ELBfsWifiConnectVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ELBfsWifiConnectVC.h; sourceTree = "<group>"; }; | |||
958B4E0E263C079500476BAE /* ELBfsWifiConnectTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ELBfsWifiConnectTableViewCell.h; sourceTree = "<group>"; }; | |||
958B4E0F263C079500476BAE /* ELBfsWifiScanVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ELBfsWifiScanVC.m; sourceTree = "<group>"; }; | |||
958B4E10263C079500476BAE /* ELBfsWifiConnectVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ELBfsWifiConnectVC.m; sourceTree = "<group>"; }; | |||
958B4E11263C079500476BAE /* ELBfsWifiConnectTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ELBfsWifiConnectTableViewCell.m; sourceTree = "<group>"; }; | |||
958B4E12263C079500476BAE /* ELBfsWifiScanVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ELBfsWifiScanVC.h; sourceTree = "<group>"; }; | |||
958B4E14263C079500476BAE /* ThermometerScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ThermometerScanViewController.m; sourceTree = "<group>"; }; | |||
958B4E15263C079500476BAE /* ThermometerConnectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThermometerConnectViewController.h; sourceTree = "<group>"; }; | |||
958B4E16263C079500476BAE /* ThermometerScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThermometerScanViewController.h; sourceTree = "<group>"; }; | |||
958B4E17263C079500476BAE /* ThermometerConnectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ThermometerConnectViewController.m; sourceTree = "<group>"; }; | |||
958B4E19263C079500476BAE /* ForeheadConnectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ForeheadConnectViewController.m; sourceTree = "<group>"; }; | |||
958B4E1A263C079500476BAE /* ForeheadScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ForeheadScanViewController.h; sourceTree = "<group>"; }; | |||
958B4E1B263C079500476BAE /* ForeheadConnectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ForeheadConnectViewController.h; sourceTree = "<group>"; }; | |||
958B4E1C263C079500476BAE /* ForeheadScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ForeheadScanViewController.m; sourceTree = "<group>"; }; | |||
958B4E1E263C079500476BAE /* ToothbrushScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ToothbrushScanViewController.m; sourceTree = "<group>"; }; | |||
958B4E1F263C079500476BAE /* ToothbrushConnectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ToothbrushConnectionViewController.h; sourceTree = "<group>"; }; | |||
958B4E20263C079500476BAE /* ToothbrushScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ToothbrushScanViewController.h; sourceTree = "<group>"; }; | |||
958B4E21263C079500476BAE /* ToothbrushConnectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ToothbrushConnectionViewController.m; sourceTree = "<group>"; }; | |||
958B4E23263C079500476BAE /* WheelMonitorConnectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WheelMonitorConnectViewController.m; sourceTree = "<group>"; }; | |||
958B4E24263C079500476BAE /* WheelMonitorScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WheelMonitorScanViewController.h; sourceTree = "<group>"; }; | |||
958B4E25263C079500476BAE /* WheelMonitorScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WheelMonitorScanViewController.m; sourceTree = "<group>"; }; | |||
958B4E26263C079500476BAE /* WheelMonitorConnectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WheelMonitorConnectViewController.h; sourceTree = "<group>"; }; | |||
958B4E28263C079500476BAE /* RemoteControlScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteControlScanViewController.h; sourceTree = "<group>"; }; | |||
958B4E29263C079500476BAE /* RemoteControlConnectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteControlConnectViewController.h; sourceTree = "<group>"; }; | |||
958B4E2A263C079500476BAE /* RemoteControlConnectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RemoteControlConnectViewController.m; sourceTree = "<group>"; }; | |||
958B4E2B263C079500476BAE /* RemoteControlScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RemoteControlScanViewController.m; sourceTree = "<group>"; }; | |||
958B4E2D263C079500476BAE /* HeightGuageScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HeightGuageScanViewController.m; sourceTree = "<group>"; }; | |||
958B4E2E263C079500476BAE /* HeightGuageConnectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeightGuageConnectViewController.h; sourceTree = "<group>"; }; | |||
958B4E2F263C079500476BAE /* HeightGuageScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeightGuageScanViewController.h; sourceTree = "<group>"; }; | |||
958B4E30263C079500476BAE /* HeightGuageConnectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HeightGuageConnectViewController.m; sourceTree = "<group>"; }; | |||
958B4E32263C079500476BAE /* BroadcastScaleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BroadcastScaleViewController.m; sourceTree = "<group>"; }; | |||
958B4E33263C079500476BAE /* BroadcastScaleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BroadcastScaleViewController.h; sourceTree = "<group>"; }; | |||
958B4E35263C079500476BAE /* BodyFatScaleScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BodyFatScaleScanViewController.m; sourceTree = "<group>"; }; | |||
958B4E36263C079500476BAE /* BodyFatScaleConnectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BodyFatScaleConnectViewController.m; sourceTree = "<group>"; }; | |||
958B4E37263C079500476BAE /* BodyFatScaleScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BodyFatScaleScanViewController.h; sourceTree = "<group>"; }; | |||
958B4E38263C079500476BAE /* BodyFatScaleConnectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BodyFatScaleConnectViewController.h; sourceTree = "<group>"; }; | |||
958B4E3A263C079500476BAE /* BloodScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BloodScanViewController.h; sourceTree = "<group>"; }; | |||
958B4E3B263C079500476BAE /* BloodConnectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BloodConnectViewController.m; sourceTree = "<group>"; }; | |||
958B4E3C263C079500476BAE /* BloodScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BloodScanViewController.m; sourceTree = "<group>"; }; | |||
958B4E3D263C079500476BAE /* BloodConnectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BloodConnectViewController.h; sourceTree = "<group>"; }; | |||
958B4E3F263C079500476BAE /* BloodSugarConnectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BloodSugarConnectionViewController.h; sourceTree = "<group>"; }; | |||
958B4E40263C079500476BAE /* BloodSugarScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BloodSugarScanViewController.m; sourceTree = "<group>"; }; | |||
958B4E41263C079500476BAE /* BloodSugarConnectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BloodSugarConnectionViewController.m; sourceTree = "<group>"; }; | |||
958B4E42263C079500476BAE /* BloodSugarScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BloodSugarScanViewController.h; sourceTree = "<group>"; }; | |||
952D19A0276DE80000ED3A0C /* AILinkBleSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = AILinkBleSDK.framework; sourceTree = "<group>"; }; | |||
955725BB276C38CC003BFBAC /* BloodScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BloodScanViewController.h; sourceTree = "<group>"; }; | |||
955725BC276C38CC003BFBAC /* BloodConnectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BloodConnectViewController.m; sourceTree = "<group>"; }; | |||
955725BD276C38CC003BFBAC /* BloodScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BloodScanViewController.m; sourceTree = "<group>"; }; | |||
955725BE276C38CC003BFBAC /* BloodConnectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BloodConnectViewController.h; sourceTree = "<group>"; }; | |||
955725C0276C38CC003BFBAC /* AiFreshNutritionScaleScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AiFreshNutritionScaleScanViewController.m; sourceTree = "<group>"; }; | |||
955725C1276C38CC003BFBAC /* AiFreshNutritionScaleConnectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AiFreshNutritionScaleConnectionViewController.m; sourceTree = "<group>"; }; | |||
955725C2276C38CC003BFBAC /* AiFreshNutritionScaleScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AiFreshNutritionScaleScanViewController.h; sourceTree = "<group>"; }; | |||
955725C3276C38CC003BFBAC /* AiFreshNutritionScaleConnectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AiFreshNutritionScaleConnectionViewController.h; sourceTree = "<group>"; }; | |||
955725C5276C38CC003BFBAC /* BroadcastScaleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BroadcastScaleViewController.m; sourceTree = "<group>"; }; | |||
955725C6276C38CC003BFBAC /* BroadcastScaleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BroadcastScaleViewController.h; sourceTree = "<group>"; }; | |||
955725C8276C38CC003BFBAC /* BloodSugarConnectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BloodSugarConnectionViewController.h; sourceTree = "<group>"; }; | |||
955725C9276C38CC003BFBAC /* BloodSugarScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BloodSugarScanViewController.m; sourceTree = "<group>"; }; | |||
955725CA276C38CC003BFBAC /* BloodSugarConnectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BloodSugarConnectionViewController.m; sourceTree = "<group>"; }; | |||
955725CB276C38CC003BFBAC /* BloodSugarScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BloodSugarScanViewController.h; sourceTree = "<group>"; }; | |||
955725CD276C38CC003BFBAC /* WheelMonitorConnectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WheelMonitorConnectViewController.m; sourceTree = "<group>"; }; | |||
955725CE276C38CC003BFBAC /* WheelMonitorScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WheelMonitorScanViewController.h; sourceTree = "<group>"; }; | |||
955725CF276C38CC003BFBAC /* WheelMonitorScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WheelMonitorScanViewController.m; sourceTree = "<group>"; }; | |||
955725D0276C38CC003BFBAC /* WheelMonitorConnectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WheelMonitorConnectViewController.h; sourceTree = "<group>"; }; | |||
955725D2276C38CC003BFBAC /* BroadcastNutritionScaleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BroadcastNutritionScaleViewController.m; sourceTree = "<group>"; }; | |||
955725D3276C38CC003BFBAC /* BroadcastNutritionScaleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BroadcastNutritionScaleViewController.h; sourceTree = "<group>"; }; | |||
955725D5276C38CC003BFBAC /* ELBfsWifiConnectVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ELBfsWifiConnectVC.h; sourceTree = "<group>"; }; | |||
955725D6276C38CC003BFBAC /* ELBfsWifiConnectTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ELBfsWifiConnectTableViewCell.h; sourceTree = "<group>"; }; | |||
955725D7276C38CC003BFBAC /* ELBfsWifiScanVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ELBfsWifiScanVC.m; sourceTree = "<group>"; }; | |||
955725D8276C38CC003BFBAC /* ELBfsWifiConnectVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ELBfsWifiConnectVC.m; sourceTree = "<group>"; }; | |||
955725D9276C38CC003BFBAC /* ELBfsWifiConnectTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ELBfsWifiConnectTableViewCell.m; sourceTree = "<group>"; }; | |||
955725DA276C38CC003BFBAC /* ELBfsWifiScanVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ELBfsWifiScanVC.h; sourceTree = "<group>"; }; | |||
955725DC276C38CC003BFBAC /* CoffeeScaleScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CoffeeScaleScanViewController.m; sourceTree = "<group>"; }; | |||
955725DD276C38CC003BFBAC /* CoffeeScaleConnectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoffeeScaleConnectionViewController.h; sourceTree = "<group>"; }; | |||
955725DE276C38CC003BFBAC /* CoffeeScaleScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoffeeScaleScanViewController.h; sourceTree = "<group>"; }; | |||
955725DF276C38CC003BFBAC /* CoffeeScaleConnectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CoffeeScaleConnectionViewController.m; sourceTree = "<group>"; }; | |||
955725E1276C38CC003BFBAC /* BabyScaleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BabyScaleViewController.m; sourceTree = "<group>"; }; | |||
955725E2276C38CC003BFBAC /* BabyScaleConnectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BabyScaleConnectViewController.h; sourceTree = "<group>"; }; | |||
955725E3276C38CC003BFBAC /* BabyScaleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BabyScaleViewController.h; sourceTree = "<group>"; }; | |||
955725E4276C38CC003BFBAC /* BabyScaleConnectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BabyScaleConnectViewController.m; sourceTree = "<group>"; }; | |||
955725E6276C38CC003BFBAC /* HeightGuageScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HeightGuageScanViewController.m; sourceTree = "<group>"; }; | |||
955725E7276C38CC003BFBAC /* HeightGuageConnectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeightGuageConnectViewController.h; sourceTree = "<group>"; }; | |||
955725E8276C38CC003BFBAC /* HeightGuageScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeightGuageScanViewController.h; sourceTree = "<group>"; }; | |||
955725E9276C38CC003BFBAC /* HeightGuageConnectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HeightGuageConnectViewController.m; sourceTree = "<group>"; }; | |||
955725EB276C38CC003BFBAC /* OximeterConnectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OximeterConnectionViewController.h; sourceTree = "<group>"; }; | |||
955725EC276C38CC003BFBAC /* OximeterScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OximeterScanViewController.m; sourceTree = "<group>"; }; | |||
955725ED276C38CC003BFBAC /* OximeterScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OximeterScanViewController.h; sourceTree = "<group>"; }; | |||
955725EE276C38CC003BFBAC /* OximeterConnectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OximeterConnectionViewController.m; sourceTree = "<group>"; }; | |||
955725F0276C38CC003BFBAC /* NutritionScaleScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NutritionScaleScanViewController.m; sourceTree = "<group>"; }; | |||
955725F1276C38CC003BFBAC /* NutritionScaleConnectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NutritionScaleConnectionViewController.h; sourceTree = "<group>"; }; | |||
955725F2276C38CC003BFBAC /* NutritionScaleConnectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NutritionScaleConnectionViewController.m; sourceTree = "<group>"; }; | |||
955725F3276C38CC003BFBAC /* NutritionScaleScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NutritionScaleScanViewController.h; sourceTree = "<group>"; }; | |||
955725F5276C38CD003BFBAC /* FaceMaskScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FaceMaskScanViewController.h; sourceTree = "<group>"; }; | |||
955725F6276C38CD003BFBAC /* FaceMaskConnectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FaceMaskConnectionViewController.m; sourceTree = "<group>"; }; | |||
955725F7276C38CD003BFBAC /* FaceMaskConnectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FaceMaskConnectionViewController.h; sourceTree = "<group>"; }; | |||
955725F8276C38CD003BFBAC /* FaceMaskScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FaceMaskScanViewController.m; sourceTree = "<group>"; }; | |||
955725FA276C38CD003BFBAC /* ThermometerScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ThermometerScanViewController.m; sourceTree = "<group>"; }; | |||
955725FB276C38CD003BFBAC /* ThermometerConnectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThermometerConnectViewController.h; sourceTree = "<group>"; }; | |||
955725FC276C38CD003BFBAC /* ThermometerScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThermometerScanViewController.h; sourceTree = "<group>"; }; | |||
955725FD276C38CD003BFBAC /* ThermometerConnectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ThermometerConnectViewController.m; sourceTree = "<group>"; }; | |||
955725FF276C38CD003BFBAC /* ELEightScaleRecordModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ELEightScaleRecordModel.h; sourceTree = "<group>"; }; | |||
95572600276C38CD003BFBAC /* EightScaleScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EightScaleScanViewController.m; sourceTree = "<group>"; }; | |||
95572601276C38CD003BFBAC /* EightScaleConnectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = EightScaleConnectionViewController.m; sourceTree = "<group>"; }; | |||
95572602276C38CD003BFBAC /* ELEightScaleAlgorithmTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ELEightScaleAlgorithmTool.h; sourceTree = "<group>"; }; | |||
95572604276C38CD003BFBAC /* HTBodyfat_SDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTBodyfat_SDK.h; sourceTree = "<group>"; }; | |||
95572605276C38CD003BFBAC /* libHTBodyfat_SDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libHTBodyfat_SDK.a; sourceTree = "<group>"; }; | |||
95572606276C38CD003BFBAC /* ELEightScaleRecordModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ELEightScaleRecordModel.m; sourceTree = "<group>"; }; | |||
95572607276C38CD003BFBAC /* EightScaleScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EightScaleScanViewController.h; sourceTree = "<group>"; }; | |||
95572608276C38CD003BFBAC /* ELEightScaleAlgorithmTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ELEightScaleAlgorithmTool.m; sourceTree = "<group>"; }; | |||
95572609276C38CD003BFBAC /* EightScaleConnectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EightScaleConnectionViewController.h; sourceTree = "<group>"; }; | |||
9557260B276C38CD003BFBAC /* BodyFatScaleScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BodyFatScaleScanViewController.m; sourceTree = "<group>"; }; | |||
9557260C276C38CD003BFBAC /* BodyFatScaleConnectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BodyFatScaleConnectViewController.m; sourceTree = "<group>"; }; | |||
9557260D276C38CD003BFBAC /* BodyFatScaleScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BodyFatScaleScanViewController.h; sourceTree = "<group>"; }; | |||
9557260E276C38CD003BFBAC /* BodyFatScaleConnectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BodyFatScaleConnectViewController.h; sourceTree = "<group>"; }; | |||
95572610276C38CD003BFBAC /* FoodThermometerScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FoodThermometerScanViewController.m; sourceTree = "<group>"; }; | |||
95572611276C38CD003BFBAC /* FoodThermometerConnectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FoodThermometerConnectionViewController.h; sourceTree = "<group>"; }; | |||
95572612276C38CD003BFBAC /* FoodThermometerScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FoodThermometerScanViewController.h; sourceTree = "<group>"; }; | |||
95572613276C38CD003BFBAC /* FoodThermometerConnectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FoodThermometerConnectionViewController.m; sourceTree = "<group>"; }; | |||
95572615276C38CD003BFBAC /* ForeheadConnectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ForeheadConnectViewController.m; sourceTree = "<group>"; }; | |||
95572616276C38CD003BFBAC /* ForeheadScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ForeheadScanViewController.h; sourceTree = "<group>"; }; | |||
95572617276C38CD003BFBAC /* ForeheadConnectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ForeheadConnectViewController.h; sourceTree = "<group>"; }; | |||
95572618276C38CD003BFBAC /* ForeheadScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ForeheadScanViewController.m; sourceTree = "<group>"; }; | |||
9557261A276C38CD003BFBAC /* ToothbrushScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ToothbrushScanViewController.m; sourceTree = "<group>"; }; | |||
9557261B276C38CD003BFBAC /* ToothbrushConnectionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ToothbrushConnectionViewController.h; sourceTree = "<group>"; }; | |||
9557261C276C38CD003BFBAC /* ToothbrushScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ToothbrushScanViewController.h; sourceTree = "<group>"; }; | |||
9557261D276C38CD003BFBAC /* ToothbrushConnectionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ToothbrushConnectionViewController.m; sourceTree = "<group>"; }; | |||
9557261F276C38CD003BFBAC /* RemoteControlScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteControlScanViewController.h; sourceTree = "<group>"; }; | |||
95572620276C38CD003BFBAC /* RemoteControlConnectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteControlConnectViewController.h; sourceTree = "<group>"; }; | |||
95572621276C38CD003BFBAC /* RemoteControlConnectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RemoteControlConnectViewController.m; sourceTree = "<group>"; }; | |||
95572622276C38CD003BFBAC /* RemoteControlScanViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RemoteControlScanViewController.m; sourceTree = "<group>"; }; | |||
958B4E68263C08E700476BAE /* UIButton+WZAdd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+WZAdd.h"; sourceTree = "<group>"; }; | |||
958B4E69263C08E700476BAE /* ELInputAlertView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ELInputAlertView.m; sourceTree = "<group>"; }; | |||
958B4E6A263C08E700476BAE /* UILabel+WZAdd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UILabel+WZAdd.m"; sourceTree = "<group>"; }; | |||
@@ -191,7 +223,6 @@ | |||
958B4E96263C08E800476BAE /* MASViewAttribute.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MASViewAttribute.m; sourceTree = "<group>"; }; | |||
958B4E97263C08E800476BAE /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; }; | |||
958B4E98263C08E800476BAE /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; }; | |||
958B4E99263C08E800476BAE /* SceneDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SceneDelegate.m; sourceTree = "<group>"; }; | |||
958B4E9B263C08E800476BAE /* SubBleManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SubBleManager.m; sourceTree = "<group>"; }; | |||
958B4E9C263C08E800476BAE /* InheritScanViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InheritScanViewController.h; sourceTree = "<group>"; }; | |||
958B4E9D263C08E800476BAE /* InheritConnectViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InheritConnectViewController.m; sourceTree = "<group>"; }; | |||
@@ -200,7 +231,6 @@ | |||
958B4EA0263C08E800476BAE /* InheritConnectViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InheritConnectViewController.h; sourceTree = "<group>"; }; | |||
958B4EA1263C08E800476BAE /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; | |||
958B4EA2263C08E800476BAE /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; }; | |||
958B4EA3263C08E800476BAE /* SceneDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SceneDelegate.h; sourceTree = "<group>"; }; | |||
E622E25B243F1CA5003C319D /* AILinkBleSDKDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AILinkBleSDKDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; | |||
E622E26A243F1CA6003C319D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; | |||
E622E26D243F1CA6003C319D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; | |||
@@ -217,8 +247,8 @@ | |||
isa = PBXFrameworksBuildPhase; | |||
buildActionMask = 2147483647; | |||
files = ( | |||
788D913F26A2C4AE0009489E /* libHTBodyfat_SDK.a in Frameworks */, | |||
788D913726A1849C0009489E /* AILinkBleSDK.framework in Frameworks */, | |||
95572640276C38CD003BFBAC /* libHTBodyfat_SDK.a in Frameworks */, | |||
952D19A1276DE80000ED3A0C /* AILinkBleSDK.framework in Frameworks */, | |||
); | |||
runOnlyForDeploymentPostprocessing = 0; | |||
}; | |||
@@ -242,177 +272,241 @@ | |||
788D914026A2E5380009489E /* SDK */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
958B4E0B263C079500476BAE /* AILinkBleSDK.framework */, | |||
952D19A0276DE80000ED3A0C /* AILinkBleSDK.framework */, | |||
); | |||
name = SDK; | |||
sourceTree = "<group>"; | |||
}; | |||
958B4DF5263C079500476BAE /* 13_EightScale */ = { | |||
955725BA276C38CC003BFBAC /* 05_BloodPressure */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
958B4DFA263C079500476BAE /* HTBodyfat_SDK */, | |||
958B4E00263C079500476BAE /* EightScaleConnectionViewController.h */, | |||
958B4DF8263C079500476BAE /* EightScaleConnectionViewController.m */, | |||
958B4DFE263C079500476BAE /* EightScaleScanViewController.h */, | |||
958B4DF7263C079500476BAE /* EightScaleScanViewController.m */, | |||
958B4DF9263C079500476BAE /* ELEightScaleAlgorithmTool.h */, | |||
958B4DFF263C079500476BAE /* ELEightScaleAlgorithmTool.m */, | |||
958B4DF6263C079500476BAE /* ELEightScaleRecordModel.h */, | |||
958B4DFD263C079500476BAE /* ELEightScaleRecordModel.m */, | |||
955725BB276C38CC003BFBAC /* BloodScanViewController.h */, | |||
955725BC276C38CC003BFBAC /* BloodConnectViewController.m */, | |||
955725BD276C38CC003BFBAC /* BloodScanViewController.m */, | |||
955725BE276C38CC003BFBAC /* BloodConnectViewController.h */, | |||
); | |||
path = 13_EightScale; | |||
path = 05_BloodPressure; | |||
sourceTree = "<group>"; | |||
}; | |||
958B4DFA263C079500476BAE /* HTBodyfat_SDK */ = { | |||
955725BF276C38CC003BFBAC /* 22_AiFreshNutritionScale */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
958B4DFB263C079500476BAE /* HTBodyfat_SDK.h */, | |||
958B4DFC263C079500476BAE /* libHTBodyfat_SDK.a */, | |||
955725C0276C38CC003BFBAC /* AiFreshNutritionScaleScanViewController.m */, | |||
955725C1276C38CC003BFBAC /* AiFreshNutritionScaleConnectionViewController.m */, | |||
955725C2276C38CC003BFBAC /* AiFreshNutritionScaleScanViewController.h */, | |||
955725C3276C38CC003BFBAC /* AiFreshNutritionScaleConnectionViewController.h */, | |||
); | |||
path = HTBodyfat_SDK; | |||
path = 22_AiFreshNutritionScale; | |||
sourceTree = "<group>"; | |||
}; | |||
958B4E01263C079500476BAE /* 04_BabyScale */ = { | |||
955725C4276C38CC003BFBAC /* 12_BroadcastScale */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
958B4E03263C079500476BAE /* BabyScaleConnectViewController.h */, | |||
958B4E05263C079500476BAE /* BabyScaleConnectViewController.m */, | |||
958B4E04263C079500476BAE /* BabyScaleViewController.h */, | |||
958B4E02263C079500476BAE /* BabyScaleViewController.m */, | |||
955725C5276C38CC003BFBAC /* BroadcastScaleViewController.m */, | |||
955725C6276C38CC003BFBAC /* BroadcastScaleViewController.h */, | |||
); | |||
path = 04_BabyScale; | |||
path = 12_BroadcastScale; | |||
sourceTree = "<group>"; | |||
}; | |||
958B4E06263C079500476BAE /* 16_Oximeter */ = { | |||
955725C7276C38CC003BFBAC /* 17_BloodSugar */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
958B4E07263C079500476BAE /* OximeterConnectionViewController.h */, | |||
958B4E0A263C079500476BAE /* OximeterConnectionViewController.m */, | |||
958B4E09263C079500476BAE /* OximeterScanViewController.h */, | |||
958B4E08263C079500476BAE /* OximeterScanViewController.m */, | |||
955725C8276C38CC003BFBAC /* BloodSugarConnectionViewController.h */, | |||
955725C9276C38CC003BFBAC /* BloodSugarScanViewController.m */, | |||
955725CA276C38CC003BFBAC /* BloodSugarConnectionViewController.m */, | |||
955725CB276C38CC003BFBAC /* BloodSugarScanViewController.h */, | |||
); | |||
path = 16_Oximeter; | |||
path = 17_BloodSugar; | |||
sourceTree = "<group>"; | |||
}; | |||
955725CC276C38CC003BFBAC /* 10_WheelMonitor */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
955725CD276C38CC003BFBAC /* WheelMonitorConnectViewController.m */, | |||
955725CE276C38CC003BFBAC /* WheelMonitorScanViewController.h */, | |||
955725CF276C38CC003BFBAC /* WheelMonitorScanViewController.m */, | |||
955725D0276C38CC003BFBAC /* WheelMonitorConnectViewController.h */, | |||
); | |||
path = 10_WheelMonitor; | |||
sourceTree = "<group>"; | |||
}; | |||
955725D1276C38CC003BFBAC /* 20_BroadcastNutritionScale */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
955725D2276C38CC003BFBAC /* BroadcastNutritionScaleViewController.m */, | |||
955725D3276C38CC003BFBAC /* BroadcastNutritionScaleViewController.h */, | |||
); | |||
path = 20_BroadcastNutritionScale; | |||
sourceTree = "<group>"; | |||
}; | |||
958B4E0C263C079500476BAE /* 15_WifiBleBodyFatScale */ = { | |||
955725D4276C38CC003BFBAC /* 15_WifiBleBodyFatScale */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
958B4E0E263C079500476BAE /* ELBfsWifiConnectTableViewCell.h */, | |||
958B4E11263C079500476BAE /* ELBfsWifiConnectTableViewCell.m */, | |||
958B4E0D263C079500476BAE /* ELBfsWifiConnectVC.h */, | |||
958B4E10263C079500476BAE /* ELBfsWifiConnectVC.m */, | |||
958B4E12263C079500476BAE /* ELBfsWifiScanVC.h */, | |||
958B4E0F263C079500476BAE /* ELBfsWifiScanVC.m */, | |||
955725D6276C38CC003BFBAC /* ELBfsWifiConnectTableViewCell.h */, | |||
955725D9276C38CC003BFBAC /* ELBfsWifiConnectTableViewCell.m */, | |||
955725D5276C38CC003BFBAC /* ELBfsWifiConnectVC.h */, | |||
955725D8276C38CC003BFBAC /* ELBfsWifiConnectVC.m */, | |||
955725DA276C38CC003BFBAC /* ELBfsWifiScanVC.h */, | |||
955725D7276C38CC003BFBAC /* ELBfsWifiScanVC.m */, | |||
); | |||
path = 15_WifiBleBodyFatScale; | |||
sourceTree = "<group>"; | |||
}; | |||
958B4E13263C079500476BAE /* 09_Thermometer */ = { | |||
955725DB276C38CC003BFBAC /* 18_CoffeeScale */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
958B4E15263C079500476BAE /* ThermometerConnectViewController.h */, | |||
958B4E17263C079500476BAE /* ThermometerConnectViewController.m */, | |||
958B4E16263C079500476BAE /* ThermometerScanViewController.h */, | |||
958B4E14263C079500476BAE /* ThermometerScanViewController.m */, | |||
955725DC276C38CC003BFBAC /* CoffeeScaleScanViewController.m */, | |||
955725DD276C38CC003BFBAC /* CoffeeScaleConnectionViewController.h */, | |||
955725DE276C38CC003BFBAC /* CoffeeScaleScanViewController.h */, | |||
955725DF276C38CC003BFBAC /* CoffeeScaleConnectionViewController.m */, | |||
); | |||
path = 09_Thermometer; | |||
path = 18_CoffeeScale; | |||
sourceTree = "<group>"; | |||
}; | |||
958B4E18263C079500476BAE /* 08_Forehead */ = { | |||
955725E0276C38CC003BFBAC /* 04_BabyScale */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
958B4E1B263C079500476BAE /* ForeheadConnectViewController.h */, | |||
958B4E19263C079500476BAE /* ForeheadConnectViewController.m */, | |||
958B4E1A263C079500476BAE /* ForeheadScanViewController.h */, | |||
958B4E1C263C079500476BAE /* ForeheadScanViewController.m */, | |||
955725E1276C38CC003BFBAC /* BabyScaleViewController.m */, | |||
955725E2276C38CC003BFBAC /* BabyScaleConnectViewController.h */, | |||
955725E3276C38CC003BFBAC /* BabyScaleViewController.h */, | |||
955725E4276C38CC003BFBAC /* BabyScaleConnectViewController.m */, | |||
); | |||
path = 08_Forehead; | |||
path = 04_BabyScale; | |||
sourceTree = "<group>"; | |||
}; | |||
958B4E1D263C079500476BAE /* 14_WifiBleToothbrush */ = { | |||
955725E5276C38CC003BFBAC /* 06_HeightGuage */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
958B4E1F263C079500476BAE /* ToothbrushConnectionViewController.h */, | |||
958B4E21263C079500476BAE /* ToothbrushConnectionViewController.m */, | |||
958B4E20263C079500476BAE /* ToothbrushScanViewController.h */, | |||
958B4E1E263C079500476BAE /* ToothbrushScanViewController.m */, | |||
955725E6276C38CC003BFBAC /* HeightGuageScanViewController.m */, | |||
955725E7276C38CC003BFBAC /* HeightGuageConnectViewController.h */, | |||
955725E8276C38CC003BFBAC /* HeightGuageScanViewController.h */, | |||
955725E9276C38CC003BFBAC /* HeightGuageConnectViewController.m */, | |||
); | |||
path = 14_WifiBleToothbrush; | |||
path = 06_HeightGuage; | |||
sourceTree = "<group>"; | |||
}; | |||
958B4E22263C079500476BAE /* 10_WheelMonitor */ = { | |||
955725EA276C38CC003BFBAC /* 16_Oximeter */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
958B4E26263C079500476BAE /* WheelMonitorConnectViewController.h */, | |||
958B4E23263C079500476BAE /* WheelMonitorConnectViewController.m */, | |||
958B4E24263C079500476BAE /* WheelMonitorScanViewController.h */, | |||
958B4E25263C079500476BAE /* WheelMonitorScanViewController.m */, | |||
955725EB276C38CC003BFBAC /* OximeterConnectionViewController.h */, | |||
955725EC276C38CC003BFBAC /* OximeterScanViewController.m */, | |||
955725ED276C38CC003BFBAC /* OximeterScanViewController.h */, | |||
955725EE276C38CC003BFBAC /* OximeterConnectionViewController.m */, | |||
); | |||
path = 10_WheelMonitor; | |||
path = 16_Oximeter; | |||
sourceTree = "<group>"; | |||
}; | |||
958B4E27263C079500476BAE /* 07_RemoteControl */ = { | |||
955725EF276C38CC003BFBAC /* 21_NutritionScale */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
958B4E29263C079500476BAE /* RemoteControlConnectViewController.h */, | |||
958B4E2A263C079500476BAE /* RemoteControlConnectViewController.m */, | |||
958B4E28263C079500476BAE /* RemoteControlScanViewController.h */, | |||
958B4E2B263C079500476BAE /* RemoteControlScanViewController.m */, | |||
955725F0276C38CC003BFBAC /* NutritionScaleScanViewController.m */, | |||
955725F1276C38CC003BFBAC /* NutritionScaleConnectionViewController.h */, | |||
955725F2276C38CC003BFBAC /* NutritionScaleConnectionViewController.m */, | |||
955725F3276C38CC003BFBAC /* NutritionScaleScanViewController.h */, | |||
); | |||
path = 07_RemoteControl; | |||
path = 21_NutritionScale; | |||
sourceTree = "<group>"; | |||
}; | |||
958B4E2C263C079500476BAE /* 06_HeightGuage */ = { | |||
955725F4276C38CD003BFBAC /* 23_FaceMask */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
958B4E2E263C079500476BAE /* HeightGuageConnectViewController.h */, | |||
958B4E30263C079500476BAE /* HeightGuageConnectViewController.m */, | |||
958B4E2F263C079500476BAE /* HeightGuageScanViewController.h */, | |||
958B4E2D263C079500476BAE /* HeightGuageScanViewController.m */, | |||
955725F5276C38CD003BFBAC /* FaceMaskScanViewController.h */, | |||
955725F6276C38CD003BFBAC /* FaceMaskConnectionViewController.m */, | |||
955725F7276C38CD003BFBAC /* FaceMaskConnectionViewController.h */, | |||
955725F8276C38CD003BFBAC /* FaceMaskScanViewController.m */, | |||
); | |||
path = 06_HeightGuage; | |||
path = 23_FaceMask; | |||
sourceTree = "<group>"; | |||
}; | |||
958B4E31263C079500476BAE /* 12_BroadcastScale */ = { | |||
955725F9276C38CD003BFBAC /* 09_Thermometer */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
958B4E33263C079500476BAE /* BroadcastScaleViewController.h */, | |||
958B4E32263C079500476BAE /* BroadcastScaleViewController.m */, | |||
955725FA276C38CD003BFBAC /* ThermometerScanViewController.m */, | |||
955725FB276C38CD003BFBAC /* ThermometerConnectViewController.h */, | |||
955725FC276C38CD003BFBAC /* ThermometerScanViewController.h */, | |||
955725FD276C38CD003BFBAC /* ThermometerConnectViewController.m */, | |||
); | |||
path = 12_BroadcastScale; | |||
path = 09_Thermometer; | |||
sourceTree = "<group>"; | |||
}; | |||
955725FE276C38CD003BFBAC /* 13_EightScale */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
955725FF276C38CD003BFBAC /* ELEightScaleRecordModel.h */, | |||
95572600276C38CD003BFBAC /* EightScaleScanViewController.m */, | |||
95572601276C38CD003BFBAC /* EightScaleConnectionViewController.m */, | |||
95572602276C38CD003BFBAC /* ELEightScaleAlgorithmTool.h */, | |||
95572603276C38CD003BFBAC /* HTBodyfat_SDK */, | |||
95572606276C38CD003BFBAC /* ELEightScaleRecordModel.m */, | |||
95572607276C38CD003BFBAC /* EightScaleScanViewController.h */, | |||
95572608276C38CD003BFBAC /* ELEightScaleAlgorithmTool.m */, | |||
95572609276C38CD003BFBAC /* EightScaleConnectionViewController.h */, | |||
); | |||
path = 13_EightScale; | |||
sourceTree = "<group>"; | |||
}; | |||
958B4E34263C079500476BAE /* 11_BodyFatScale */ = { | |||
95572603276C38CD003BFBAC /* HTBodyfat_SDK */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
958B4E38263C079500476BAE /* BodyFatScaleConnectViewController.h */, | |||
958B4E36263C079500476BAE /* BodyFatScaleConnectViewController.m */, | |||
958B4E37263C079500476BAE /* BodyFatScaleScanViewController.h */, | |||
958B4E35263C079500476BAE /* BodyFatScaleScanViewController.m */, | |||
95572604276C38CD003BFBAC /* HTBodyfat_SDK.h */, | |||
95572605276C38CD003BFBAC /* libHTBodyfat_SDK.a */, | |||
); | |||
path = HTBodyfat_SDK; | |||
sourceTree = "<group>"; | |||
}; | |||
9557260A276C38CD003BFBAC /* 11_BodyFatScale */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
9557260B276C38CD003BFBAC /* BodyFatScaleScanViewController.m */, | |||
9557260C276C38CD003BFBAC /* BodyFatScaleConnectViewController.m */, | |||
9557260D276C38CD003BFBAC /* BodyFatScaleScanViewController.h */, | |||
9557260E276C38CD003BFBAC /* BodyFatScaleConnectViewController.h */, | |||
); | |||
path = 11_BodyFatScale; | |||
sourceTree = "<group>"; | |||
}; | |||
958B4E39263C079500476BAE /* 05_BloodPressure */ = { | |||
9557260F276C38CD003BFBAC /* 19_FoodThermometer */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
958B4E3D263C079500476BAE /* BloodConnectViewController.h */, | |||
958B4E3B263C079500476BAE /* BloodConnectViewController.m */, | |||
958B4E3A263C079500476BAE /* BloodScanViewController.h */, | |||
958B4E3C263C079500476BAE /* BloodScanViewController.m */, | |||
95572610276C38CD003BFBAC /* FoodThermometerScanViewController.m */, | |||
95572611276C38CD003BFBAC /* FoodThermometerConnectionViewController.h */, | |||
95572612276C38CD003BFBAC /* FoodThermometerScanViewController.h */, | |||
95572613276C38CD003BFBAC /* FoodThermometerConnectionViewController.m */, | |||
); | |||
path = 05_BloodPressure; | |||
path = 19_FoodThermometer; | |||
sourceTree = "<group>"; | |||
}; | |||
958B4E3E263C079500476BAE /* 17_BloodSugar */ = { | |||
95572614276C38CD003BFBAC /* 08_Forehead */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
958B4E3F263C079500476BAE /* BloodSugarConnectionViewController.h */, | |||
958B4E41263C079500476BAE /* BloodSugarConnectionViewController.m */, | |||
958B4E42263C079500476BAE /* BloodSugarScanViewController.h */, | |||
958B4E40263C079500476BAE /* BloodSugarScanViewController.m */, | |||
95572615276C38CD003BFBAC /* ForeheadConnectViewController.m */, | |||
95572616276C38CD003BFBAC /* ForeheadScanViewController.h */, | |||
95572617276C38CD003BFBAC /* ForeheadConnectViewController.h */, | |||
95572618276C38CD003BFBAC /* ForeheadScanViewController.m */, | |||
); | |||
path = 17_BloodSugar; | |||
path = 08_Forehead; | |||
sourceTree = "<group>"; | |||
}; | |||
95572619276C38CD003BFBAC /* 14_WifiBleToothbrush */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
9557261A276C38CD003BFBAC /* ToothbrushScanViewController.m */, | |||
9557261B276C38CD003BFBAC /* ToothbrushConnectionViewController.h */, | |||
9557261C276C38CD003BFBAC /* ToothbrushScanViewController.h */, | |||
9557261D276C38CD003BFBAC /* ToothbrushConnectionViewController.m */, | |||
); | |||
path = 14_WifiBleToothbrush; | |||
sourceTree = "<group>"; | |||
}; | |||
9557261E276C38CD003BFBAC /* 07_RemoteControl */ = { | |||
isa = PBXGroup; | |||
children = ( | |||
9557261F276C38CD003BFBAC /* RemoteControlScanViewController.h */, | |||
95572620276C38CD003BFBAC /* RemoteControlConnectViewController.h */, | |||
95572621276C38CD003BFBAC /* RemoteControlConnectViewController.m */, | |||
95572622276C38CD003BFBAC /* RemoteControlScanViewController.m */, | |||
); | |||
path = 07_RemoteControl; | |||
sourceTree = "<group>"; | |||
}; | |||
958B4E67263C08E700476BAE /* Tools */ = { | |||
@@ -442,8 +536,6 @@ | |||
958B4EA1263C08E800476BAE /* AppDelegate.m */, | |||
958B4E9A263C08E800476BAE /* Inherit */, | |||
958B4E7B263C08E800476BAE /* Masonry */, | |||
958B4EA3263C08E800476BAE /* SceneDelegate.h */, | |||
958B4E99263C08E800476BAE /* SceneDelegate.m */, | |||
958B4EA2263C08E800476BAE /* ViewController.h */, | |||
958B4E98263C08E800476BAE /* ViewController.m */, | |||
); | |||
@@ -539,20 +631,26 @@ | |||
isa = PBXGroup; | |||
children = ( | |||
788D914026A2E5380009489E /* SDK */, | |||
958B4E01263C079500476BAE /* 04_BabyScale */, | |||
958B4E39263C079500476BAE /* 05_BloodPressure */, | |||
958B4E2C263C079500476BAE /* 06_HeightGuage */, | |||
958B4E27263C079500476BAE /* 07_RemoteControl */, | |||
958B4E18263C079500476BAE /* 08_Forehead */, | |||
958B4E13263C079500476BAE /* 09_Thermometer */, | |||
958B4E22263C079500476BAE /* 10_WheelMonitor */, | |||
958B4E34263C079500476BAE /* 11_BodyFatScale */, | |||
958B4E31263C079500476BAE /* 12_BroadcastScale */, | |||
958B4DF5263C079500476BAE /* 13_EightScale */, | |||
958B4E1D263C079500476BAE /* 14_WifiBleToothbrush */, | |||
958B4E0C263C079500476BAE /* 15_WifiBleBodyFatScale */, | |||
958B4E06263C079500476BAE /* 16_Oximeter */, | |||
958B4E3E263C079500476BAE /* 17_BloodSugar */, | |||
955725E0276C38CC003BFBAC /* 04_BabyScale */, | |||
955725BA276C38CC003BFBAC /* 05_BloodPressure */, | |||
955725E5276C38CC003BFBAC /* 06_HeightGuage */, | |||
9557261E276C38CD003BFBAC /* 07_RemoteControl */, | |||
95572614276C38CD003BFBAC /* 08_Forehead */, | |||
955725F9276C38CD003BFBAC /* 09_Thermometer */, | |||
955725CC276C38CC003BFBAC /* 10_WheelMonitor */, | |||
9557260A276C38CD003BFBAC /* 11_BodyFatScale */, | |||
955725C4276C38CC003BFBAC /* 12_BroadcastScale */, | |||
955725FE276C38CD003BFBAC /* 13_EightScale */, | |||
95572619276C38CD003BFBAC /* 14_WifiBleToothbrush */, | |||
955725D4276C38CC003BFBAC /* 15_WifiBleBodyFatScale */, | |||
955725EA276C38CC003BFBAC /* 16_Oximeter */, | |||
955725C7276C38CC003BFBAC /* 17_BloodSugar */, | |||
955725DB276C38CC003BFBAC /* 18_CoffeeScale */, | |||
9557260F276C38CD003BFBAC /* 19_FoodThermometer */, | |||
955725D1276C38CC003BFBAC /* 20_BroadcastNutritionScale */, | |||
955725EF276C38CC003BFBAC /* 21_NutritionScale */, | |||
955725BF276C38CC003BFBAC /* 22_AiFreshNutritionScale */, | |||
955725F4276C38CD003BFBAC /* 23_FaceMask */, | |||
958B4E74263C08E700476BAE /* Others */, | |||
958B4E67263C08E700476BAE /* Tools */, | |||
E622E26A243F1CA6003C319D /* Assets.xcassets */, | |||
@@ -617,7 +715,7 @@ | |||
E622E253243F1CA5003C319D /* Project object */ = { | |||
isa = PBXProject; | |||
attributes = { | |||
LastUpgradeCheck = 1130; | |||
LastUpgradeCheck = 1230; | |||
ORGANIZATIONNAME = IOT; | |||
TargetAttributes = { | |||
E622E25A243F1CA5003C319D = { | |||
@@ -675,61 +773,71 @@ | |||
isa = PBXSourcesBuildPhase; | |||
buildActionMask = 2147483647; | |||
files = ( | |||
9557264A276C38CD003BFBAC /* ToothbrushConnectionViewController.m in Sources */, | |||
9557263B276C38CD003BFBAC /* FaceMaskScanViewController.m in Sources */, | |||
9557263F276C38CD003BFBAC /* EightScaleConnectionViewController.m in Sources */, | |||
9557262B276C38CD003BFBAC /* WheelMonitorScanViewController.m in Sources */, | |||
95572629276C38CD003BFBAC /* BloodSugarConnectionViewController.m in Sources */, | |||
9557262A276C38CD003BFBAC /* WheelMonitorConnectViewController.m in Sources */, | |||
95572642276C38CD003BFBAC /* ELEightScaleAlgorithmTool.m in Sources */, | |||
95572630276C38CD003BFBAC /* CoffeeScaleScanViewController.m in Sources */, | |||
958B4EAD263C08E800476BAE /* NSLayoutConstraint+MASDebugAdditions.m in Sources */, | |||
9557264B276C38CD003BFBAC /* RemoteControlConnectViewController.m in Sources */, | |||
958B4EAB263C08E800476BAE /* AiLinkSuperViewController.m in Sources */, | |||
9557263E276C38CD003BFBAC /* EightScaleScanViewController.m in Sources */, | |||
958B4EB8263C08E800476BAE /* ViewController.m in Sources */, | |||
958B4E44263C079500476BAE /* EightScaleConnectionViewController.m in Sources */, | |||
958B4EAF263C08E800476BAE /* MASCompositeConstraint.m in Sources */, | |||
95572626276C38CD003BFBAC /* AiFreshNutritionScaleConnectionViewController.m in Sources */, | |||
9557262F276C38CD003BFBAC /* ELBfsWifiConnectTableViewCell.m in Sources */, | |||
95572623276C38CD003BFBAC /* BloodConnectViewController.m in Sources */, | |||
95572649276C38CD003BFBAC /* ToothbrushScanViewController.m in Sources */, | |||
95572638276C38CD003BFBAC /* NutritionScaleScanViewController.m in Sources */, | |||
958B4EB5263C08E800476BAE /* MASViewConstraint.m in Sources */, | |||
958B4E46263C079500476BAE /* ELEightScaleRecordModel.m in Sources */, | |||
95572628276C38CD003BFBAC /* BloodSugarScanViewController.m in Sources */, | |||
9557264C276C38CD003BFBAC /* RemoteControlScanViewController.m in Sources */, | |||
9557262C276C38CD003BFBAC /* BroadcastNutritionScaleViewController.m in Sources */, | |||
95572643276C38CD003BFBAC /* BodyFatScaleScanViewController.m in Sources */, | |||
95572627276C38CD003BFBAC /* BroadcastScaleViewController.m in Sources */, | |||
95572632276C38CD003BFBAC /* BabyScaleViewController.m in Sources */, | |||
9557263C276C38CD003BFBAC /* ThermometerScanViewController.m in Sources */, | |||
95572625276C38CD003BFBAC /* AiFreshNutritionScaleScanViewController.m in Sources */, | |||
95572641276C38CD003BFBAC /* ELEightScaleRecordModel.m in Sources */, | |||
95572634276C38CD003BFBAC /* HeightGuageScanViewController.m in Sources */, | |||
958B4EA7263C08E800476BAE /* UIButton+WZAdd.m in Sources */, | |||
958B4EA9263C08E800476BAE /* ELSelectView.m in Sources */, | |||
958B4E4F263C079500476BAE /* ELBfsWifiConnectTableViewCell.m in Sources */, | |||
958B4E48263C079500476BAE /* BabyScaleViewController.m in Sources */, | |||
95572635276C38CD003BFBAC /* HeightGuageConnectViewController.m in Sources */, | |||
95572639276C38CD003BFBAC /* NutritionScaleConnectionViewController.m in Sources */, | |||
95572647276C38CD003BFBAC /* ForeheadConnectViewController.m in Sources */, | |||
E622E271243F1CA6003C319D /* main.m in Sources */, | |||
958B4E5C263C079500476BAE /* BroadcastScaleViewController.m in Sources */, | |||
95572646276C38CD003BFBAC /* FoodThermometerConnectionViewController.m in Sources */, | |||
958B4EB3263C08E800476BAE /* View+MASAdditions.m in Sources */, | |||
958B4E60263C079500476BAE /* BloodScanViewController.m in Sources */, | |||
958B4EB1263C08E800476BAE /* MASLayoutConstraint.m in Sources */, | |||
958B4E59263C079500476BAE /* RemoteControlScanViewController.m in Sources */, | |||
958B4E54263C079500476BAE /* ToothbrushScanViewController.m in Sources */, | |||
958B4E57263C079500476BAE /* WheelMonitorScanViewController.m in Sources */, | |||
958B4E47263C079500476BAE /* ELEightScaleAlgorithmTool.m in Sources */, | |||
958B4E51263C079500476BAE /* ThermometerConnectViewController.m in Sources */, | |||
9557263A276C38CD003BFBAC /* FaceMaskConnectionViewController.m in Sources */, | |||
95572636276C38CD003BFBAC /* OximeterScanViewController.m in Sources */, | |||
958B4EA4263C08E800476BAE /* ELInputAlertView.m in Sources */, | |||
958B4E61263C079500476BAE /* BloodSugarScanViewController.m in Sources */, | |||
958B4E5B263C079500476BAE /* HeightGuageConnectViewController.m in Sources */, | |||
958B4EB6263C08E800476BAE /* MASViewAttribute.m in Sources */, | |||
958B4E52263C079500476BAE /* ForeheadConnectViewController.m in Sources */, | |||
958B4E55263C079500476BAE /* ToothbrushConnectionViewController.m in Sources */, | |||
958B4E58263C079500476BAE /* RemoteControlConnectViewController.m in Sources */, | |||
958B4E56263C079500476BAE /* WheelMonitorConnectViewController.m in Sources */, | |||
958B4EB9263C08E800476BAE /* SceneDelegate.m in Sources */, | |||
958B4E5E263C079500476BAE /* BodyFatScaleConnectViewController.m in Sources */, | |||
958B4E49263C079500476BAE /* BabyScaleConnectViewController.m in Sources */, | |||
958B4E5A263C079500476BAE /* HeightGuageScanViewController.m in Sources */, | |||
958B4E50263C079500476BAE /* ThermometerScanViewController.m in Sources */, | |||
958B4EBB263C08E800476BAE /* InheritConnectViewController.m in Sources */, | |||
958B4E4B263C079500476BAE /* OximeterConnectionViewController.m in Sources */, | |||
958B4EB4263C08E800476BAE /* MASConstraint.m in Sources */, | |||
958B4EAA263C08E800476BAE /* AilinkSuperConnectViewController.m in Sources */, | |||
958B4EB0263C08E800476BAE /* MASConstraintMaker.m in Sources */, | |||
958B4E62263C079500476BAE /* BloodSugarConnectionViewController.m in Sources */, | |||
958B4E5D263C079500476BAE /* BodyFatScaleScanViewController.m in Sources */, | |||
958B4EA5263C08E800476BAE /* UILabel+WZAdd.m in Sources */, | |||
958B4E5F263C079500476BAE /* BloodConnectViewController.m in Sources */, | |||
95572633276C38CD003BFBAC /* BabyScaleConnectViewController.m in Sources */, | |||
95572644276C38CD003BFBAC /* BodyFatScaleConnectViewController.m in Sources */, | |||
958B4EBD263C08E800476BAE /* AppDelegate.m in Sources */, | |||
958B4E43263C079500476BAE /* EightScaleScanViewController.m in Sources */, | |||
958B4E53263C079500476BAE /* ForeheadScanViewController.m in Sources */, | |||
958B4EAE263C08E800476BAE /* ViewController+MASAdditions.m in Sources */, | |||
958B4EA8263C08E800476BAE /* CABasicAnimation+ELAnimation.m in Sources */, | |||
958B4E4A263C079500476BAE /* OximeterScanViewController.m in Sources */, | |||
9557263D276C38CD003BFBAC /* ThermometerConnectViewController.m in Sources */, | |||
958B4EBC263C08E800476BAE /* InheritScanViewController.m in Sources */, | |||
95572624276C38CD003BFBAC /* BloodScanViewController.m in Sources */, | |||
958B4EB2263C08E800476BAE /* NSArray+MASAdditions.m in Sources */, | |||
958B4E4D263C079500476BAE /* ELBfsWifiScanVC.m in Sources */, | |||
9557262D276C38CD003BFBAC /* ELBfsWifiScanVC.m in Sources */, | |||
95572645276C38CD003BFBAC /* FoodThermometerScanViewController.m in Sources */, | |||
958B4EA6263C08E800476BAE /* UIView+Category.m in Sources */, | |||
9557262E276C38CD003BFBAC /* ELBfsWifiConnectVC.m in Sources */, | |||
95572637276C38CD003BFBAC /* OximeterConnectionViewController.m in Sources */, | |||
95572648276C38CD003BFBAC /* ForeheadScanViewController.m in Sources */, | |||
958B4EBA263C08E800476BAE /* SubBleManager.m in Sources */, | |||
958B4E4E263C079500476BAE /* ELBfsWifiConnectVC.m in Sources */, | |||
95572631276C38CD003BFBAC /* CoffeeScaleConnectionViewController.m in Sources */, | |||
); | |||
runOnlyForDeploymentPostprocessing = 0; | |||
}; | |||
@@ -789,6 +897,7 @@ | |||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; | |||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; | |||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | |||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; | |||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; | |||
CLANG_WARN_STRICT_PROTOTYPES = YES; | |||
CLANG_WARN_SUSPICIOUS_MOVE = YES; | |||
@@ -813,7 +922,7 @@ | |||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | |||
GCC_WARN_UNUSED_FUNCTION = YES; | |||
GCC_WARN_UNUSED_VARIABLE = YES; | |||
IPHONEOS_DEPLOYMENT_TARGET = 13.2; | |||
IPHONEOS_DEPLOYMENT_TARGET = 12.0; | |||
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; | |||
MTL_FAST_MATH = YES; | |||
ONLY_ACTIVE_ARCH = YES; | |||
@@ -847,6 +956,7 @@ | |||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; | |||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; | |||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | |||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; | |||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; | |||
CLANG_WARN_STRICT_PROTOTYPES = YES; | |||
CLANG_WARN_SUSPICIOUS_MOVE = YES; | |||
@@ -865,7 +975,7 @@ | |||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | |||
GCC_WARN_UNUSED_FUNCTION = YES; | |||
GCC_WARN_UNUSED_VARIABLE = YES; | |||
IPHONEOS_DEPLOYMENT_TARGET = 13.2; | |||
IPHONEOS_DEPLOYMENT_TARGET = 12.0; | |||
MTL_ENABLE_DEBUG_INFO = NO; | |||
MTL_FAST_MATH = YES; | |||
SDKROOT = iphoneos; | |||
@@ -887,6 +997,7 @@ | |||
); | |||
HEADER_SEARCH_PATHS = ""; | |||
INFOPLIST_FILE = AILinkBleSDKDemo/Info.plist; | |||
IPHONEOS_DEPLOYMENT_TARGET = 12.0; | |||
LD_RUNPATH_SEARCH_PATHS = ( | |||
"$(inherited)", | |||
"@executable_path/Frameworks", | |||
@@ -897,6 +1008,7 @@ | |||
"$(PROJECT_DIR)/AILinkBleSDKDemo/13_EightScale/HTBodyfat_SDK", | |||
); | |||
MARKETING_VERSION = 1.1.2; | |||
OTHER_LDFLAGS = "-ObjC"; | |||
PRODUCT_BUNDLE_IDENTIFIER = com.pingwang.AILinkBleSDKDemo; | |||
PRODUCT_NAME = "$(TARGET_NAME)"; | |||
TARGETED_DEVICE_FAMILY = "1,2"; | |||
@@ -917,6 +1029,7 @@ | |||
); | |||
HEADER_SEARCH_PATHS = ""; | |||
INFOPLIST_FILE = AILinkBleSDKDemo/Info.plist; | |||
IPHONEOS_DEPLOYMENT_TARGET = 12.0; | |||
LD_RUNPATH_SEARCH_PATHS = ( | |||
"$(inherited)", | |||
"@executable_path/Frameworks", | |||
@@ -927,6 +1040,7 @@ | |||
"$(PROJECT_DIR)/AILinkBleSDKDemo/13_EightScale/HTBodyfat_SDK", | |||
); | |||
MARKETING_VERSION = 1.1.2; | |||
OTHER_LDFLAGS = "-ObjC"; | |||
PRODUCT_BUNDLE_IDENTIFIER = com.pingwang.AILinkBleSDKDemo; | |||
PRODUCT_NAME = "$(TARGET_NAME)"; | |||
TARGETED_DEVICE_FAMILY = "1,2"; |
@@ -9,6 +9,7 @@ | |||
#import "BabyScaleConnectViewController.h" | |||
#import "Masonry.h" | |||
#import <AILinkBleSDK/ELBabyScaleBleManager.h> | |||
#import <AILinkBleSDK/ELBluetoothManager+Settings.h> | |||
@interface BabyScaleConnectViewController ()<ELBluetoothManagerDelegate,BabyScaleBleDelegate> | |||
@property (nonatomic, strong) UITextView *textView; |
@@ -9,6 +9,7 @@ | |||
#import "BloodConnectViewController.h" | |||
#import "Masonry.h" | |||
#import <AILinkBleSDK/ELBloodBleManager.h> | |||
#import <AILinkBleSDK/ELBluetoothManager+Settings.h> | |||
@interface BloodConnectViewController ()<ELBluetoothManagerDelegate,ELBloodBleManagerDelegate> | |||
@property (nonatomic, strong) UITextView *textView; |
@@ -9,6 +9,7 @@ | |||
#import "HeightGuageConnectViewController.h" | |||
#import "Masonry.h" | |||
#import <AILinkBleSDK/ELHeightGaugeBleManager.h> | |||
#import <AILinkBleSDK/ELBluetoothManager+Settings.h> | |||
@interface HeightGuageConnectViewController ()<ELBluetoothManagerDelegate,ELHeightGaugeBleManagerDelegate> | |||
@property (nonatomic, strong) UITextView *textView; |
@@ -9,6 +9,7 @@ | |||
#import "RemoteControlConnectViewController.h" | |||
#import "Masonry.h" | |||
#import <AILinkBleSDK/ELRemoteControlBleManager.h> | |||
#import <AILinkBleSDK/ELBluetoothManager+Settings.h> | |||
@interface RemoteControlConnectViewController ()<ELBluetoothManagerDelegate,ELRemoteControlBleDelegate> | |||
@property (nonatomic, strong) UITextView *textView; |
@@ -9,6 +9,7 @@ | |||
#import "ForeheadConnectViewController.h" | |||
#import "Masonry.h" | |||
#import <AILinkBleSDK/ELForeHeadBleManager.h> | |||
#import <AILinkBleSDK/ELBluetoothManager+Settings.h> | |||
@interface ForeheadConnectViewController ()<ELBluetoothManagerDelegate,ELForeheadBleManagerDelegate> | |||
@property (nonatomic, strong) UITextView *textView; |
@@ -9,6 +9,7 @@ | |||
#import "ThermometerConnectViewController.h" | |||
#import "Masonry.h" | |||
#import <AILinkBleSDK/ELThermometerBleManager.h> | |||
#import <AILinkBleSDK/ELBluetoothManager+Settings.h> | |||
@interface ThermometerConnectViewController ()<ELBluetoothManagerDelegate,ELThermometerBleDelegate> | |||
@property (nonatomic, strong) UITextView *textView; |
@@ -9,6 +9,7 @@ | |||
#import "WheelMonitorConnectViewController.h" | |||
#import "Masonry.h" | |||
#import <AILinkBleSDK/ELWheelMonitorBleManager.h> | |||
#import <AILinkBleSDK/ELBluetoothManager+Settings.h> | |||
@interface WheelMonitorConnectViewController ()<ELBluetoothManagerDelegate,WheelMonitorBleManagerDelegate> | |||
@property (nonatomic, strong) UITextView *textView; |
@@ -12,6 +12,9 @@ | |||
#import <AILinkBleSDK/ELBodyFatScaleBleUserModel.h> | |||
#import <AILinkBleSDK/ELBodyFatScaleBleWeightModel.h> | |||
//#import "WiFiSetupViewController.h" | |||
#import <AILinkBleSDK/ELBluetoothManager+Settings.h> | |||
#import <AILinkBleSDK/ELBleWifiDetailModel.h> | |||
#import <AILinkBleSDK/ELBluetoothManager+BleWifi.h> | |||
@interface BodyFatScaleConnectViewController ()<ELBluetoothManagerDelegate,ELBodyFatScaleBleDelegate,ElBleWifiDelegate> | |||
@property (nonatomic, strong) UITextView *textView; |
@@ -111,7 +111,7 @@ | |||
}else{ | |||
recordModel.weightControl = weightContrlStr; | |||
} | |||
recordModel.fatLevel = [NSString stringWithFormat:@"%lu",(unsigned long)[ELBodyIndexAlgorithmModel getfatLevelWithweight:kgWeight andSatndardWeight:bodyResultTwoLegs.htIdealWeightKg]]; | |||
recordModel.fatLevel = [NSString stringWithFormat:@"%lu",(unsigned long)[ELBodyIndexAlgorithmModel getfatLevelWithweight:kgWeight andStandardWeight:bodyResultTwoLegs.htIdealWeightKg]]; | |||
}else{ | |||
recordModel.standardWeight = @""; | |||
recordModel.weightControl = @""; |
@@ -12,6 +12,7 @@ | |||
#import <AILinkBleSDK/ELEightScaleBleDataModel.h> | |||
#import <AILinkBleSDK/ELEightScaleSDKHeader.h> | |||
#import "ELEightScaleAlgorithmTool.h" | |||
#import <AILinkBleSDK/ELBluetoothManager+Settings.h> | |||
@interface EightScaleConnectionViewController ()<ELBluetoothManagerDelegate,EightScaleBleDeletegate> | |||
@property (nonatomic, strong) UITextView *textView; | |||
@@ -248,7 +249,7 @@ | |||
break; | |||
case EightScaleWeightTypeStable: | |||
{ | |||
[self addLog:[NSString stringWithFormat:@"Stable data weight = %d unit = %@ point = %d adc = %ld",weightStruct.weight,AiLinkBleWeightUnitDic[@(weightStruct.unit)],weightStruct.point,weightStruct.weightType]]; | |||
[self addLog:[NSString stringWithFormat:@"Unstable data weight = %d unit = %@ point = %d adc = %ld",weightStruct.weight,AiLinkBleWeightUnitDic[@(weightStruct.unit)],weightStruct.point,weightStruct.weightType]]; | |||
} | |||
break; | |||
default: |
@@ -11,6 +11,7 @@ | |||
#import "Masonry.h" | |||
#import "ELInputAlertView.h" | |||
#import "ELSelectView.h" | |||
#import <AILinkBleSDK/ELBluetoothManager+BleWifi.h> | |||
static NSString * const authorizeIntervalKey = @"authorizeIntervalKey"; | |||
@@ -59,7 +59,7 @@ | |||
- (void)setIsLink:(BOOL)isLink { | |||
if (isLink) { | |||
self.linkLabel.text = @"已连接"; | |||
self.linkLabel.text = @"Connected"; | |||
} else { | |||
self.linkLabel.text = @""; | |||
} |
@@ -12,6 +12,9 @@ | |||
#import <AILinkBleSDK/ELBodyFatScaleBleUserModel.h> | |||
#import <AILinkBleSDK/ELBodyFatScaleBleWeightModel.h> | |||
#import "ELBfsWifiConnectTableViewCell.h" | |||
#import <AILinkBleSDK/ELBluetoothManager+Settings.h> | |||
#import <AILinkBleSDK/ELBleWifiDetailModel.h> | |||
#import <AILinkBleSDK/ELBluetoothManager+BleWifi.h> | |||
@interface ELBfsWifiConnectVC ()<ELBluetoothManagerDelegate,ELBodyFatScaleBleDelegate,ElBleWifiDelegate,UITextFieldDelegate,UITableViewDelegate,UITableViewDataSource> | |||
@@ -23,7 +23,6 @@ | |||
- (void)viewDidLoad { | |||
[super viewDidLoad]; | |||
// self.title = @"Devices"; | |||
[self.view addSubview:self.tableView]; |
@@ -9,7 +9,7 @@ | |||
#import "OximeterConnectionViewController.h" | |||
#import "Masonry.h" | |||
#import <AILinkBleSDK/ELOximeterBleManager.h> | |||
#import <AILinkBleSDK/ELOximeterDeviceModel.h> | |||
#import <AILinkBleSDK/ELPeripheralModel.h> | |||
#import <AILinkBleSDK/ELOximeterBleModel.h> | |||
@interface OximeterConnectionViewController () <ELOximeterBleDelegate, ELBluetoothManagerDelegate> |
@@ -0,0 +1,20 @@ | |||
// | |||
// CoffeeScaleConnectionViewController.h | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <UIKit/UIKit.h> | |||
@class ELPeripheralModel; | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface CoffeeScaleConnectionViewController : UIViewController | |||
@property (nonatomic, strong) ELPeripheralModel *p; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,177 @@ | |||
// | |||
// CoffeeScaleConnectionViewController.m | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import "CoffeeScaleConnectionViewController.h" | |||
#import "Masonry.h" | |||
#import <AILinkBleSDK/ELCoffeeScaleBleHeader.h> | |||
#import <AILinkBleSDK/ELCoffeeScaleBleManager.h> | |||
@interface CoffeeScaleConnectionViewController () <CoffeeScaleBleDelegate, ELBluetoothManagerDelegate> | |||
@property(nonatomic, strong) UITextView *textView; | |||
@property(nonatomic, copy) NSArray<NSNumber *> *units; | |||
@property(nonatomic, strong) UIButton *connectButton; | |||
@end | |||
@implementation CoffeeScaleConnectionViewController | |||
- (void)viewDidLoad { | |||
[super viewDidLoad]; | |||
// Do any additional setup after loading the view. | |||
self.view.backgroundColor = [UIColor whiteColor]; | |||
[ELCoffeeScaleBleManager shareManager].coffeeScaleDelegate = self; | |||
[ELCoffeeScaleBleManager shareManager].delegate = self; | |||
[[ELCoffeeScaleBleManager shareManager] connectPeripheral:self.p]; | |||
[self setupUIView]; | |||
} | |||
- (void)viewWillDisappear:(BOOL)animated { | |||
[[ELCoffeeScaleBleManager shareManager] disconnectPeripheral]; | |||
} | |||
- (void)addLog:(NSString *)log { | |||
self.textView.text = [NSString stringWithFormat:@"%@\n\n%@", log, self.textView.text]; | |||
} | |||
- (void)connectDevice { | |||
[[ELCoffeeScaleBleManager shareManager] startScan]; | |||
} | |||
- (void)setupUIView { | |||
self.connectButton = [[UIButton alloc] initWithFrame:CGRectMake((self.view.frame.size.width - 100) / 2, 88, 100, 40)]; | |||
[self.connectButton setTitle:@"点击重连" forState:UIControlStateNormal]; | |||
[self.connectButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; | |||
[self.view addSubview:self.connectButton]; | |||
[self.connectButton addTarget:self action:@selector(connectDevice) forControlEvents:UIControlEventTouchUpInside]; | |||
self.connectButton.hidden = YES; | |||
self.textView = [[UITextView alloc] init]; | |||
self.textView.backgroundColor = [UIColor blackColor]; | |||
self.textView.text = @"Log"; | |||
self.textView.textColor = [UIColor redColor]; | |||
[self.view addSubview:self.textView]; | |||
[self.textView mas_makeConstraints:^(MASConstraintMaker *make) { | |||
make.left.mas_equalTo(10); | |||
make.right.mas_equalTo(-10); | |||
make.bottom.offset(-44); | |||
// make.height.mas_equalTo(350); | |||
make.top.offset(150); | |||
}]; | |||
} | |||
#pragma mark - ble Delegate | |||
/// 蓝牙连接状态 | |||
/// @param state 连接状态 | |||
- (void)deviceBleReceiveState:(ELBluetoothState)state { | |||
switch (state) { | |||
case ELBluetoothStateUnavailable: { | |||
self.title = @"Please open the bluetooth"; | |||
} | |||
break; | |||
case ELBluetoothStateAvailable: { | |||
self.title = @"Bluetooth is open"; | |||
} | |||
break; | |||
case ELBluetoothStateScaning: { | |||
self.title = @"Scanning"; | |||
} | |||
break; | |||
case ELBluetoothStateConnectFail: { | |||
self.title = @"Connect fail"; | |||
} | |||
break; | |||
case ELBluetoothStateDidDisconnect: { | |||
self.title = @"Disconnected"; | |||
self.connectButton.hidden = NO; | |||
} | |||
break; | |||
case ELBluetoothStateDidValidationPass: { | |||
self.connectButton.hidden = YES; | |||
self.title = @"Connected"; | |||
//连接成功,获取单位 | |||
[[ELCoffeeScaleBleManager shareManager] getBluetoothInfoWithELInetGetCmdType:ELInetGetCmdTypeReadDeviceSupportUnit]; | |||
//获取版本号 | |||
[[ELCoffeeScaleBleManager shareManager] getBluetoothInfoWithELInetGetCmdType:ELInetGetCmdTypeGetBMVersion]; | |||
//同步时间到设备 | |||
[[ELCoffeeScaleBleManager shareManager] syncMCUNowDate]; | |||
//切换到app 冲煮 模式 | |||
[[ELCoffeeScaleBleManager shareManager] sendSwithAppMode:YES subMode:0]; | |||
[self addLog:@"切换到app 冲煮 模式"]; | |||
//切换到app 称重 模式 | |||
// [[ELCoffeeScaleBleManager shareManager] sendSwithAppMode:YES subMode:1]; | |||
// [self addLog:@"切换到app 称重 模式"]; | |||
} | |||
break; | |||
case ELBluetoothStateFailedValidation: { | |||
self.title = @"Illegal equipment"; | |||
} | |||
break; | |||
case ELBluetoothStateWillConnect: | |||
self.title = @"Connecting"; | |||
break; | |||
default: | |||
break; | |||
} | |||
} | |||
/// 附近的设备 | |||
/// @param devices 设备列表 | |||
- (void)deviceBleReceiveDevices:(NSArray<ELPeripheralModel *> *)devices { | |||
for (ELPeripheralModel *model in devices) { | |||
if ([model.macAddress isEqualToString:self.p.macAddress]) { | |||
[[ELCoffeeScaleBleManager shareManager] connectPeripheral:model]; | |||
} | |||
} | |||
} | |||
//获得支持单位列表 | |||
- (void)supportWeightUnits:(NSArray *_Nullable)weightArray { | |||
NSLog(@"weightArray: %@", weightArray); | |||
[self addLog:@"获得支持单位列表"]; | |||
} | |||
//正在连接中倒计时 | |||
- (void)deviceBleCountDown:(NSInteger)count { | |||
NSLog(@"count: %@", @(count)); | |||
[self addLog:@"正在连接中倒计时"]; | |||
} | |||
/** 返回咖啡秤称量的数据模型 */ | |||
- (void)coffeeScaleBleReceiveStatusDataModel:(ELCoffeeScaleBleDataModel *_Nonnull)model { | |||
NSLog(@"model.weightString: %@", model.weightString); | |||
[self addLog:[@"当前重量: " stringByAppendingFormat:@"%@", model.weightString]]; | |||
} | |||
/** 返回设备电量 */ | |||
- (void)coffeeScaleBleRechargeState:(CoffeeChargingType)type powerNumber:(NSInteger)power { | |||
NSLog(@"coffeeScaleBleRechargeState() type: %@ power: %@", @(type), @(power)); | |||
[self addLog:[@"设备电量: " stringByAppendingFormat:@"type: %@ power: %@", @(type), @(power)]]; | |||
} | |||
// 计时功能控制 | |||
- (void)coffeeScaleBleReceiveTimerControl:(BOOL)countdown duration:(NSUInteger)duration control:(ELCoffeeScaleTimerControl)control { | |||
NSLog(@"coffeeScaleBleReceiveTimerControl() countdown: %@ duration: %@ control: %@", @(countdown), @(duration), @(control)); | |||
[self addLog:[@"计时功能: " stringByAppendingFormat:@"countdown: %@ duration: %@ control: %@", @(countdown), @(duration), @(control)]]; | |||
} | |||
@end |
@@ -0,0 +1,17 @@ | |||
// | |||
// CoffeeScaleScanViewController.h | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <UIKit/UIKit.h> | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface CoffeeScaleScanViewController : UIViewController | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,92 @@ | |||
// | |||
// CoffeeScaleScanViewController.m | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import "CoffeeScaleScanViewController.h" | |||
#import <AILinkBleSDK/ELCoffeeScaleBleManager.h> | |||
#import "Masonry.h" | |||
#import "CoffeeScaleConnectionViewController.h" | |||
@interface CoffeeScaleScanViewController () <UITableViewDelegate, UITableViewDataSource, CoffeeScaleBleDelegate> | |||
@property(nonatomic, strong) UITableView *tableView; | |||
@property(nonatomic, strong) NSArray<ELPeripheralModel *> *devices; | |||
@end | |||
@implementation CoffeeScaleScanViewController | |||
- (void)viewDidLoad { | |||
[super viewDidLoad]; | |||
// Do any additional setup after loading the view. | |||
[self.view addSubview:self.tableView]; | |||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { | |||
make.top.left.right.bottom.mas_equalTo(0); | |||
}]; | |||
} | |||
- (void)viewWillAppear:(BOOL)animated { | |||
[[ELCoffeeScaleBleManager shareManager] startScan]; | |||
[ELCoffeeScaleBleManager shareManager].coffeeScaleDelegate = self; | |||
} | |||
- (void)viewWillDisappear:(BOOL)animated { | |||
[[ELCoffeeScaleBleManager shareManager] stopScan]; | |||
} | |||
#pragma mark - CoffeeScaleBleDelegate | |||
- (void)deviceBleReceiveState:(ELBluetoothState)state { | |||
NSLog(@"deviceBleReceiveState = %ld", state); | |||
} | |||
- (void)deviceBleReceiveDevices:(NSArray<ELPeripheralModel *> *)devices { | |||
self.devices = devices; | |||
[self.tableView reloadData]; | |||
} | |||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | |||
return self.devices.count; | |||
} | |||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { | |||
return 60; | |||
} | |||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |||
static NSString *cellId = @"cellid"; | |||
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId]; | |||
if (!cell) { | |||
cell = [[UITableViewCell alloc] initWithStyle:(UITableViewCellStyleDefault) reuseIdentifier:cellId]; | |||
} | |||
ELPeripheralModel *p = self.devices[indexPath.row]; | |||
cell.textLabel.text = [NSString stringWithFormat:@"Name:%@---Mac:%@\nCID:%ld---VID:%ld---PID:%ld", p.peripheral.name, p.macAddress, p.deviceType, p.vendorID, p.productID]; | |||
cell.textLabel.numberOfLines = 2; | |||
cell.textLabel.textColor = [UIColor blackColor]; | |||
return cell; | |||
} | |||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { | |||
ELPeripheralModel *p = self.devices[indexPath.row]; | |||
CoffeeScaleConnectionViewController *vc = [[CoffeeScaleConnectionViewController alloc] init]; | |||
vc.p = p; | |||
[self.navigationController pushViewController:vc animated:YES]; | |||
} | |||
- (UITableView *)tableView { | |||
if (_tableView == nil) { | |||
_tableView = [[UITableView alloc] init]; | |||
_tableView.delegate = self; | |||
_tableView.dataSource = self; | |||
} | |||
return _tableView; | |||
} | |||
@end |
@@ -0,0 +1,20 @@ | |||
// | |||
// FoodThermometerConnectionViewController.h | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <UIKit/UIKit.h> | |||
@class ELPeripheralModel; | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface FoodThermometerConnectionViewController : UIViewController | |||
@property (nonatomic, strong) ELPeripheralModel *p; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,152 @@ | |||
// | |||
// FoodThermometerConnectionViewController.m | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import "FoodThermometerConnectionViewController.h" | |||
#import "Masonry.h" | |||
#import <AILinkBleSDK/ELFoodThermometerHead.h> | |||
#import <AILinkBleSDK/ELFoodThermometerBleManager.h> | |||
@interface FoodThermometerConnectionViewController () <FoodThermometerBleDelegate, ELBluetoothManagerDelegate> | |||
@property(nonatomic, strong) UITextView *textView; | |||
@property(nonatomic, copy) NSArray<NSNumber *> *units; | |||
@property(nonatomic, strong) UIButton *connectButton; | |||
@end | |||
@implementation FoodThermometerConnectionViewController | |||
- (void)viewDidLoad { | |||
[super viewDidLoad]; | |||
// Do any additional setup after loading the view. | |||
self.view.backgroundColor = [UIColor whiteColor]; | |||
[ELFoodThermometerBleManager shareManager].foodThermometerBleDelegate = self; | |||
[ELFoodThermometerBleManager shareManager].delegate = self; | |||
[[ELFoodThermometerBleManager shareManager] connectPeripheral:self.p]; | |||
[self setupUIView]; | |||
} | |||
- (void)viewWillDisappear:(BOOL)animated { | |||
[[ELFoodThermometerBleManager shareManager] disconnectPeripheral]; | |||
} | |||
- (void)addLog:(NSString *)log { | |||
self.textView.text = [NSString stringWithFormat:@"%@\n\n%@", log, self.textView.text]; | |||
} | |||
- (void)connectDevice { | |||
[[ELFoodThermometerBleManager shareManager] startScan]; | |||
} | |||
- (void)setupUIView { | |||
self.connectButton = [[UIButton alloc] initWithFrame:CGRectMake((self.view.frame.size.width - 100) / 2, 88, 100, 40)]; | |||
[self.connectButton setTitle:@"点击重连" forState:UIControlStateNormal]; | |||
[self.connectButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; | |||
[self.view addSubview:self.connectButton]; | |||
[self.connectButton addTarget:self action:@selector(connectDevice) forControlEvents:UIControlEventTouchUpInside]; | |||
self.connectButton.hidden = YES; | |||
self.textView = [[UITextView alloc] init]; | |||
self.textView.backgroundColor = [UIColor blackColor]; | |||
self.textView.text = @"Log"; | |||
self.textView.textColor = [UIColor redColor]; | |||
[self.view addSubview:self.textView]; | |||
[self.textView mas_makeConstraints:^(MASConstraintMaker *make) { | |||
make.left.mas_equalTo(10); | |||
make.right.mas_equalTo(-10); | |||
make.bottom.offset(-44); | |||
// make.height.mas_equalTo(350); | |||
make.top.offset(150); | |||
}]; | |||
} | |||
#pragma mark - ble Delegate | |||
- (void)deviceBleReceiveState:(ELBluetoothState)state { | |||
switch (state) { | |||
case ELBluetoothStateUnavailable: { | |||
self.title = @"Please open the bluetooth"; | |||
} | |||
break; | |||
case ELBluetoothStateAvailable: { | |||
self.title = @"Bluetooth is open"; | |||
} | |||
break; | |||
case ELBluetoothStateScaning: { | |||
self.title = @"Scaning"; | |||
} | |||
break; | |||
case ELBluetoothStateConnectFail: { | |||
self.title = @"Connect fail"; | |||
} | |||
break; | |||
case ELBluetoothStateDidDisconnect: { | |||
self.title = @"Disconnected"; | |||
self.connectButton.hidden = NO; | |||
} | |||
break; | |||
case ELBluetoothStateDidValidationPass: { | |||
self.connectButton.hidden = YES; | |||
self.title = @"Connected"; | |||
//连接成功,获取单位 | |||
[[ELFoodThermometerBleManager shareManager] getBluetoothInfoWithELInetGetCmdType:ELInetGetCmdTypeReadDeviceSupportUnit]; | |||
//获取版本号 | |||
[[ELFoodThermometerBleManager shareManager] getBluetoothInfoWithELInetGetCmdType:ELInetGetCmdTypeGetBMVersion]; | |||
//同步时间到设备 | |||
[[ELFoodThermometerBleManager shareManager] syncMCUNowDate]; | |||
//查询设备状态 | |||
[[ELFoodThermometerBleManager shareManager] checkDeviceInfo]; | |||
} | |||
break; | |||
case ELBluetoothStateFailedValidation: { | |||
self.title = @"Illegal equipment"; | |||
} | |||
break; | |||
case ELBluetoothStateWillConnect: | |||
self.title = @"Connecting"; | |||
break; | |||
default: | |||
break; | |||
} | |||
} | |||
- (void)deviceBleReceiveDevices:(NSArray<ELPeripheralModel *> *)devices { | |||
for (ELPeripheralModel *model in devices) { | |||
if ([model.macAddress isEqualToString:self.p.macAddress]) { | |||
[[ELFoodThermometerBleManager shareManager] connectPeripheral:model]; | |||
} | |||
} | |||
} | |||
//设备返回基础信息 | |||
- (void)foodThermometerBasicInfo:(BasicInfo)basicInfo { | |||
NSLog(@"foodThermometerBasicInfo() basicInfo.batteryLevel:%@ basicInfo.charging:%@", @(basicInfo.batteryLevel), @(basicInfo.charging)); | |||
[self addLog:[@"设备返回基础信息" stringByAppendingFormat:@"basicInfo.batteryLevel:%@ basicInfo.charging:%@", @(basicInfo.batteryLevel), @(basicInfo.charging)]]; | |||
} | |||
//设备返回数据状态 | |||
- (void)foodThermometerProbeStatus:(ProbeStatus)probeStatus { | |||
NSLog(@"foodThermometerProbeStatus() probeStatus.index:%@ probeStatus.internalTemperature:%@", @(probeStatus.index), @(probeStatus.internalRawTemperature)); | |||
[self addLog:[@"设备返回数据状态" stringByAppendingFormat:@"probeStatus.index:%@ probeStatus.internalTemperature:%@", @(probeStatus.index), @(probeStatus.internalRawTemperature)]]; | |||
} | |||
//设备设置温度 | |||
- (void)foodThermometerSwitchTemperatureUnit:(ELDeviceTemperatureUnit)unit { | |||
NSLog(@"foodThermometerSwitchTemperatureUnit() unit: %@", @(unit)); | |||
[self addLog:[@"设备设置温度" stringByAppendingFormat:@"unit: %@", @(unit)]]; | |||
} | |||
@end |
@@ -0,0 +1,17 @@ | |||
// | |||
// FoodThermometerScanViewController.h | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <UIKit/UIKit.h> | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface FoodThermometerScanViewController : UIViewController | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,93 @@ | |||
// | |||
// FoodThermometerScanViewController.m | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import "FoodThermometerScanViewController.h" | |||
#import <AILinkBleSDK/ELFoodThermometerBleManager.h> | |||
#import "Masonry.h" | |||
#import "FoodThermometerConnectionViewController.h" | |||
@interface FoodThermometerScanViewController () <UITableViewDelegate, UITableViewDataSource, FoodThermometerBleDelegate> | |||
@property(nonatomic, strong) UITableView *tableView; | |||
@property(nonatomic, strong) NSArray<ELPeripheralModel *> *devices; | |||
@end | |||
@implementation FoodThermometerScanViewController | |||
- (void)viewDidLoad { | |||
[super viewDidLoad]; | |||
// Do any additional setup after loading the view. | |||
[self.view addSubview:self.tableView]; | |||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { | |||
make.top.left.right.bottom.mas_equalTo(0); | |||
}]; | |||
} | |||
- (void)viewWillAppear:(BOOL)animated { | |||
[[ELFoodThermometerBleManager shareManager] startScan]; | |||
[ELFoodThermometerBleManager shareManager].foodThermometerBleDelegate = self; | |||
} | |||
- (void)viewWillDisappear:(BOOL)animated { | |||
[[ELFoodThermometerBleManager shareManager] stopScan]; | |||
} | |||
#pragma mark - BloodSugarBleDelegate | |||
- (void)deviceBleReceiveState:(ELBluetoothState)state { | |||
NSLog(@"deviceBleReceiveState = %ld", state); | |||
} | |||
- (void)deviceBleReceiveDevices:(NSArray<ELPeripheralModel *> *)devices { | |||
self.devices = devices; | |||
[self.tableView reloadData]; | |||
} | |||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | |||
return self.devices.count; | |||
} | |||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { | |||
return 60; | |||
} | |||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |||
static NSString *cellId = @"cellid"; | |||
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId]; | |||
if (!cell) { | |||
cell = [[UITableViewCell alloc] initWithStyle:(UITableViewCellStyleDefault) reuseIdentifier:cellId]; | |||
} | |||
ELPeripheralModel *p = self.devices[indexPath.row]; | |||
cell.textLabel.text = [NSString stringWithFormat:@"Name:%@---Mac:%@\nCID:%ld---VID:%ld---PID:%ld", p.deviceName, p.macAddress, p.deviceType, p.vendorID, p.productID]; | |||
cell.textLabel.numberOfLines = 2; | |||
cell.textLabel.textColor = [UIColor blackColor]; | |||
return cell; | |||
} | |||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { | |||
ELPeripheralModel *p = self.devices[indexPath.row]; | |||
FoodThermometerConnectionViewController *vc = [[FoodThermometerConnectionViewController alloc] init]; | |||
vc.p = p; | |||
[self.navigationController pushViewController:vc animated:YES]; | |||
} | |||
- (UITableView *)tableView { | |||
if (_tableView == nil) { | |||
_tableView = [[UITableView alloc] init]; | |||
_tableView.delegate = self; | |||
_tableView.dataSource = self; | |||
} | |||
return _tableView; | |||
} | |||
@end |
@@ -0,0 +1,17 @@ | |||
// | |||
// BroadcastNutritionScaleViewController.h | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/14. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <UIKit/UIKit.h> | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface BroadcastNutritionScaleViewController : UIViewController | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,88 @@ | |||
// | |||
// BroadcastNutritionScaleViewController.m | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/14. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import "BroadcastNutritionScaleViewController.h" | |||
#import <AILinkBleSDK/ELBroadcastNutritionFoodScaleBleManager.h> | |||
#import <AILinkBleSDK/ELBroadcastNutritionFoodScaleDataModel.h> | |||
#import "Masonry.h" | |||
@interface BroadcastNutritionScaleViewController () <BroadcastNutritionFoodScaleBleDelegate> | |||
@property(nonatomic, strong) UITextView *textView; | |||
@property(nonatomic, strong) UILabel *statusLbl; | |||
@end | |||
@implementation BroadcastNutritionScaleViewController | |||
- (void)viewDidLoad { | |||
[super viewDidLoad]; | |||
self.view.backgroundColor = [UIColor whiteColor]; | |||
[ELBroadcastNutritionFoodScaleBleManager shareManager].broadcastNutritionFoodScaleBleDelegate = self; | |||
[[ELBroadcastNutritionFoodScaleBleManager shareManager] startScan]; | |||
[self setupUI]; | |||
} | |||
- (void)broadcastNutritionFoodScaleBleDataModel:(ELBroadcastNutritionFoodScaleDataModel *_Nonnull)model { | |||
static Byte serialNumber = 0xFF; | |||
if (serialNumber == model.serialNumber) { | |||
return; | |||
} | |||
serialNumber = model.serialNumber; | |||
NSString *testData = [NSString stringWithFormat:@"MAC:%@ cid:%d vid:%d pid:%d weight:%@ weightPoint:%@ weightUnit:%@ sn:%d", | |||
model.mac, model.cid - 65535, model.vid, model.pid, @(model.weight), @(model.weightPoint), @(model.weightUnit), model.serialNumber]; | |||
[self addLog:testData]; | |||
} | |||
- (void)broadcastNutritionFoodScaleBleUpdateState:(ELBluetoothState)state { | |||
if (state == ELBluetoothStateAvailable) { | |||
self.statusLbl.text = @"Connecting"; | |||
} else if (state == ELBluetoothStateUnavailable) { | |||
self.statusLbl.text = @"Bluetooth is disconnected"; | |||
} | |||
} | |||
- (void)addLog:(NSString *)log { | |||
self.textView.text = [NSString stringWithFormat:@"%@\n%@", log, self.textView.text]; | |||
} | |||
- (void)setupUI { | |||
self.textView = [[UITextView alloc] init]; | |||
self.textView.backgroundColor = [UIColor blackColor]; | |||
self.textView.text = @"Log"; | |||
self.textView.textColor = [UIColor redColor]; | |||
[self.view addSubview:self.textView]; | |||
[self.textView mas_makeConstraints:^(MASConstraintMaker *make) { | |||
make.left.mas_equalTo(10); | |||
make.right.bottom.mas_equalTo(-10); | |||
make.height.equalTo(self.view).multipliedBy(0.7); | |||
}]; | |||
// | |||
self.statusLbl = [[UILabel alloc] init]; | |||
self.statusLbl.text = @"Connecting"; | |||
self.statusLbl.adjustsFontSizeToFitWidth = YES; | |||
self.statusLbl.font = [UIFont boldSystemFontOfSize:30]; | |||
self.statusLbl.textColor = [UIColor redColor]; | |||
self.statusLbl.textAlignment = NSTextAlignmentCenter; | |||
[self.view addSubview:self.statusLbl]; | |||
[self.statusLbl mas_makeConstraints:^(MASConstraintMaker *make) { | |||
make.height.mas_equalTo(40); | |||
make.left.right.equalTo(self.textView); | |||
make.bottom.equalTo(self.textView.mas_top).mas_offset(-20); | |||
}]; | |||
} | |||
- (void)dealloc { | |||
[[ELBroadcastNutritionFoodScaleBleManager shareManager] stopScan]; | |||
} | |||
@end |
@@ -0,0 +1,20 @@ | |||
// | |||
// NutritionScaleConnectionViewController.h | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <UIKit/UIKit.h> | |||
@class ELPeripheralModel; | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface NutritionScaleConnectionViewController : UIViewController | |||
@property (nonatomic, strong) ELPeripheralModel *p; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,159 @@ | |||
// | |||
// NutritionScaleConnectionViewController.m | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import "NutritionScaleConnectionViewController.h" | |||
#import "Masonry.h" | |||
#import <AILinkBleSDK/ELNutritionScaleBleHeader.h> | |||
#import <AILinkBleSDK/ELNutritionScaleBleManager.h> | |||
@interface NutritionScaleConnectionViewController () <NutritionScaleBleDelegate, ELBluetoothManagerDelegate> | |||
@property(nonatomic, strong) UITextView *textView; | |||
@property(nonatomic, copy) NSArray<NSNumber *> *units; | |||
@property(nonatomic, strong) UIButton *connectButton; | |||
@end | |||
@implementation NutritionScaleConnectionViewController | |||
- (void)viewDidLoad { | |||
[super viewDidLoad]; | |||
// Do any additional setup after loading the view. | |||
self.view.backgroundColor = [UIColor whiteColor]; | |||
[ELNutritionScaleBleManager shareManager].nutritionScaleBleDelegate = self; | |||
[ELNutritionScaleBleManager shareManager].delegate = self; | |||
[[ELNutritionScaleBleManager shareManager] connectPeripheral:self.p]; | |||
[self setupUIView]; | |||
} | |||
- (void)viewWillDisappear:(BOOL)animated { | |||
[[ELNutritionScaleBleManager shareManager] disconnectPeripheral]; | |||
} | |||
- (void)addLog:(NSString *)log { | |||
self.textView.text = [NSString stringWithFormat:@"%@\n\n%@", log, self.textView.text]; | |||
} | |||
- (void)connectDevice { | |||
[[ELNutritionScaleBleManager shareManager] startScan]; | |||
} | |||
- (void)setupUIView { | |||
self.connectButton = [[UIButton alloc] initWithFrame:CGRectMake((self.view.frame.size.width - 100) / 2, 88, 100, 40)]; | |||
[self.connectButton setTitle:@"点击重连" forState:UIControlStateNormal]; | |||
[self.connectButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; | |||
[self.view addSubview:self.connectButton]; | |||
[self.connectButton addTarget:self action:@selector(connectDevice) forControlEvents:UIControlEventTouchUpInside]; | |||
self.connectButton.hidden = YES; | |||
self.textView = [[UITextView alloc] init]; | |||
self.textView.backgroundColor = [UIColor blackColor]; | |||
self.textView.text = @"Log"; | |||
self.textView.textColor = [UIColor redColor]; | |||
[self.view addSubview:self.textView]; | |||
[self.textView mas_makeConstraints:^(MASConstraintMaker *make) { | |||
make.left.mas_equalTo(10); | |||
make.right.mas_equalTo(-10); | |||
make.bottom.offset(-44); | |||
// make.height.mas_equalTo(350); | |||
make.top.offset(150); | |||
}]; | |||
} | |||
#pragma mark - ble Delegate | |||
/// 蓝牙连接状态 | |||
/// @param state 连接状态 | |||
- (void)deviceBleReceiveState:(ELBluetoothState)state { | |||
switch (state) { | |||
case ELBluetoothStateUnavailable: { | |||
self.title = @"Please open the bluetooth"; | |||
} | |||
break; | |||
case ELBluetoothStateAvailable: { | |||
self.title = @"Bluetooth is open"; | |||
} | |||
break; | |||
case ELBluetoothStateScaning: { | |||
self.title = @"Scanning"; | |||
} | |||
break; | |||
case ELBluetoothStateConnectFail: { | |||
self.title = @"Connect fail"; | |||
} | |||
break; | |||
case ELBluetoothStateDidDisconnect: { | |||
self.title = @"Disconnected"; | |||
self.connectButton.hidden = NO; | |||
} | |||
break; | |||
case ELBluetoothStateDidValidationPass: { | |||
self.connectButton.hidden = YES; | |||
self.title = @"Connected"; | |||
//连接成功,获取单位 | |||
[[ELNutritionScaleBleManager shareManager] getBluetoothInfoWithELInetGetCmdType:ELInetGetCmdTypeReadDeviceSupportUnit]; | |||
//获取版本号 | |||
[[ELNutritionScaleBleManager shareManager] getBluetoothInfoWithELInetGetCmdType:ELInetGetCmdTypeGetBMVersion]; | |||
//同步时间到设备 | |||
[[ELNutritionScaleBleManager shareManager] syncMCUNowDate]; | |||
} | |||
break; | |||
case ELBluetoothStateFailedValidation: { | |||
self.title = @"Illegal equipment"; | |||
} | |||
break; | |||
case ELBluetoothStateWillConnect: | |||
self.title = @"Connecting"; | |||
break; | |||
default: | |||
break; | |||
} | |||
} | |||
/// 附近的设备 | |||
/// @param devices 设备列表 | |||
- (void)deviceBleReceiveDevices:(NSArray<ELPeripheralModel *> *)devices { | |||
for (ELPeripheralModel *model in devices) { | |||
if ([model.macAddress isEqualToString:self.p.macAddress]) { | |||
[[ELNutritionScaleBleManager shareManager] connectPeripheral:model]; | |||
} | |||
} | |||
} | |||
//获得支持单位列表 | |||
- (void)supportWeightUnits:(NSArray *_Nullable)weightArray { | |||
NSLog(@"weightArray: %@", weightArray); | |||
[self addLog:@"获得支持单位列表"]; | |||
} | |||
//称重数据 | |||
- (void)nutritionScaleBleDataModel:(ELNutritionScaleDataModel *_Nonnull)model { | |||
NSLog(@"%s model:%@", __FUNCTION__, model); | |||
NSString *testData = [NSString stringWithFormat:@"weight:%@ weightPoint:%@ weightUnit:%@ sn:%d", @(model.weight), @(model.weightPoint), @(model.weightUnit), model.serialNumber]; | |||
[self addLog:testData]; | |||
} | |||
//超载 | |||
- (void)overload:(BOOL)status { | |||
[self addLog:[NSString stringWithFormat:@"超载: %d", status]]; | |||
} | |||
//低电 | |||
- (void)lowPower:(BOOL)status { | |||
[self addLog:[NSString stringWithFormat:@"低电: %d", status]]; | |||
} | |||
@end |
@@ -0,0 +1,17 @@ | |||
// | |||
// NutritionScaleScanViewController.h | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <UIKit/UIKit.h> | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface NutritionScaleScanViewController : UIViewController | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,93 @@ | |||
// | |||
// NutritionScaleScanViewController.m | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import "NutritionScaleScanViewController.h" | |||
#import <AILinkBleSDK/ELNutritionScaleBleManager.h> | |||
#import "Masonry.h" | |||
#import "NutritionScaleConnectionViewController.h" | |||
@interface NutritionScaleScanViewController () <UITableViewDelegate, UITableViewDataSource, NutritionScaleBleDelegate> | |||
@property(nonatomic, strong) UITableView *tableView; | |||
@property(nonatomic, strong) NSArray<ELPeripheralModel *> *devices; | |||
@end | |||
@implementation NutritionScaleScanViewController | |||
- (void)viewDidLoad { | |||
[super viewDidLoad]; | |||
// Do any additional setup after loading the view. | |||
[self.view addSubview:self.tableView]; | |||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { | |||
make.top.left.right.bottom.mas_equalTo(0); | |||
}]; | |||
} | |||
- (void)viewWillAppear:(BOOL)animated { | |||
[[ELNutritionScaleBleManager shareManager] startScan]; | |||
[ELNutritionScaleBleManager shareManager].nutritionScaleBleDelegate = self; | |||
} | |||
- (void)viewWillDisappear:(BOOL)animated { | |||
[[ELNutritionScaleBleManager shareManager] stopScan]; | |||
} | |||
#pragma mark - BloodSugarBleDelegate | |||
- (void)deviceBleReceiveState:(ELBluetoothState)state { | |||
NSLog(@"deviceBleReceiveState = %ld", state); | |||
} | |||
- (void)deviceBleReceiveDevices:(NSArray<ELPeripheralModel *> *)devices { | |||
self.devices = devices; | |||
[self.tableView reloadData]; | |||
} | |||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | |||
return self.devices.count; | |||
} | |||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { | |||
return 60; | |||
} | |||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |||
static NSString *cellId = @"cellid"; | |||
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId]; | |||
if (!cell) { | |||
cell = [[UITableViewCell alloc] initWithStyle:(UITableViewCellStyleDefault) reuseIdentifier:cellId]; | |||
} | |||
ELPeripheralModel *p = self.devices[indexPath.row]; | |||
cell.textLabel.text = [NSString stringWithFormat:@"Name:%@---Mac:%@\nCID:%ld---VID:%ld---PID:%ld", p.deviceName, p.macAddress, p.deviceType, p.vendorID, p.productID]; | |||
cell.textLabel.numberOfLines = 2; | |||
cell.textLabel.textColor = [UIColor blackColor]; | |||
return cell; | |||
} | |||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { | |||
ELPeripheralModel *p = self.devices[indexPath.row]; | |||
NutritionScaleConnectionViewController *vc = [[NutritionScaleConnectionViewController alloc] init]; | |||
vc.p = p; | |||
[self.navigationController pushViewController:vc animated:YES]; | |||
} | |||
- (UITableView *)tableView { | |||
if (_tableView == nil) { | |||
_tableView = [[UITableView alloc] init]; | |||
_tableView.delegate = self; | |||
_tableView.dataSource = self; | |||
} | |||
return _tableView; | |||
} | |||
@end |
@@ -0,0 +1,20 @@ | |||
// | |||
// AiFreshNutritionScaleConnectionViewController.h | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <UIKit/UIKit.h> | |||
@class ELPeripheralModel; | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface AiFreshNutritionScaleConnectionViewController : UIViewController | |||
@property (nonatomic, strong) ELPeripheralModel *p; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,164 @@ | |||
// | |||
// AiFreshNutritionScaleConnectionViewController.m | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import "AiFreshNutritionScaleConnectionViewController.h" | |||
#import "Masonry.h" | |||
#import <AILinkBleSDK/ELAiFreshNutritionScaleBleHeader.h> | |||
#import <AILinkBleSDK/ELAiFreshNutritionScaleBleManager.h> | |||
@interface AiFreshNutritionScaleConnectionViewController () <AiFreshNutritionScaleBleDelegate, ELBluetoothManagerDelegate> | |||
@property(nonatomic, strong) UITextView *textView; | |||
@property(nonatomic, copy) NSArray<NSNumber *> *units; | |||
@property(nonatomic, strong) UIButton *connectButton; | |||
@end | |||
@implementation AiFreshNutritionScaleConnectionViewController | |||
- (void)viewDidLoad { | |||
[super viewDidLoad]; | |||
// Do any additional setup after loading the view. | |||
self.view.backgroundColor = [UIColor whiteColor]; | |||
[ELAiFreshNutritionScaleBleManager shareManager].nutritionScaleBleDelegate = self; | |||
[ELAiFreshNutritionScaleBleManager shareManager].delegate = self; | |||
[[ELAiFreshNutritionScaleBleManager shareManager] connectPeripheral:self.p]; | |||
[self setupUIView]; | |||
} | |||
- (void)viewWillDisappear:(BOOL)animated { | |||
[[ELAiFreshNutritionScaleBleManager shareManager] disconnectPeripheral]; | |||
} | |||
- (void)addLog:(NSString *)log { | |||
self.textView.text = [NSString stringWithFormat:@"%@\n\n%@", log, self.textView.text]; | |||
} | |||
- (void)connectDevice { | |||
[[ELAiFreshNutritionScaleBleManager shareManager] startScan]; | |||
} | |||
- (void)setupUIView { | |||
self.connectButton = [[UIButton alloc] initWithFrame:CGRectMake((self.view.frame.size.width - 100) / 2, 88, 100, 40)]; | |||
[self.connectButton setTitle:@"点击重连" forState:UIControlStateNormal]; | |||
[self.connectButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; | |||
[self.view addSubview:self.connectButton]; | |||
[self.connectButton addTarget:self action:@selector(connectDevice) forControlEvents:UIControlEventTouchUpInside]; | |||
self.connectButton.hidden = YES; | |||
self.textView = [[UITextView alloc] init]; | |||
self.textView.backgroundColor = [UIColor blackColor]; | |||
self.textView.text = @"Log"; | |||
self.textView.textColor = [UIColor redColor]; | |||
[self.view addSubview:self.textView]; | |||
[self.textView mas_makeConstraints:^(MASConstraintMaker *make) { | |||
make.left.mas_equalTo(10); | |||
make.right.mas_equalTo(-10); | |||
make.bottom.offset(-44); | |||
// make.height.mas_equalTo(350); | |||
make.top.offset(150); | |||
}]; | |||
} | |||
#pragma mark - ble Delegate | |||
/// 蓝牙连接状态 | |||
/// @param state 连接状态 | |||
- (void)deviceBleReceiveState:(ELBluetoothState)state { | |||
switch (state) { | |||
case ELBluetoothStateUnavailable: { | |||
self.title = @"Please open the bluetooth"; | |||
} | |||
break; | |||
case ELBluetoothStateAvailable: { | |||
self.title = @"Bluetooth is open"; | |||
} | |||
break; | |||
case ELBluetoothStateScaning: { | |||
self.title = @"Scanning"; | |||
} | |||
break; | |||
case ELBluetoothStateConnectFail: { | |||
self.title = @"Connect fail"; | |||
} | |||
break; | |||
case ELBluetoothStateDidDisconnect: { | |||
self.title = @"Disconnected"; | |||
self.connectButton.hidden = NO; | |||
} | |||
break; | |||
case ELBluetoothStateDidValidationPass: { | |||
self.connectButton.hidden = YES; | |||
self.title = @"Connected"; | |||
//连接成功,获取单位 | |||
[[ELAiFreshNutritionScaleBleManager shareManager] sendRequestUnitSupported]; | |||
} | |||
break; | |||
case ELBluetoothStateFailedValidation: { | |||
self.title = @"Illegal equipment"; | |||
} | |||
break; | |||
case ELBluetoothStateWillConnect: | |||
self.title = @"Connecting"; | |||
break; | |||
default: | |||
break; | |||
} | |||
} | |||
/// 附近的设备 | |||
/// @param devices 设备列表 | |||
- (void)deviceBleReceiveDevices:(NSArray<ELPeripheralModel *> *)devices { | |||
for (ELPeripheralModel *model in devices) { | |||
if ([model.macAddress isEqualToString:self.p.macAddress]) { | |||
[[ELAiFreshNutritionScaleBleManager shareManager] connectPeripheral:model]; | |||
} | |||
} | |||
} | |||
//获得支持单位列表 | |||
- (void)supportWeightUnits:(NSArray *_Nullable)weightArray { | |||
NSLog(@"weightArray: %@", weightArray); | |||
[self addLog:@"获得支持单位列表"]; | |||
} | |||
//称重数据 | |||
- (void)aiFreshNutritionScaleBleDataModel:(ELAiFreshNutritionScaleDataModel *_Nonnull)model { | |||
NSLog(@"%s model:%@", __FUNCTION__, model); | |||
NSString *testData = [NSString stringWithFormat:@"weight:%@ weightPoint:%@ weightUnit:%@", @(model.weight), @(model.weightPoint), @(model.weightUnit)]; | |||
[self addLog:testData]; | |||
} | |||
//超载 | |||
- (void)overload:(BOOL)status { | |||
[self addLog:[NSString stringWithFormat:@"超载: %d", status]]; | |||
} | |||
//低电 | |||
- (void)lowPower:(BOOL)status { | |||
[self addLog:[NSString stringWithFormat:@"低电: %d", status]]; | |||
} | |||
//切换单位 | |||
- (void)uintDidChange:(AiFreshNutritionScaleWeightUnit)unit { | |||
[self addLog:[NSString stringWithFormat:@"切换单位: %d", unit]]; | |||
} | |||
//ble version | |||
- (void)firmwareVersion:(NSString *)version { | |||
NSLog(@"%s version:%@", __FUNCTION__, version); | |||
} | |||
@end |
@@ -0,0 +1,17 @@ | |||
// | |||
// AiFreshNutritionScaleScanViewController.h | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <UIKit/UIKit.h> | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface AiFreshNutritionScaleScanViewController : UIViewController | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,92 @@ | |||
// | |||
// AiFreshNutritionScaleScanViewController.m | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import "AiFreshNutritionScaleScanViewController.h" | |||
#import <AILinkBleSDK/ELAiFreshNutritionScaleBleManager.h> | |||
#import "Masonry.h" | |||
#import "AiFreshNutritionScaleConnectionViewController.h" | |||
@interface AiFreshNutritionScaleScanViewController () <UITableViewDelegate, UITableViewDataSource, AiFreshNutritionScaleBleDelegate> | |||
@property(nonatomic, strong) UITableView *tableView; | |||
@property(nonatomic, strong) NSArray<ELPeripheralModel *> *devices; | |||
@end | |||
@implementation AiFreshNutritionScaleScanViewController | |||
- (void)viewDidLoad { | |||
[super viewDidLoad]; | |||
// Do any additional setup after loading the view. | |||
[self.view addSubview:self.tableView]; | |||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { | |||
make.top.left.right.bottom.mas_equalTo(0); | |||
}]; | |||
} | |||
- (void)viewWillAppear:(BOOL)animated { | |||
[[ELAiFreshNutritionScaleBleManager shareManager] startScan]; | |||
[ELAiFreshNutritionScaleBleManager shareManager].nutritionScaleBleDelegate = self; | |||
} | |||
- (void)viewWillDisappear:(BOOL)animated { | |||
[[ELAiFreshNutritionScaleBleManager shareManager] stopScan]; | |||
} | |||
#pragma mark - BloodSugarBleDelegate | |||
- (void)deviceBleReceiveState:(ELBluetoothState)state { | |||
NSLog(@"deviceBleReceiveState = %ld", state); | |||
} | |||
- (void)deviceBleReceiveDevices:(NSArray<ELPeripheralModel *> *)devices { | |||
self.devices = devices; | |||
[self.tableView reloadData]; | |||
} | |||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | |||
return self.devices.count; | |||
} | |||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { | |||
return 60; | |||
} | |||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |||
static NSString *cellId = @"cellid"; | |||
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId]; | |||
if (!cell) { | |||
cell = [[UITableViewCell alloc] initWithStyle:(UITableViewCellStyleDefault) reuseIdentifier:cellId]; | |||
} | |||
ELPeripheralModel *p = self.devices[indexPath.row]; | |||
cell.textLabel.text = [NSString stringWithFormat:@"Name:%@---Mac:%@\nCID:%ld---VID:%ld---PID:%ld", p.deviceName, p.macAddress, p.deviceType, p.vendorID, p.productID]; | |||
cell.textLabel.numberOfLines = 2; | |||
cell.textLabel.textColor = [UIColor blackColor]; | |||
return cell; | |||
} | |||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { | |||
ELPeripheralModel *p = self.devices[indexPath.row]; | |||
AiFreshNutritionScaleConnectionViewController *vc = [[AiFreshNutritionScaleConnectionViewController alloc] init]; | |||
vc.p = p; | |||
[self.navigationController pushViewController:vc animated:YES]; | |||
} | |||
- (UITableView *)tableView { | |||
if (_tableView == nil) { | |||
_tableView = [[UITableView alloc] init]; | |||
_tableView.delegate = self; | |||
_tableView.dataSource = self; | |||
} | |||
return _tableView; | |||
} | |||
@end |
@@ -0,0 +1,20 @@ | |||
// | |||
// FaceMaskConnectionViewController.h | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <UIKit/UIKit.h> | |||
@class ELPeripheralModel; | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface FaceMaskConnectionViewController : UIViewController | |||
@property (nonatomic, strong) ELPeripheralModel *p; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,163 @@ | |||
// | |||
// FaceMaskConnectionViewController.m | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import "FaceMaskConnectionViewController.h" | |||
#import "Masonry.h" | |||
#import <AILinkBleSDK/ELFaceMaskBleHeader.h> | |||
#import <AILinkBleSDK/ELFaceMaskBleManager.h> | |||
@interface FaceMaskConnectionViewController () <FaceMaskBleDelegate, ELBluetoothManagerDelegate> | |||
@property(nonatomic, strong) UITextView *textView; | |||
@property(nonatomic, copy) NSArray<NSNumber *> *units; | |||
@property(nonatomic, strong) UIButton *connectButton; | |||
@end | |||
@implementation FaceMaskConnectionViewController | |||
- (void)viewDidLoad { | |||
[super viewDidLoad]; | |||
// Do any additional setup after loading the view. | |||
self.view.backgroundColor = [UIColor whiteColor]; | |||
[ELFaceMaskBleManager shareManager].faceMaskDelegate = self; | |||
[ELFaceMaskBleManager shareManager].delegate = self; | |||
[[ELFaceMaskBleManager shareManager] connectPeripheral:self.p]; | |||
[self setupUIView]; | |||
} | |||
- (void)viewWillDisappear:(BOOL)animated { | |||
[[ELFaceMaskBleManager shareManager] disconnectPeripheral]; | |||
} | |||
- (void)addLog:(NSString *)log { | |||
self.textView.text = [NSString stringWithFormat:@"%@\n\n%@", log, self.textView.text]; | |||
} | |||
- (void)connectDevice { | |||
[[ELFaceMaskBleManager shareManager] startScan]; | |||
} | |||
- (void)setupUIView { | |||
self.connectButton = [[UIButton alloc] initWithFrame:CGRectMake((self.view.frame.size.width - 100) / 2, 88, 100, 40)]; | |||
[self.connectButton setTitle:@"点击重连" forState:UIControlStateNormal]; | |||
[self.connectButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; | |||
[self.view addSubview:self.connectButton]; | |||
[self.connectButton addTarget:self action:@selector(connectDevice) forControlEvents:UIControlEventTouchUpInside]; | |||
self.connectButton.hidden = YES; | |||
self.textView = [[UITextView alloc] init]; | |||
self.textView.backgroundColor = [UIColor blackColor]; | |||
self.textView.text = @"Log"; | |||
self.textView.textColor = [UIColor redColor]; | |||
[self.view addSubview:self.textView]; | |||
[self.textView mas_makeConstraints:^(MASConstraintMaker *make) { | |||
make.left.mas_equalTo(10); | |||
make.right.mas_equalTo(-10); | |||
make.bottom.offset(-44); | |||
// make.height.mas_equalTo(350); | |||
make.top.offset(150); | |||
}]; | |||
} | |||
#pragma mark - ble Delegate | |||
/// 蓝牙连接状态 | |||
/// @param state 连接状态 | |||
- (void)faceMaskBleReceiveState:(ELBluetoothState)state { | |||
switch (state) { | |||
case ELBluetoothStateUnavailable: { | |||
self.title = @"Please open the bluetooth"; | |||
} | |||
break; | |||
case ELBluetoothStateAvailable: { | |||
self.title = @"Bluetooth is open"; | |||
} | |||
break; | |||
case ELBluetoothStateScaning: { | |||
self.title = @"Scanning"; | |||
} | |||
break; | |||
case ELBluetoothStateConnectFail: { | |||
self.title = @"Connect fail"; | |||
} | |||
break; | |||
case ELBluetoothStateDidDisconnect: { | |||
self.title = @"Disconnected"; | |||
self.connectButton.hidden = NO; | |||
} | |||
break; | |||
case ELBluetoothStateDidValidationPass: { | |||
self.connectButton.hidden = YES; | |||
self.title = @"Connected"; | |||
//连接成功,获取单位 | |||
[[ELFaceMaskBleManager shareManager] getBluetoothInfoWithELInetGetCmdType:ELInetGetCmdTypeReadDeviceSupportUnit]; | |||
//获取版本号 | |||
[[ELFaceMaskBleManager shareManager] getBluetoothInfoWithELInetGetCmdType:ELInetGetCmdTypeGetBMVersion]; | |||
//同步时间到设备 | |||
[[ELFaceMaskBleManager shareManager] syncMCUNowDate]; | |||
} | |||
break; | |||
case ELBluetoothStateFailedValidation: { | |||
self.title = @"Illegal equipment"; | |||
} | |||
break; | |||
case ELBluetoothStateWillConnect: | |||
self.title = @"Connecting"; | |||
break; | |||
default: | |||
break; | |||
} | |||
} | |||
/// 附近的设备 | |||
/// @param devices 设备列表 | |||
- (void)faceMaskBleReceiveDevices:(NSArray<ELPeripheralModel *> *)devices { | |||
for (ELPeripheralModel *model in devices) { | |||
if ([model.macAddress isEqualToString:self.p.macAddress]) { | |||
[[ELFaceMaskBleManager shareManager] connectPeripheral:model]; | |||
} | |||
} | |||
} | |||
- (void)faceMaskBleReceiveStatusDataModel:(ELFaceMaskBleDataModel *_Nonnull)model { | |||
NSString *str = [NSString stringWithFormat:@"空气质量指数:%@", @(model.index)]; | |||
str = [str stringByAppendingFormat:@" 风扇状态:%@", @(model.fanStatus)]; | |||
str = [str stringByAppendingFormat:@" 电池状态:%@", @(model.batteryStatus)]; | |||
str = [str stringByAppendingFormat:@" 电池续航:%@", @(model.batteryLife)]; | |||
str = [str stringByAppendingFormat:@" 呼吸频率:%@", @(model.breathRate)]; | |||
str = [str stringByAppendingFormat:@" 呼吸状态:%@", @(model.breathStatus)]; | |||
str = [str stringByAppendingFormat:@" 滤网的总工作时长:%@", @(model.workTime)]; | |||
[self addLog:[NSString stringWithFormat:@"ELFaceMaskBleDataModel() %@", str]]; | |||
} | |||
- (void)faceMaskReplaceSuccess:(BOOL)success { | |||
[self addLog:[NSString stringWithFormat:@"faceMaskReplaceSuccess() success:%@", @(success)]]; | |||
} | |||
- (void)faceMaskSwitchFanResult:(FaceMaskFanControlResult)result { | |||
[self addLog:[NSString stringWithFormat:@"faceMaskSwitchFanResult() result:%@", @(result)]]; | |||
} | |||
- (void)faceMaskPoweroffSuccess:(BOOL)success { | |||
[self addLog:[NSString stringWithFormat:@"faceMaskPoweroffSuccess() success:%@", @(success)]]; | |||
} | |||
@end |
@@ -0,0 +1,17 @@ | |||
// | |||
// FaceMaskScanViewController.h | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <UIKit/UIKit.h> | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface FaceMaskScanViewController : UIViewController | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,92 @@ | |||
// | |||
// FaceMaskScanViewController.m | |||
// AILinkBleSDKSourceCode | |||
// | |||
// Created by LarryZhang on 2021/12/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import "FaceMaskScanViewController.h" | |||
#import <AILinkBleSDK/ELFaceMaskBleManager.h> | |||
#import "Masonry.h" | |||
#import "FaceMaskConnectionViewController.h" | |||
@interface FaceMaskScanViewController () <UITableViewDelegate, UITableViewDataSource, FaceMaskBleDelegate> | |||
@property(nonatomic, strong) UITableView *tableView; | |||
@property(nonatomic, strong) NSArray<ELPeripheralModel *> *devices; | |||
@end | |||
@implementation FaceMaskScanViewController | |||
- (void)viewDidLoad { | |||
[super viewDidLoad]; | |||
// Do any additional setup after loading the view. | |||
[self.view addSubview:self.tableView]; | |||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { | |||
make.top.left.right.bottom.mas_equalTo(0); | |||
}]; | |||
} | |||
- (void)viewWillAppear:(BOOL)animated { | |||
[[ELFaceMaskBleManager shareManager] startScan]; | |||
[ELFaceMaskBleManager shareManager].faceMaskDelegate = self; | |||
} | |||
- (void)viewWillDisappear:(BOOL)animated { | |||
[[ELFaceMaskBleManager shareManager] stopScan]; | |||
} | |||
#pragma mark - BloodSugarBleDelegate | |||
- (void)faceMaskBleReceiveState:(ELBluetoothState)state { | |||
NSLog(@"faceMaskBleReceiveState = %ld", state); | |||
} | |||
- (void)faceMaskBleReceiveDevices:(NSArray<ELPeripheralModel *> *)devices { | |||
self.devices = devices; | |||
[self.tableView reloadData]; | |||
} | |||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | |||
return self.devices.count; | |||
} | |||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { | |||
return 60; | |||
} | |||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | |||
static NSString *cellId = @"cellid"; | |||
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId]; | |||
if (!cell) { | |||
cell = [[UITableViewCell alloc] initWithStyle:(UITableViewCellStyleDefault) reuseIdentifier:cellId]; | |||
} | |||
ELPeripheralModel *p = self.devices[indexPath.row]; | |||
cell.textLabel.text = [NSString stringWithFormat:@"Name:%@---Mac:%@\nCID:%ld---VID:%ld---PID:%ld", p.deviceName, p.macAddress, p.deviceType, p.vendorID, p.productID]; | |||
cell.textLabel.numberOfLines = 2; | |||
cell.textLabel.textColor = [UIColor blackColor]; | |||
return cell; | |||
} | |||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { | |||
ELPeripheralModel *p = self.devices[indexPath.row]; | |||
FaceMaskConnectionViewController *vc = [[FaceMaskConnectionViewController alloc] init]; | |||
vc.p = p; | |||
[self.navigationController pushViewController:vc animated:YES]; | |||
} | |||
- (UITableView *)tableView { | |||
if (_tableView == nil) { | |||
_tableView = [[UITableView alloc] init]; | |||
_tableView.delegate = self; | |||
_tableView.dataSource = self; | |||
} | |||
return _tableView; | |||
} | |||
@end |
@@ -0,0 +1,52 @@ | |||
// | |||
// ELAiFreshNutritionScaleBleHeader.h | |||
// Elink | |||
// | |||
// Created by LarryZhang on 2021/12/2. | |||
// Copyright © 2021 iot_iMac. All rights reserved. | |||
// | |||
#ifndef ELAiFreshNutritionScaleBleHeader_h | |||
#define ELAiFreshNutritionScaleBleHeader_h | |||
typedef NS_ENUM(NSUInteger, AiFreshNutritionScaleTestStatus) { | |||
//Real-time weight(实时重量) | |||
AiFreshNutritionScaleTestStatus_RealTime = 0xCE, | |||
//Stable weight(稳定重量) | |||
AiFreshNutritionScaleTestStatus_Stable = 0xCA, | |||
}; | |||
/** 营养秤 Weight unit(重量单位)*/ | |||
typedef NS_ENUM(NSInteger, AiFreshNutritionScaleWeightUnit) { | |||
/** g */ | |||
AiFreshNutritionScaleWeightUnit_G = 0 , | |||
/** ml */ | |||
AiFreshNutritionScaleWeightUnit_ML = 1 , | |||
/** lb:oz */ | |||
AiFreshNutritionScaleWeightUnit_LB_OZ = 2 , | |||
/** oz */ | |||
AiFreshNutritionScaleWeightUnit_OZ = 3 , | |||
/** kg */ | |||
AiFreshNutritionScaleWeightUnit_KG = 4 , | |||
/** 斤 */ | |||
AiFreshNutritionScaleWeightUnit_JIN = 5 , | |||
/** 牛奶 ml */ | |||
AiFreshNutritionScaleWeightUnit_MILK_ML = 6 , | |||
/** 水 ml */ | |||
AiFreshNutritionScaleWeightUnit_WATER_ML = 7 , | |||
/** 牛奶 fl.oz */ | |||
AiFreshNutritionScaleWeightUnit_MILK_FLOZ = 8 , | |||
/** 水 fl.oz */ | |||
AiFreshNutritionScaleWeightUnit_WATER_FLOZ = 9 , | |||
/** lb */ | |||
AiFreshNutritionScaleWeightUnit_LB = 10 , | |||
/** Unsupported unit */ | |||
AiFreshNutritionScaleWeightUnit_Fail = 0xFF , | |||
}; | |||
#endif /* ELAiFreshNutritionScaleBleHeader_h */ |
@@ -0,0 +1,77 @@ | |||
// | |||
// ELAiFreshNutritionScaleBleManager.h | |||
// Elink | |||
// | |||
// Created by LarryZhang on 2021/12/1. | |||
// Copyright © 2021 iot_iMac. All rights reserved. | |||
// | |||
#import "ELBluetoothManager.h" | |||
#import "ELAiFreshNutritionScaleDataModel.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@protocol AiFreshNutritionScaleBleDelegate <NSObject> | |||
@optional | |||
/// 蓝牙连接状态 | |||
/// @param state 连接状态 | |||
- (void)deviceBleReceiveState:(ELBluetoothState)state; | |||
/// 附近的设备 | |||
/// @param devices 设备列表 | |||
- (void)deviceBleReceiveDevices:(NSArray<ELPeripheralModel *> *_Nullable)devices; | |||
//获得支持单位列表 | |||
- (void)supportUnits:(NSArray *_Nonnull)unitArray; | |||
//正在连接中倒计时 | |||
- (void)deviceBleCountDown:(NSInteger)count; | |||
//ble version | |||
- (void)firmwareVersion:(NSString *)version; | |||
//称重数据 | |||
- (void)aiFreshNutritionScaleBleDataModel:(ELAiFreshNutritionScaleDataModel *_Nonnull)model; | |||
//超载 | |||
- (void)overload:(BOOL)status; | |||
//低电 | |||
- (void)lowPower:(BOOL)status; | |||
//切换单位 | |||
- (void)uintDidChange:(AiFreshNutritionScaleWeightUnit)unit; | |||
@end | |||
@interface ELAiFreshNutritionScaleBleManager : ELBluetoothManager | |||
@property(nonatomic, weak) id <AiFreshNutritionScaleBleDelegate> nutritionScaleBleDelegate; | |||
+ (instancetype)shareManager; | |||
@end | |||
@interface ELAiFreshNutritionScaleBleManager () | |||
- (void)autoScan; | |||
- (void)stopAutoScan; | |||
- (void)checkStatus; | |||
@end | |||
@interface ELAiFreshNutritionScaleBleManager (send) | |||
//APP 下发归零 | |||
- (void)sendMakeZero; | |||
//APP 切换单位 | |||
- (void)sendUnit:(AiFreshNutritionScaleWeightUnit)unit; | |||
//APP 获取设备支持单位列表 | |||
- (void)sendRequestUnitSupported; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,36 @@ | |||
// | |||
// ELAiFreshNutritionScaleDataModel.h | |||
// Elink | |||
// | |||
// Created by LarryZhang on 2021/12/2. | |||
// Copyright © 2021 iot_iMac. All rights reserved. | |||
// | |||
#import <Foundation/Foundation.h> | |||
#import "ELAiFreshNutritionScaleBleHeader.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface ELAiFreshNutritionScaleDataModel : NSObject | |||
//Measurement status(测量状态) | |||
@property (nonatomic, assign) AiFreshNutritionScaleTestStatus testStatus; | |||
//weight(重量数据) | |||
@property (nonatomic, assign) UInt32 weight; | |||
//Weight unit(重量单位) | |||
@property(nonatomic, assign) AiFreshNutritionScaleWeightUnit weightUnit; | |||
//Weight decimal point(体重小数点) | |||
@property(nonatomic, assign) Byte weightPoint; | |||
//Weight negative(是否负数) | |||
@property(nonatomic, assign, getter=isNegative) BOOL negative; | |||
//timestamp(时间戳) | |||
@property(nonatomic, assign) long long timestamp; | |||
@end | |||
NSString *AiFreshNutritionScaleWeightUnitString(AiFreshNutritionScaleWeightUnit unit); | |||
NS_ASSUME_NONNULL_END |
@@ -7,11 +7,11 @@ | |||
// | |||
#import "ELBluetoothManager.h" | |||
#import "ELPeripheralModel.h" | |||
#import "ELBabyScaleBleWeightModel.h" | |||
#import "ELBabyScaleBleHeightModel.h" | |||
#import "ELBabyScaleBleHeader.h" | |||
@class ELPeripheralModel; | |||
@protocol BabyScaleBleDelegate <NSObject> | |||
@optional | |||
//Callback Bluetooth status(回调蓝牙状态) |
@@ -0,0 +1,230 @@ | |||
// | |||
// ELBleDisposeDataTool.h | |||
// Elink | |||
// | |||
// Created by iot_user on 2019/4/23. | |||
// Copyright © 2019 iot_iMac. All rights reserved. | |||
// | |||
#import <Foundation/Foundation.h> | |||
#import "ELSDKHeader.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface ELBleDisposeDataTool : NSObject | |||
//MARK:校验和 | |||
+(BOOL)checksum:(NSData *)data; | |||
//MARK: 广播设备校验和 | |||
+(BOOL)broadcastChecksum:(NSData *)data; | |||
#pragma mark ============ 解析A6数据 ============== | |||
/** | |||
解析电池数据 | |||
@param data 原始数据 | |||
@return 电池充电状态和电量的结构体 | |||
*/ | |||
+(struct ELBatteryStruct)analysisBattery:(NSData *)data; | |||
/** | |||
解析CID、VID、PID | |||
@param data 原始数据 | |||
@return CID,VID,PID的结构体 | |||
*/ | |||
+(struct ELDIDStruct)analysisDid:(NSData *)data; | |||
/** | |||
解析模块时间 | |||
@param data 原始数据 | |||
@return yyyy-MM-dd HH:mm:ss | |||
*/ | |||
+(NSString *)analysisBluetoothDate:(NSData *)data; | |||
/** | |||
解析MCU软硬件版本号 | |||
@param data 原始数据 | |||
@return MCU软硬件版本号 | |||
*/ | |||
+(NSString *)analysisMCUVersion:(NSData *)data; | |||
/** | |||
解析BM模块软硬件版本号 | |||
@param data 原始数据 | |||
@return BM模块软硬件版本号 | |||
*/ | |||
+(NSString *)analysisBMVersion:(NSData *)data; | |||
/** | |||
解析MAC地址 | |||
@param data 原始数据 | |||
@return MAC地址 | |||
*/ | |||
+(NSString *)analysisBluetoothMACAddrress:(NSData *)data; | |||
/** | |||
解析模块状态 | |||
@param data 原始数据 | |||
@return 结构体 | |||
*/ | |||
+(struct ELMCUStateStruct)analysisBluetoothConnectState:(NSData *)data; | |||
/** | |||
解析模块通信模式 | |||
@param data 原始数据 | |||
@return 模式 | |||
*/ | |||
+(ELCommunicationModeType)analysisBluetoothCommunicationMode:(NSData *)data; | |||
/** | |||
解析自动睡眠时间 | |||
@param data 原始数据 | |||
@return 结构体 | |||
*/ | |||
+(struct ELAutoSleepTimeStruct)analysisBluetoothAutoSleepTime:(NSData *)data; | |||
/** | |||
解析主从模式数据 | |||
@param data 原始数据 | |||
@return 模式 | |||
0:从机模式 1:主机模式 | |||
*/ | |||
+(int)analysisBluetoothMCUMode:(NSData *)data; | |||
/** | |||
解析UUID | |||
@param data 原始数据 | |||
@return UUID 的结构体 | |||
*/ | |||
+(struct ELUUIDStruct)analysisBluetoothUUID:(NSData *)data; | |||
/** | |||
解析大小端序 | |||
@param data 原始数据 | |||
@return 大小端序 | |||
*/ | |||
+(int)analysisBluetoothMACAddressType:(NSData *)data; | |||
/** | |||
解析串口波特率 | |||
@param data 原始数据 | |||
@return 波特率 | |||
0:9600 | |||
1:19200 | |||
2:38400 | |||
3:57600 | |||
4:115200 | |||
5:921600 | |||
*/ | |||
+(int)analysisBluetoothSerialPostBaudRate:(NSData *)data; | |||
/** | |||
解析发射功率 | |||
@param data 原始数据 | |||
@return 发射功率:1~10 | |||
*/ | |||
+(int)analysisBluetoothTransmittingPower:(NSData *)data; | |||
/** | |||
解析蓝牙连接间隔 | |||
@param data 原始数据 | |||
@return 连接间隔时间的结构体 | |||
*/ | |||
+(struct ELConnectIntervalStruct)analysisBluetoothConnectInterval:(NSData *)data; | |||
/** | |||
解析蓝牙广播间隔时间 | |||
@param data 蓝牙发送的原始数据 | |||
@return 广播间隔 | |||
*/ | |||
+(int)analysisBluetoothBroadcastInterval:(NSData *)data; | |||
/** | |||
解析蓝牙名称 | |||
@param data 蓝牙发送的原始数据 | |||
@return 蓝牙名称 | |||
*/ | |||
+(NSString *)analysisBluetoothName:(NSData *)data; | |||
/** | |||
解析设备支持的体重数组 | |||
@param data 蓝牙发送的原始数据 | |||
@return 体重单位数组,内容为ELDeviceWeightUnit枚举 | |||
*/ | |||
+ (NSArray<NSNumber *> *)analysisBluetoothSupportWeightUnitArray:(NSData *)data; | |||
/** | |||
解析设备支持的身高数组 | |||
@param data 蓝牙发送的原始数据 | |||
@return 身高单位数组,内容为ELDeviceHeightUnit枚举 | |||
*/ | |||
+ (NSArray<NSNumber *> *)analysisBluetoothSupportHeightUnitArray:(NSData *)data; | |||
/** | |||
解析设备支持的温度数组 | |||
@param data 蓝牙发送的原始数据 | |||
@return 温度单位数组,内容为ELDeviceTemperatureUnit枚举 | |||
*/ | |||
+ (NSArray<NSNumber *> *)analysisBluetoothSupportTemperatureUnitArray:(NSData *)data; | |||
/** | |||
解析设备支持的血压数组 | |||
*/ | |||
+ (NSArray<NSNumber *> *)analysisBluetoothSupportBloodPressureUnitArray:(NSData *)data; | |||
/** | |||
解析设备支持的血压数组 | |||
@param data 蓝牙发送的原始数据 | |||
@return 血压单位数组,内容为ELDeviceTemperatureUnit枚举 | |||
*/ | |||
+ (NSArray<NSNumber *> *)analysisBluetoothSupportPressureUnitArray:(NSData *)data; | |||
/// 解析设备支持的血糖仪单位 | |||
/// @param data 蓝牙发送的原始数据 | |||
+ (NSArray<NSNumber *> *)analysisBluetoothSupportBloodSugarUnitArray:(NSData *)data; | |||
/// 解析设备支持的体积单位 | |||
/// @param data 蓝牙发送的原始数据 | |||
+ (NSArray<NSNumber *> *)analysisBluetoothSupportVolumUnitArray:(NSData *)data; | |||
/// 解析设备支持的营养秤单位 | |||
/// @param data 蓝牙发送的原始数据 | |||
+ (NSArray<NSNumber *> *)analysisBluetoothSupportNutritionUnitArray:(NSData *)data; | |||
/** | |||
解析蓝牙接收密钥的结果 | |||
@param data 原数据 | |||
@return YES:成功,NO失败 | |||
*/ | |||
+(BOOL)analysisBluetoothReceiveKeyState:(NSData *)data; | |||
/** | |||
解析设备基本信息 | |||
@param data 原数据 | |||
@return 设备基本信息 | |||
*/ | |||
+(NSData *)analysisBluetoothReceiveBasicInfoData:(NSData *)data; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -11,7 +11,7 @@ | |||
#import "ELBloodBleDataModel.h" | |||
@class ELPeripheralModel; | |||
typedef NS_ENUM(NSUInteger, ELBloodBleDataType) { | |||
ELBloodBleDataTypeStableData = 0x01, //Stable data(稳定数据) | |||
ELBloodBleDataTypeRealTimeData = 0x02, //Real-time data(实时数据) |
@@ -0,0 +1,64 @@ | |||
// | |||
// ELBluetoothManager+BleWifi.h | |||
// AILinkBleSDK | |||
// | |||
// Created by steven wu on 2021/8/6. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import "ELBluetoothManager.h" | |||
#import "ELBleWifiDetailModel.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface ELBluetoothManager (BleWifi) | |||
#pragma mark ============ Bluetooth WIFI calling method(蓝牙WIFI 设置命令) ============== | |||
/** | |||
WIFI initiate connection and disconnect(WIFI 发起连接、断开连接) | |||
@param connect YES: initiate connection NO: disconnect(YES:发起连接 NO:断开连接) | |||
*/ | |||
-(void)bleWifiSetupWifiConnect:(BOOL)connect; | |||
/** | |||
Set WIFI access URL(设置WIFI访问URL) | |||
@param url url(Not more than 56chars(不超过56chars)) | |||
*/ | |||
-(void)bleWifiSetWifiURL:(NSString *)url; | |||
/** | |||
Set Wifi access port number(设置Wifi访问端口号) | |||
@param port 端口号 | |||
*/ | |||
-(void)bleWifiSetPort:(int)port; | |||
/** | |||
Set DTIM interval(设置DTIM间隔) | |||
@param interval 间隔 | |||
*/ | |||
-(void)bleWifiSetDTIMInterval:(int)interval; | |||
/** | |||
Set WIFI password(设置WIFI密码) | |||
@param pwd WIFI password (8 ~ 56 chars)(WIFI密码(8~56 个chars)) | |||
*/ | |||
-(void)bleWifiSetWifiPwd:(NSString *)pwd; | |||
/** | |||
Set up connected WIFI(设置连接的WIFI) | |||
@param macData wifi MAC (little endian)(wifi的MAC(小端序)) | |||
*/ | |||
-(void)bleWifiSetConnectWifiMac:(NSData *)macData; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,91 @@ | |||
// | |||
// ELBluetoothManagerProtocol.h | |||
// AILinkBleSDK | |||
// | |||
// Created by steven wu on 2021/8/6. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <Foundation/Foundation.h> | |||
@class ELBleWifiDetailModel; | |||
NS_ASSUME_NONNULL_BEGIN | |||
//MARK:Bluetooth Wifi protocol(蓝牙Wifi协议) | |||
@protocol ElBleWifiDelegate <NSObject> | |||
@optional | |||
/** | |||
Callback Wifi details(回调Wifi详情) | |||
@param model 模型 | |||
*/ | |||
-(void)bleWifiReceiveWifiDetailModel:(ELBleWifiDetailModel *_Nonnull)model; | |||
/** | |||
Scan nearby wifi results(扫描附近wifi结果) | |||
@param count Number of nearby wifi(附近wifi数量) | |||
*/ | |||
-(void)bleWifiReceiveScanedWifiCount:(int)count; | |||
/** | |||
Callback Wifi MAC address(回调Wifi MAC地址) | |||
@param macData mac | |||
*/ | |||
-(void)bleWifiReceiveWifiMacData:(NSData *_Nullable)macData; | |||
/** | |||
Callback WIFI password(回调WIFI密码) | |||
@param pwd password(密码) | |||
*/ | |||
-(void)bleWifiReceiveWifiPwd:(NSString *_Nonnull)pwd; | |||
/** | |||
Get DTIM interval (unit: ms)(获取DTIM间隔(单位:ms)) | |||
@param interval Interval (unit: ms)(间隔(单位:ms)) | |||
*/ | |||
-(void)bleWifiReceiveWifiDTIMInterval:(NSInteger)interval; | |||
/** | |||
Returns the visited URL(返回访问的url) | |||
@param url url | |||
*/ | |||
-(void)bleWifiReceiveWifiAccessURL:(NSString *_Nonnull)url; | |||
/** | |||
Call back wifi port number(回调wifi的端口号) | |||
@param port 端口号 | |||
*/ | |||
-(void)bleWifiReceiveWifiPort:(int)port; | |||
/** | |||
Set or query the callback of the instruction execution result(设置指令蓝牙WIFI响应回调方法) | |||
只支持蓝牙Wifi部分枚举 | |||
@param type Type of setting (设置的类型) | |||
@param result Set result(设置的结果) | |||
*/ | |||
-(void)bleWifiReceiceResponseType:(ELInetSetCmdType)type result:(ELSetBluetoothResponseType)result; | |||
/** | |||
获取会话码(deviceId) | |||
@param code (deviceId) deviceId(0 means no:为0时表示不存在) | |||
*/ | |||
-(void)bleWifiReceiveWifiSNCode:(int)code; | |||
/** 返回wifi名称 */ | |||
- (void)bleWifiName:(NSString *)wifiName; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,182 @@ | |||
// | |||
// ELBluetoothManager+Settings.h | |||
// AILinkBleSDK | |||
// | |||
// Created by steven wu on 2021/8/6. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import "ELBluetoothManager.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface ELBluetoothManager (Settings) | |||
#pragma mark ============ A6 Set or query instructions(设置或查询指令) ============== | |||
/** | |||
Set the Bluetooth name(设置蓝牙名称) | |||
@param name Name, less than 14 bytes(名称,小于14个byte) | |||
*/ | |||
-(void)setBluetoothName:(NSString * _Nonnull)name; | |||
/** | |||
Set the broadcast interval(设置广播间隔时间) | |||
@param interval 20~2000 | |||
*/ | |||
-(void)setBroadcastInterval:(int)interval; | |||
/** | |||
Set the connection interval 10(设置连接间隔) | |||
@param interval The interval range is 20~2000ms.(interval范围是20~2000ms) | |||
@param timeout The timeout range is 1000~6000ms(timeout范围是1000~6000ms) | |||
@param latency The latency range is 0~4(latency范围是0〜4) | |||
*/ | |||
-(void)setConnectedInterval:(int)interval timeout:(int)timeout Latency:(int)latency; | |||
/** | |||
Set the transmit power(设置发射功率) | |||
@param power The range of power is 0~10(power的范围是0~10) | |||
*/ | |||
-(void)setTransmittingPower:(int)power; | |||
/** | |||
Set the serial port baud rate(设置串口波特率) | |||
@param rate The range of rate is 0~5(rate的范围是0~5) | |||
0:9600 | |||
1:19200 | |||
2:38400 | |||
3:57600 | |||
4:115200 | |||
5:921600 | |||
*/ | |||
-(void)setSerialPortbaudRate:(int)rate; | |||
/** | |||
Set the MCU software and hardware version number(设置MCU软硬件版本号) | |||
@param hardware 硬件 | |||
@param software 软件 | |||
如果是:S1.1,S11.1,S111.1, ..... | |||
请传:11,111,1111, .... | |||
@param type Manufacturer's own definition(厂家自己定义) | |||
@param year 年 | |||
@param month 月 | |||
@param day 日 | |||
*/ | |||
-(void)setMCUVersion:(unsigned int)hardware software:(unsigned int)software mcuType:(unsigned int)type year:(unsigned int)year month:(unsigned int)month day:(unsigned int)day; | |||
/** | |||
Set the big endian or little endian of the Mac address in the broadcast manufacturer's custom data.(设置广播厂家自定义数据中Mac地址的大端序或小端序) | |||
@param type type | |||
0:Little endian (default)(小端序 (默认)) | |||
1:Big endian(大端序) | |||
*/ | |||
-(void)setSetMACAddressType:(int)type; | |||
/** | |||
Set up the module's service and feature services(设置模块的服务和特征服务) | |||
@param serverUUIDData server | |||
@param charateristicUUIDData charateristic | |||
@param type UUID length: | |||
0 : 16 bytes(default) | |||
1:2 bytes | |||
*/ | |||
-(void)setBluetoothServerUUID:(NSData *)serverUUIDData charateristicUUID:(NSData *)charateristicUUIDData UUIDType:(int)type; | |||
/** | |||
Set the master-slave mode of the module(设置模块的主从模式) | |||
@param type Value: | |||
0:Slave mode (default)(从机模式(默认)) | |||
1:Host mode(主机模式) | |||
*/ | |||
-(void)setMCUModel:(int)type; | |||
/** | |||
Set the module's automatic sleep time without connection(设置模块无连接的自动休眠时间) | |||
@param open Automatic sleep flag(自动睡眠标志位): | |||
0:Do not turn on automatic sleep(不开启自动休眠) | |||
1:Turn on auto sleep, the module is not connected(开启自动休眠,模块没有连接) | |||
@param time Automatic sleep time (ms)(自动睡眠时间(ms)) | |||
@param radio Whether to enable low frequency broadcast after sleep: (unit: ms)(睡眠后是否开启低频广播:(单位:ms)) | |||
0:Not open(不开启) | |||
1:Open(开启) | |||
@param interval 低频广播间隔时间,20~2000ms | |||
*/ | |||
-(void)setAutoSleepTimeIsOpen:(BOOL)open autoSleepTime:(unsigned int)time isRadio:(BOOL)radio radioInterval:(int)interval; | |||
/** | |||
Set to sleep(设置进入睡眠) | |||
@param radio Whether to enable low frequency broadcast after sleep: (in ms)(睡眠后是否开启低频广播:(单位 ms)) | |||
0:Not open(不开启) | |||
1:Open(开启) | |||
@param interval 低频广播间隔时间,20~2000ms | |||
*/ | |||
-(void)setGotoSleepIsRadio:(BOOL)radio interval:(int)interval; | |||
/** | |||
Set module wake up(设置模块唤醒) | |||
*/ | |||
-(void)setMCUWakeUp; | |||
/** | |||
Setting CID, VID, PID(设置CID、VID、PID) | |||
@param setC Whether to set the CID(是否设置CID) | |||
@param setV Whether to set the VID(是否设置VID) | |||
@param setP Whether to set the PID(是否设置PID) | |||
@param cid Product Type ID: Less than 65536(产品类型ID:小于65536) | |||
@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; | |||
/** | |||
Set module communication mode | |||
设置模块通信模式 | |||
@param mode communication mode(通信模式) | |||
*/ | |||
-(void)setCommunicationMode:(ELCommunicationModeType)mode; | |||
/** | |||
Set module restart | |||
设置模块重启 | |||
*/ | |||
-(void)setMCURestart; | |||
/** | |||
Set factory reset | |||
设置恢复出厂设置 | |||
*/ | |||
-(void)setFactoryDataReset; | |||
/** | |||
Set the Bluetooth connection status(设置蓝牙连接状态) | |||
@param disconnect Active disconnect flag(主动断开连接标志位) | |||
1:Disconnect immediately(立刻断开连接) | |||
0:Not disconnected(不断开连接) | |||
*/ | |||
-(void)setDisconnected:(BOOL)disconnect; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,240 @@ | |||
// | |||
// ELBluetoothManagerProtocol.h | |||
// AILinkBleSDK | |||
// | |||
// Created by steven wu on 2021/8/6. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <Foundation/Foundation.h> | |||
NS_ASSUME_NONNULL_BEGIN | |||
//MARK: Broadcast Equipment Protocol(广播设备协议) | |||
@protocol ELBleBroadcastDelegate <NSObject> | |||
@optional | |||
/// Callback broadcast device data(回调广播设备数据) | |||
/// @param cid cid | |||
/// @param vid vid | |||
/// @param pid pid | |||
/// @param mac mac地址 | |||
/// @param data Custom data(自定义数据) | |||
-(void)bleBroadcastWithCid:(int)cid vid:(int)vid pid:(int)pid mac:(NSString *_Nonnull)mac data:(NSData *_Nonnull)data; | |||
@end | |||
//MARK:蓝牙通用协议 | |||
@protocol ELBluetoothManagerDelegate <NSObject> | |||
@optional | |||
//Callback Bluetooth status(回调蓝牙状态) | |||
-(void)bluetoothManagerUpdateBleState:(ELBluetoothState)state; | |||
//Callback to scanned device(回调扫描到的设备) | |||
-(void)bluetoothManagerScanedPeripherals:(NSArray<ELPeripheralModel *> *_Nonnull)peripherals; | |||
//Special devices that can be bound in the callback, such as door locks(回调中扫描到的可以绑定的特殊设备,如门锁) | |||
-(void)bluetoothManagerScanedCanBindSpecialPeripherals:(NSArray<ELPeripheralModel *> *_Nonnull)peripherals; | |||
//Call back the scanned broadcast device(回调扫描到的广播设备) | |||
-(void)bluetoothManagerScanedBroadcastPeripherals:(NSArray<ELPeripheralModel *> *_Nonnull)peripherals; | |||
//Callback decrypted transparent data (A7 decrypted payload data)(回调解密后的数据(A7解密后payload数据)) | |||
-(void)bluetoothManagerReceiveData:(NSData *_Nonnull)data deviceType:(ELSupportDeviceType)type; | |||
/** | |||
Callback transparent transmission data(回调透传数据) | |||
@param data Transparent data transmission (this data cannot start with A6 or A7)(透传数据(此数据不能以A6或A7开头)) | |||
*/ | |||
-(void)bluetoothManagerReceivePassData:(NSData *_Nullable)data; | |||
/** 回调已经连接到系统的设备 */ | |||
//- (void)bluetoothManagerLinkedSysPeripheral:(NSArray *_Nonnull)peripherals; | |||
#pragma mark ============ A6 Set or query the callback of the instruction execution result(设置或查询指令执行结果的回调) ============== | |||
/** | |||
Set or query the callback of the instruction execution result(设置指令蓝牙响应回调方法(握手指令除外)) | |||
@param type Type of setting (设置的类型) | |||
@param result Set result(设置的结果) | |||
*/ | |||
-(void)bluetoothManagerReceiceResponseType:(ELInetSetCmdType)type result:(ELSetBluetoothResponseType)result; | |||
/** | |||
Query module status callback(查询模块状态的回调) | |||
@param stateStrct 结构体 | |||
*/ | |||
-(void)bluetoothManagerReceiveMCUConnectedState:(struct ELMCUStateStruct)stateStrct; | |||
/** | |||
Query the callback of the communication mode(查询通信模式的回调) | |||
@param type communication mode(通信模式) | |||
*/ | |||
-(void)bluetoothManagerReceiveCommunicationMode:(ELCommunicationModeType)type; | |||
/** | |||
Query the callback of automatic sleep time(查询自动睡眠时间的回调) | |||
@param sleetStrct Automatic sleep time(自动睡眠时间) | |||
*/ | |||
-(void)bluetoothManagerReceiveAutoSleepTime:(struct ELAutoSleepTimeStruct)sleetStrct; | |||
/** | |||
Query master-slave mode callback(查询主从模式回调) | |||
@param mode 模式 | |||
0:Slave mode(从机模式) | |||
1:Host mode(主机模式) | |||
*/ | |||
-(void)bluetoothManagerReceiveMCUMode:(int)mode; | |||
/** | |||
Query the callback of UUID information(查询UUID信息的回调) | |||
@param uuid ELUUIDStruct | |||
*/ | |||
-(void)bluetoothManagerReceiveUUID:(struct ELUUIDStruct)uuid; | |||
/** | |||
Query the callback of the MAC address size endian(查询MAC地址大小端序的回调) | |||
@param type 类型 | |||
0:Little endian(小端序) | |||
1:Big endian (大端序) | |||
*/ | |||
-(void)bluetoothManagerReceiveMacAddressType:(int)type; | |||
/** | |||
Query the callback of the Bluetooth serial port baud rate(查询蓝牙串口波特率的回调) | |||
@param rate Serial port baud rate(串口波特率) | |||
0:9600 | |||
1:19200 | |||
2:38400 | |||
3:57600 | |||
4:115200 | |||
5:921600 | |||
*/ | |||
-(void)bluetoothManagerReceiveSerialPostBaudRate:(int)rate; | |||
/** | |||
Query the callback of Bluetooth transmit power(查询蓝牙发射功率的回调) | |||
@param dbm Transmit power(发射功率) | |||
*/ | |||
-(void)bluetoothManagerReceiveTransmittingPower:(int)dbm; | |||
/** | |||
Query the callback of the Bluetooth connection interval(查询蓝牙连接间隔的回调) | |||
@param intervalStrct connection interval | |||
*/ | |||
-(void)bluetoothManagerReceiveConnectInterval:(struct ELConnectIntervalStruct)intervalStrct; | |||
/** | |||
Query the callback of the Bluetooth name(查询蓝牙名称的回调) | |||
@param name Bluetooth name(蓝牙名称) | |||
*/ | |||
-(void)bluetoothManagerReceiceName:(NSString *_Nullable)name; | |||
/** | |||
Query the callback of the Bluetooth broadcast interval(查询蓝牙广播间隔的回调) | |||
@param interval broadcast interval(广播间隔) | |||
*/ | |||
-(void)bluetoothManagerReceiveBroadcastInterval:(int)interval; | |||
/** | |||
Query the callback of the Bluetooth MAC address(查询蓝牙MAC地址的回调) | |||
@param macAddress MAC | |||
*/ | |||
-(void)bluetoothManagerReceiveMACAddress:(NSString *_Nonnull)macAddress; | |||
/** | |||
Query the callback of the software and hardware version number of the BM module(查询BM模块软硬件版本号的回调) | |||
@param bmVersion BM module software and hardware version number(BM模块软硬件版本号) | |||
*/ | |||
-(void)bluetoothManagerReceiveBMVersion:(NSString *_Nonnull)bmVersion; | |||
/** | |||
Query the callback of the MCU software and hardware version number(查询MCU软硬件版本号的回调) | |||
@param mcuVersion Callback of MCU software and hardware version number(MCU软硬件版本号的回调) | |||
*/ | |||
-(void)bluetoothManagerReceiveMCUVersion:(NSString *_Nonnull)mcuVersion; | |||
/** | |||
Query the callback of Bluetooth time(查询蓝牙时间的回调) | |||
@param date yyyy-MM-dd HH:mm:ss | |||
@param effective Time is invalid(时间有无效) | |||
0:effective(系统时间无效) | |||
1:invalid(系统时间有效) | |||
*/ | |||
-(void)bluetoothManagerReceiveBluetoothDate:(NSString * _Nonnull)date effective:(BOOL)effective; | |||
/** | |||
Query CID, VID, PID callback(查询CID,VID,PID的回调) | |||
@param did CID,VID,PID | |||
*/ | |||
-(void)bluetoothManagerReceiveDID:(struct ELDIDStruct)did; | |||
/** | |||
Query the callback of the battery status(查询电池状态的回调) | |||
@param battery Structure of battery charge status and charge percentage(电池充电状态和电量百分比的结构体) | |||
*/ | |||
-(void)bluetoothManagerReceiveBattery:(struct ELBatteryStruct)battery; | |||
/** | |||
* Query the callback of the device support unit(查询设备支持单位的回调) | |||
*/ | |||
- (void)bluetoothManagerBackDeviceSupportUnitWithWeight:(NSArray<NSNumber *> *_Nullable)weightArray | |||
Height:(NSArray<NSNumber *> *_Nullable)heightArray | |||
Temperature:(NSArray<NSNumber *> *_Nullable)temperatureArray | |||
BloodPressure:(NSArray<NSNumber *> *_Nullable)bloodPressureArray | |||
Pressure:(NSArray<NSNumber *> *_Nullable)pressureArray; | |||
- (void)bluetoothManagerBackDeviceSupportUnitWithWeight:(NSArray<NSNumber *> *_Nullable)weightArray | |||
Height:(NSArray<NSNumber *> *_Nullable)heightArray | |||
Temperature:(NSArray<NSNumber *> *_Nullable)temperatureArray | |||
BloodPressure:(NSArray<NSNumber *> *_Nullable)bloodPressureArray | |||
Pressure:(NSArray<NSNumber *> *_Nullable)pressureArray | |||
Volume:(NSArray<NSNumber *> *_Nullable)volumeArray; | |||
/// Blood glucose units supported by callback supported devices(回调支持的设备支持的血糖单位) | |||
/// @param bloodSugarUnitArray Blood glucose unit array(血糖单位数组) | |||
-(void)bluetoothManagerReceiveSupportBloodSugarUnitArray:(NSArray<NSNumber *>* _Nullable)bloodSugarUnitArray; | |||
/** | |||
Set the result of the decoding key(设置解码密钥的结果) | |||
@param result 结果 | |||
*/ | |||
-(void)bluetoothManagerReceiveSetKeyResult:(BOOL)result; | |||
/// Device authorization result(设备授权结果) | |||
/// @param result 结果 | |||
-(void)bluetoothManagerReceiveDeviceAuthorizeResult:(ELBluetoothDeviceAuthorizeResult)result; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -10,294 +10,8 @@ | |||
#import "ELPeripheralModel.h" | |||
#import "ELSDKHeader.h" | |||
#import "ELBlePublicTool.h" | |||
#import "ELBleWifiDetailModel.h" | |||
//MARK: Broadcast Equipment Protocol(广播设备协议) | |||
@protocol ELBleBroadcastDelegate <NSObject> | |||
@optional | |||
/// Callback broadcast device data(回调广播设备数据) | |||
/// @param cid cid | |||
/// @param vid vid | |||
/// @param pid pid | |||
/// @param mac mac地址 | |||
/// @param data Custom data(自定义数据) | |||
-(void)bleBroadcastWithCid:(int)cid vid:(int)vid pid:(int)pid mac:(NSString *_Nonnull)mac data:(NSData *_Nonnull)data; | |||
@end | |||
//MARK:Bluetooth Wifi protocol(蓝牙Wifi协议) | |||
@protocol ElBleWifiDelegate <NSObject> | |||
@optional | |||
/** | |||
Callback Wifi details(回调Wifi详情) | |||
@param model 模型 | |||
*/ | |||
-(void)bleWifiReceiveWifiDetailModel:(ELBleWifiDetailModel *_Nonnull)model; | |||
/** | |||
Scan nearby wifi results(扫描附近wifi结果) | |||
@param count Number of nearby wifi(附近wifi数量) | |||
*/ | |||
-(void)bleWifiReceiveScanedWifiCount:(int)count; | |||
/** | |||
Callback Wifi MAC address(回调Wifi MAC地址) | |||
@param macData mac | |||
*/ | |||
-(void)bleWifiReceiveWifiMacData:(NSData *_Nullable)macData; | |||
/** | |||
Callback WIFI password(回调WIFI密码) | |||
@param pwd password(密码) | |||
*/ | |||
-(void)bleWifiReceiveWifiPwd:(NSString *_Nonnull)pwd; | |||
/** | |||
Get DTIM interval (unit: ms)(获取DTIM间隔(单位:ms)) | |||
@param interval Interval (unit: ms)(间隔(单位:ms)) | |||
*/ | |||
-(void)bleWifiReceiveWifiDTIMInterval:(NSInteger)interval; | |||
/** | |||
Returns the visited URL(返回访问的url) | |||
@param url url | |||
*/ | |||
-(void)bleWifiReceiveWifiAccessURL:(NSString *_Nonnull)url; | |||
/** | |||
Call back wifi port number(回调wifi的端口号) | |||
@param port 端口号 | |||
*/ | |||
-(void)bleWifiReceiveWifiPort:(int)port; | |||
/** | |||
Set or query the callback of the instruction execution result(设置指令蓝牙WIFI响应回调方法) | |||
只支持蓝牙Wifi部分枚举 | |||
@param type Type of setting (设置的类型) | |||
@param result Set result(设置的结果) | |||
*/ | |||
-(void)bleWifiReceiceResponseType:(ELInetSetCmdType)type result:(ELSetBluetoothResponseType)result; | |||
/** | |||
获取会话码(deviceId) | |||
@param code (deviceId) deviceId(0 means no:为0时表示不存在) | |||
*/ | |||
-(void)bleWifiReceiveWifiSNCode:(int)code; | |||
@end | |||
//MARK:蓝牙通用协议 | |||
@protocol ELBluetoothManagerDelegate <NSObject> | |||
@optional | |||
//Callback Bluetooth status(回调蓝牙状态) | |||
-(void)bluetoothManagerUpdateBleState:(ELBluetoothState)state; | |||
//Callback to scanned device(回调扫描到的设备) | |||
-(void)bluetoothManagerScanedPeripherals:(NSArray<ELPeripheralModel *> *_Nonnull)peripherals; | |||
//Special devices that can be bound in the callback, such as door locks(回调中扫描到的可以绑定的特殊设备,如门锁) | |||
-(void)bluetoothManagerScanedCanBindSpecialPeripherals:(NSArray<ELPeripheralModel *> *_Nonnull)peripherals; | |||
//Call back the scanned broadcast device(回调扫描到的广播设备) | |||
-(void)bluetoothManagerScanedBroadcastPeripherals:(NSArray<ELPeripheralModel *> *_Nonnull)peripherals; | |||
//Callback decrypted transparent data (A7 decrypted payload data)(回调解密后的数据(A7解密后payload数据)) | |||
-(void)bluetoothManagerReceiveData:(NSData *_Nonnull)data deviceType:(ELSupportDeviceType)type; | |||
/** | |||
Callback transparent transmission data(回调透传数据) | |||
@param data Transparent data transmission (this data cannot start with A6 or A7)(透传数据(此数据不能以A6或A7开头)) | |||
*/ | |||
-(void)bluetoothManagerReceivePassData:(NSData *_Nullable)data; | |||
/** 回调已经连接到系统的设备 */ | |||
//- (void)bluetoothManagerLinkedSysPeripheral:(NSArray *_Nonnull)peripherals; | |||
#pragma mark ============ A6 Set or query the callback of the instruction execution result(设置或查询指令执行结果的回调) ============== | |||
/** | |||
Set or query the callback of the instruction execution result(设置指令蓝牙响应回调方法(握手指令除外)) | |||
@param type Type of setting (设置的类型) | |||
@param result Set result(设置的结果) | |||
*/ | |||
-(void)bluetoothManagerReceiceResponseType:(ELInetSetCmdType)type result:(ELSetBluetoothResponseType)result; | |||
/** | |||
Query module status callback(查询模块状态的回调) | |||
@param stateStrct 结构体 | |||
*/ | |||
-(void)bluetoothManagerReceiveMCUConnectedState:(struct ELMCUStateStruct)stateStrct; | |||
/** | |||
Query the callback of the communication mode(查询通信模式的回调) | |||
@param type communication mode(通信模式) | |||
*/ | |||
-(void)bluetoothManagerReceiveCommunicationMode:(ELCommunicationModeType)type; | |||
/** | |||
Query the callback of automatic sleep time(查询自动睡眠时间的回调) | |||
@param sleetStrct Automatic sleep time(自动睡眠时间) | |||
*/ | |||
-(void)bluetoothManagerReceiveAutoSleepTime:(struct ELAutoSleepTimeStruct)sleetStrct; | |||
/** | |||
Query master-slave mode callback(查询主从模式回调) | |||
@param mode 模式 | |||
0:Slave mode(从机模式) | |||
1:Host mode(主机模式) | |||
*/ | |||
-(void)bluetoothManagerReceiveMCUMode:(int)mode; | |||
/** | |||
Query the callback of UUID information(查询UUID信息的回调) | |||
@param uuid ELUUIDStruct | |||
*/ | |||
-(void)bluetoothManagerReceiveUUID:(struct ELUUIDStruct)uuid; | |||
/** | |||
Query the callback of the MAC address size endian(查询MAC地址大小端序的回调) | |||
@param type 类型 | |||
0:Little endian(小端序) | |||
1:Big endian (大端序) | |||
*/ | |||
-(void)bluetoothManagerReceiveMacAddressType:(int)type; | |||
/** | |||
Query the callback of the Bluetooth serial port baud rate(查询蓝牙串口波特率的回调) | |||
@param rate Serial port baud rate(串口波特率) | |||
0:9600 | |||
1:19200 | |||
2:38400 | |||
3:57600 | |||
4:115200 | |||
5:921600 | |||
*/ | |||
-(void)bluetoothManagerReceiveSerialPostBaudRate:(int)rate; | |||
/** | |||
Query the callback of Bluetooth transmit power(查询蓝牙发射功率的回调) | |||
@param dbm Transmit power(发射功率) | |||
*/ | |||
-(void)bluetoothManagerReceiveTransmittingPower:(int)dbm; | |||
/** | |||
Query the callback of the Bluetooth connection interval(查询蓝牙连接间隔的回调) | |||
@param intervalStrct connection interval | |||
*/ | |||
-(void)bluetoothManagerReceiveConnectInterval:(struct ELConnectIntervalStruct)intervalStrct; | |||
/** | |||
Query the callback of the Bluetooth name(查询蓝牙名称的回调) | |||
@param name Bluetooth name(蓝牙名称) | |||
*/ | |||
-(void)bluetoothManagerReceiceName:(NSString *_Nullable)name; | |||
/** | |||
Query the callback of the Bluetooth broadcast interval(查询蓝牙广播间隔的回调) | |||
@param interval broadcast interval(广播间隔) | |||
*/ | |||
-(void)bluetoothManagerReceiveBroadcastInterval:(int)interval; | |||
/** | |||
Query the callback of the Bluetooth MAC address(查询蓝牙MAC地址的回调) | |||
@param macAddress MAC | |||
*/ | |||
-(void)bluetoothManagerReceiveMACAddress:(NSString *_Nonnull)macAddress; | |||
/** | |||
Query the callback of the software and hardware version number of the BM module(查询BM模块软硬件版本号的回调) | |||
@param bmVersion BM module software and hardware version number(BM模块软硬件版本号) | |||
*/ | |||
-(void)bluetoothManagerReceiveBMVersion:(NSString *_Nonnull)bmVersion; | |||
/** | |||
Query the callback of the MCU software and hardware version number(查询MCU软硬件版本号的回调) | |||
@param mcuVersion Callback of MCU software and hardware version number(MCU软硬件版本号的回调) | |||
*/ | |||
-(void)bluetoothManagerReceiveMCUVersion:(NSString *_Nonnull)mcuVersion; | |||
/** | |||
Query the callback of Bluetooth time(查询蓝牙时间的回调) | |||
@param date yyyy-MM-dd HH:mm:ss | |||
@param effective Time is invalid(时间有无效) | |||
0:effective(系统时间无效) | |||
1:invalid(系统时间有效) | |||
*/ | |||
-(void)bluetoothManagerReceiveBluetoothDate:(NSString * _Nonnull)date effective:(BOOL)effective; | |||
/** | |||
Query CID, VID, PID callback(查询CID,VID,PID的回调) | |||
@param did CID,VID,PID | |||
*/ | |||
-(void)bluetoothManagerReceiveDID:(struct ELDIDStruct)did; | |||
/** | |||
Query the callback of the battery status(查询电池状态的回调) | |||
@param battery Structure of battery charge status and charge percentage(电池充电状态和电量百分比的结构体) | |||
*/ | |||
-(void)bluetoothManagerReceiveBattery:(struct ELBatteryStruct)battery; | |||
/** | |||
* Query the callback of the device support unit(查询设备支持单位的回调) | |||
*/ | |||
- (void)bluetoothManagerBackDeviceSupportUnitWithWeight:(NSArray<NSNumber *> *_Nullable)weightArray | |||
Height:(NSArray<NSNumber *> *_Nullable)heightArray | |||
Temperature:(NSArray<NSNumber *> *_Nullable)temperatureArray | |||
BloodPressure:(NSArray<NSNumber *> *_Nullable)bloodPressureArray | |||
Pressure:(NSArray<NSNumber *> *_Nullable)pressureArray; | |||
/// Blood glucose units supported by callback supported devices(回调支持的设备支持的血糖单位) | |||
/// @param bloodSugarUnitArray Blood glucose unit array(血糖单位数组) | |||
-(void)bluetoothManagerReceiveSupportBloodSugarUnitArray:(NSArray<NSNumber *>* _Nullable)bloodSugarUnitArray; | |||
/** | |||
Set the result of the decoding key(设置解码密钥的结果) | |||
@param result 结果 | |||
*/ | |||
-(void)bluetoothManagerReceiveSetKeyResult:(BOOL)result; | |||
/// Device authorization result(设备授权结果) | |||
/// @param result 结果 | |||
-(void)bluetoothManagerReceiveDeviceAuthorizeResult:(ELBluetoothDeviceAuthorizeResult)result; | |||
@end | |||
#import "ELBluetoothManager+Settings_Callback.h" | |||
#import "ELBluetoothManager+BleWifi_Callback.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@@ -348,6 +62,27 @@ NS_ASSUME_NONNULL_BEGIN | |||
//Disconnect device(断开设备) | |||
-(void)disconnectPeripheral; | |||
/** | |||
Get Bluetooth information(获取蓝牙信息) | |||
@param type ELInetGetCmdType (ELInetGetCmdTypeGetHandshake除外) | |||
*/ | |||
-(void)getBluetoothInfoWithELInetGetCmdType:(ELInetGetCmdType)type; | |||
/** | |||
Sync the current time of phone to BLE(设置手机本地时间给蓝牙模块,只在蓝牙体脂秤等需要蓝牙模块保存历史记录时才调用) | |||
@param enable | |||
NO: In addition to the ability to turn off the time function, you can save part of the current (default)(除能,关闭时间功能,可省部分电流(默认)) | |||
YES:Enable, turn on the timer function timer(使能,开启计时功能定时器) | |||
*/ | |||
-(void)syncBleNowDate:(BOOL)enable; | |||
///仅WIFI秤调用,同步世界时间(0时区)到wifi-ble模块 | |||
-(void)syncBleGMTNowDate:(BOOL)enable; | |||
///同步手机本地时间给mcu,每次连接成功后会自动调用 | |||
-(void)syncMCUNowDate; | |||
#pragma mark ============ 发送指令的3种方法 ============== | |||
/** | |||
Shortcut method to send A6 data to BLE(发送A6数据给BLE的快捷方法) | |||
@@ -361,6 +96,8 @@ NS_ASSUME_NONNULL_BEGIN | |||
*/ | |||
-(void)sendCmdToMCUWithA7PayloadData:(NSData *)data deviceType:(ELSupportDeviceType)type; | |||
-(void)immediatelySendCmdToMCUWithA7PayloadData:(NSData *)data deviceType:(ELSupportDeviceType)type; | |||
/** | |||
General method of sending data (support data transparent transmission)(发送数据通用方法(支持数据透传)) | |||
@@ -368,6 +105,7 @@ NS_ASSUME_NONNULL_BEGIN | |||
*/ | |||
-(void)sendData:(NSData *)data; | |||
#pragma mark ============ Please rewrite the following methods in the subclass(请在子类重写以下方法) BEGIN============== | |||
-(void)bluetoothUpdateState:(ELBluetoothState)state; | |||
@@ -409,6 +147,8 @@ Callback decrypted A7 transparent data (payload part), type device type( 回调 | |||
/** 滑板车专用,返回设备消息推送内容 */ | |||
- (void)bluetoothManagerScooterMessageWithUUID:(NSString *)uuid data:(NSData *)data; | |||
/** 返回滑板车软件版本号 */ | |||
- (void)bluetoothManagerScooterSoftwareRevision:(NSString *)version; | |||
//Broadcast equipment dedicated(广播设备专用) | |||
/// Broadcast device data | |||
@@ -423,238 +163,7 @@ Callback decrypted A7 transparent data (payload part), type device type( 回调 | |||
#pragma mark ============ A6 Set or query instructions(设置或查询指令) ============== | |||
/** | |||
Get Bluetooth information(获取蓝牙信息) | |||
@param type ELInetGetCmdType (ELInetGetCmdTypeGetHandshake除外) | |||
*/ | |||
-(void)getBluetoothInfoWithELInetGetCmdType:(ELInetGetCmdType)type; | |||
/** | |||
Set the Bluetooth name(设置蓝牙名称) | |||
@param name Name, less than 14 bytes(名称,小于14个byte) | |||
*/ | |||
-(void)setBluetoothName:(NSString * _Nonnull)name; | |||
/** | |||
Set the broadcast interval(设置广播间隔时间) | |||
@param interval 20~2000 | |||
*/ | |||
-(void)setBroadcastInterval:(int)interval; | |||
/** | |||
Set the connection interval 10(设置连接间隔) | |||
@param interval The interval range is 20~2000ms.(interval范围是20~2000ms) | |||
@param timeout The timeout range is 1000~6000ms(timeout范围是1000~6000ms) | |||
@param latency The latency range is 0~4(latency范围是0〜4) | |||
*/ | |||
-(void)setConnectedInterval:(int)interval timeout:(int)timeout Latency:(int)latency; | |||
/** | |||
Set the transmit power(设置发射功率) | |||
@param power The range of power is 0~10(power的范围是0~10) | |||
*/ | |||
-(void)setTransmittingPower:(int)power; | |||
/** | |||
Set the serial port baud rate(设置串口波特率) | |||
@param rate The range of rate is 0~5(rate的范围是0~5) | |||
0:9600 | |||
1:19200 | |||
2:38400 | |||
3:57600 | |||
4:115200 | |||
5:921600 | |||
*/ | |||
-(void)setSerialPortbaudRate:(int)rate; | |||
/** | |||
Set the MCU software and hardware version number(设置MCU软硬件版本号) | |||
@param hardware 硬件 | |||
@param software 软件 | |||
如果是:S1.1,S11.1,S111.1, ..... | |||
请传:11,111,1111, .... | |||
@param type Manufacturer's own definition(厂家自己定义) | |||
@param year 年 | |||
@param month 月 | |||
@param day 日 | |||
*/ | |||
-(void)setMCUVersion:(unsigned int)hardware software:(unsigned int)software mcuType:(unsigned int)type year:(unsigned int)year month:(unsigned int)month day:(unsigned int)day; | |||
/** | |||
Set the big endian or little endian of the Mac address in the broadcast manufacturer's custom data.(设置广播厂家自定义数据中Mac地址的大端序或小端序) | |||
@param type type | |||
0:Little endian (default)(小端序 (默认)) | |||
1:Big endian(大端序) | |||
*/ | |||
-(void)setSetMACAddressType:(int)type; | |||
/** | |||
Set up the module's service and feature services(设置模块的服务和特征服务) | |||
@param serverUUIDData server | |||
@param charateristicUUIDData charateristic | |||
@param type UUID length: | |||
0 : 16 bytes(default) | |||
1:2 bytes | |||
*/ | |||
-(void)setBluetoothServerUUID:(NSData *)serverUUIDData charateristicUUID:(NSData *)charateristicUUIDData UUIDType:(int)type; | |||
/** | |||
Set the master-slave mode of the module(设置模块的主从模式) | |||
@param type Value: | |||
0:Slave mode (default)(从机模式(默认)) | |||
1:Host mode(主机模式) | |||
*/ | |||
-(void)setMCUModel:(int)type; | |||
/** | |||
Set the module's automatic sleep time without connection(设置模块无连接的自动休眠时间) | |||
@param open Automatic sleep flag(自动睡眠标志位): | |||
0:Do not turn on automatic sleep(不开启自动休眠) | |||
1:Turn on auto sleep, the module is not connected(开启自动休眠,模块没有连接) | |||
@param time Automatic sleep time (ms)(自动睡眠时间(ms)) | |||
@param radio Whether to enable low frequency broadcast after sleep: (unit: ms)(睡眠后是否开启低频广播:(单位:ms)) | |||
0:Not open(不开启) | |||
1:Open(开启) | |||
@param interval 低频广播间隔时间,20~2000ms | |||
*/ | |||
-(void)setAutoSleepTimeIsOpen:(BOOL)open autoSleepTime:(unsigned int)time isRadio:(BOOL)radio radioInterval:(int)interval; | |||
/** | |||
Set to sleep(设置进入睡眠) | |||
@param radio Whether to enable low frequency broadcast after sleep: (in ms)(睡眠后是否开启低频广播:(单位 ms)) | |||
0:Not open(不开启) | |||
1:Open(开启) | |||
@param interval 低频广播间隔时间,20~2000ms | |||
*/ | |||
-(void)setGotoSleepIsRadio:(BOOL)radio interval:(int)interval; | |||
/** | |||
Set module wake up(设置模块唤醒) | |||
*/ | |||
-(void)setMCUWakeUp; | |||
/** | |||
Set the current time of the system(设置系统当前时间) | |||
@param enable | |||
NO: In addition to the ability to turn off the time function, you can save part of the current (default)(除能,关闭时间功能,可省部分电流(默认)) | |||
YES:Enable, turn on the timer function timer(使能,开启计时功能定时器) | |||
*/ | |||
-(void)setMCUNowDateWithEnable:(BOOL)enable; | |||
//同步系统时间到mcu | |||
-(void)syncMCUNowDate; | |||
/** | |||
Setting CID, VID, PID(设置CID、VID、PID) | |||
@param setC Whether to set the CID(是否设置CID) | |||
@param setV Whether to set the VID(是否设置VID) | |||
@param setP Whether to set the PID(是否设置PID) | |||
@param cid Product Type ID: Less than 65536(产品类型ID:小于65536) | |||
@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; | |||
/** | |||
Set module communication mode | |||
设置模块通信模式 | |||
@param mode communication mode(通信模式) | |||
*/ | |||
-(void)setCommunicationMode:(ELCommunicationModeType)mode; | |||
/** | |||
Set module restart | |||
设置模块重启 | |||
*/ | |||
-(void)setMCURestart; | |||
/** | |||
Set factory reset | |||
设置恢复出厂设置 | |||
*/ | |||
-(void)setFactoryDataReset; | |||
/** | |||
Set the Bluetooth connection status(设置蓝牙连接状态) | |||
@param disconnect Active disconnect flag(主动断开连接标志位) | |||
1:Disconnect immediately(立刻断开连接) | |||
0:Not disconnected(不断开连接) | |||
*/ | |||
-(void)setDisconnected:(BOOL)disconnect; | |||
/** | |||
Send decoding key(发送解码密钥) | |||
@param data The length of the decoding key is 19, the first 16 are keys, and the last 3 are random texts. You need to save this value on the app and MCU to generate a one-time password. (解码密钥的长度为19,前16个为密钥,后3个为随机文,需要在app端和MCU端保存这个值,用于生成一次性密码) | |||
*/ | |||
- (void)setKeyWithData:(NSData *)data; | |||
/// Request device authorization(请求设备授权) | |||
/// @param interval 时间截 | |||
-(void)requestDeviceAuthorization:(NSInteger)interval; | |||
#pragma mark ============ Bluetooth WIFI calling method(蓝牙WIFI调用方法) ============== | |||
/** | |||
WIFI initiate connection and disconnect(WIFI 发起连接、断开连接) | |||
@param connect YES: initiate connection NO: disconnect(YES:发起连接 NO:断开连接) | |||
*/ | |||
-(void)bleWifiSetupWifiConnect:(BOOL)connect; | |||
/** | |||
Set WIFI access URL(设置WIFI访问URL) | |||
@param url url(Not more than 56chars(不超过56chars)) | |||
*/ | |||
-(void)bleWifiSetWifiURL:(NSString *)url; | |||
/** | |||
Set Wifi access port number(设置Wifi访问端口号) | |||
@param port 端口号 | |||
*/ | |||
-(void)bleWifiSetPort:(int)port; | |||
/** | |||
Set DTIM interval(设置DTIM间隔) | |||
@param interval 间隔 | |||
*/ | |||
-(void)bleWifiSetDTIMInterval:(int)interval; | |||
/** | |||
Set WIFI password(设置WIFI密码) | |||
@param pwd WIFI password (8 ~ 56 chars)(WIFI密码(8~56 个chars)) | |||
*/ | |||
-(void)bleWifiSetWifiPwd:(NSString *)pwd; | |||
/** | |||
Set up connected WIFI(设置连接的WIFI) | |||
@param macData wifi MAC (little endian)(wifi的MAC(小端序)) | |||
*/ | |||
-(void)bleWifiSetConnectWifiMac:(NSData *)macData; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -30,20 +30,6 @@ typedef NS_ENUM(NSInteger , ELBodyFatScaleBleDataA6SubType) { | |||
ELBodyFatScaleBleDataA6SubType_BleBackHistoryWithMCUAlgorithm = 0x06 , | |||
/** ble发给app无体脂数据的历史记录,app需要根据vip/pid确定使用哪种算法来计算8项体脂数据 */ | |||
ELBodyFatScaleBleDataA6SubType_BleBackHistoryWithAppAlgorithm = 0x07, | |||
/** App设置访问的IP地址 */ | |||
ELBodyFatScaleBleDataA6SubType_AppSetDevIpAddress = 0x8B , | |||
/** App获取访问的IP地址 */ | |||
ELBodyFatScaleBleDataA6SubType_AppGetDevIpAddress = 0x8C , | |||
/** App设置访问的端口号 */ | |||
ELBodyFatScaleBleDataA6SubType_AppSetDevPortNumber = 0x8D , | |||
/** App获取访问的端口号 */ | |||
ELBodyFatScaleBleDataA6SubType_AppGetDevPortNumber = 0x8E , | |||
/** App设置访问的路径 */ | |||
ELBodyFatScaleBleDataA6SubType_AppSetDevPath = 0x96 , | |||
/** App获取访问的路径 */ | |||
ELBodyFatScaleBleDataA6SubType_AppGetDevPath = 0x97 , | |||
}; | |||
@@ -6,10 +6,10 @@ | |||
// Copyright © 2019 iot_iMac. All rights reserved. | |||
// | |||
#import "ELBluetoothManager.h" | |||
#import <AILinkBleSDK/ELBluetoothManager.h> | |||
#import "ELBodyFatScaleBleHeader.h" | |||
@class ELBodyFatScaleBleUserModel,ELBodyFatScaleBleWeightModel,ELPeripheralModel; | |||
@class ELBodyFatScaleBleUserModel,ELBodyFatScaleBleWeightModel,ELBodyFatScaleDeviceModel; | |||
NS_ASSUME_NONNULL_BEGIN | |||
@protocol ELBodyFatScaleBleDelegate <NSObject> | |||
@@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN | |||
- (void)bodyFatScaleManagerUpdateState:(ELBluetoothState )state; | |||
/**Callback all body fat scales detected( 回调扫描到的所有体脂秤 )*/ | |||
- (void)bodyFatScaleManagerScanDevices:(NSArray<ELPeripheralModel *> *)scaleDevices; | |||
- (void)bodyFatScaleManagerScanDevices:(NSArray<ELBodyFatScaleDeviceModel *> *)scaleDevices; | |||
//MARK:回调A7指令数据 | |||
/** |
@@ -44,6 +44,9 @@ NS_ASSUME_NONNULL_BEGIN | |||
@property (nonatomic, assign) NSUInteger heartRate; | |||
///Algorithm ID(算法ID) | |||
@property (nonatomic, assign) NSUInteger algNum; | |||
///BMI, need / 10,When this value is 0, you need to calculate it yourself. BMI=Weight(kg)/Height(m)^2 | |||
///BMI,需要除以10, 如果蓝牙返回这个值为0,需要开发者自己计算 BMI=Weight(kg)/Height(m)^2 | |||
@property (nonatomic, assign) NSUInteger bmi; | |||
@end | |||
@@ -415,7 +415,7 @@ NS_ASSUME_NONNULL_BEGIN | |||
/// 获取肥胖等级 | |||
/// @param weight 体重(KG) | |||
/// @param standardWeight 标准体重(KG) | |||
+ (AILinkFatLevelType)getfatLevelWithweight:(double)weight andSatndardWeight:(double)standardWeight; | |||
+ (AILinkFatLevelType)getfatLevelWithweight:(double)weight andStandardWeight:(double)standardWeight; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN | |||
@property (nonatomic, assign) BroadcastHeightGuage_TestState testState; | |||
/** 身高数据 */ | |||
@property (nonatomic, assign) float height; | |||
@property (nonatomic, assign) NSUInteger height; | |||
/** 身高小数点位 */ | |||
@property (nonatomic, assign) NSUInteger heightPoint; | |||
@@ -35,7 +35,7 @@ NS_ASSUME_NONNULL_BEGIN | |||
@property (nonatomic, assign) ELDeviceHeightUnit heightUnit; | |||
/** 体重数据 */ | |||
@property (nonatomic, assign) float weight; | |||
@property (nonatomic, assign) NSInteger weight; | |||
/** 体重小数点位 */ | |||
@property (nonatomic, assign) NSUInteger weightPoint; |
@@ -6,7 +6,7 @@ | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import "ELBluetoothManager.h" | |||
#import <AILinkBleSDK/ELBluetoothManager.h> | |||
#import "ELBroadcastHeightGaugeBleDataModel.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN | |||
- (void)broadcastHeightGaugeUpdateState:(ELBluetoothState)state; | |||
/** Call back all height gauge devices(回调所有身高仪设备) */ | |||
//- (void)broadcastHeightGaugeScanDevices:(NSArray<ELPeripheralModel *> *)heightGaugeDevices; | |||
- (void)broadcastHeightGaugeScanDevices:(NSArray<ELPeripheralModel *> *)heightGaugeDevices; | |||
/** 回调身高数据 */ | |||
- (void)broadcastHeightGaugeDeviceDataModel:(ELBroadcastHeightGaugeBleDataModel *)model; |
@@ -0,0 +1,64 @@ | |||
// | |||
// ELBroadcastNutritionFoodScaleBleHeader.h | |||
// Elink | |||
// | |||
// Created by iot_user on 2020/8/21. | |||
// Copyright © 2020 iot_iMac. All rights reserved. | |||
// | |||
#ifndef ELBroadcastNutritionFoodScaleBleHeader_h | |||
#define ELBroadcastNutritionFoodScaleBleHeader_h | |||
#import "ELSDKHeader.h" | |||
typedef NS_ENUM(NSUInteger, BroadcastNutritionFoodScaleStatus) { | |||
//Real-time weight(实时重量) | |||
BroadcastNutritionFoodScaleStatus_RealTime = 0, | |||
//Stable weight(稳定重量) | |||
BroadcastNutritionFoodScaleStatus_Stable = 1, | |||
//error (测量异常) | |||
BroadcastNutritionFoodScaleStatus_Error = 2, | |||
}; | |||
/** 广播营养秤 Weight unit(重量单位)*/ | |||
typedef NS_ENUM(NSInteger, BroadcastNutritionFoodScaleWeightUnit) { | |||
/** g */ | |||
BroadcastNutritionFoodScaleWeightUnit_G = 0 , | |||
/** ml */ | |||
BroadcastNutritionFoodScaleWeightUnit_ML = 1 , | |||
/** lb:oz */ | |||
BroadcastNutritionFoodScaleWeightUnit_LB_OZ = 2 , | |||
/** oz */ | |||
BroadcastNutritionFoodScaleWeightUnit_OZ = 3 , | |||
/** kg */ | |||
BroadcastNutritionFoodScaleWeightUnit_KG = 4 , | |||
/** 斤 */ | |||
BroadcastNutritionFoodScaleWeightUnit_JIN = 5 , | |||
/** 牛奶 ml */ | |||
BroadcastNutritionFoodScaleWeightUnit_MILK_ML = 6 , | |||
/** 水 ml */ | |||
BroadcastNutritionFoodScaleWeightUnit_WATER_ML = 7 , | |||
/** 牛奶 fl.oz */ | |||
BroadcastNutritionFoodScaleWeightUnit_MILK_FLOZ = 8 , | |||
/** 水 fl.oz */ | |||
BroadcastNutritionFoodScaleWeightUnit_WATER_FLOZ = 9 , | |||
/** lb */ | |||
BroadcastNutritionFoodScaleWeightUnit_LB = 10 , | |||
/** Unsupported unit */ | |||
BroadcastNutritionFoodScaleWeightUnit_Fail = 0xFF , | |||
}; | |||
typedef NS_ENUM(NSUInteger, BroadcastNutritionFoodScaleErrorStatus) { | |||
//Low Power(1:电量过低,无法测试 0:正常) | |||
BroadcastNutritionFoodScaleErrorStatus_Low_Power_mask = 1 << 0, | |||
//Over Range(1: 超重 0:正常) | |||
BroadcastNutritionFoodScaleErrorStatus_Over_Range_mask = 1 << 1, | |||
}; | |||
#endif /* ELBroadcastNutritionFoodScaleBleHeader_h */ |
@@ -0,0 +1,37 @@ | |||
// | |||
// ELBroadcastNutritionFoodScaleBleManager.h | |||
// Elink | |||
// | |||
// Created by iot_user on 2020/8/21. | |||
// Copyright © 2020 iot_iMac. All rights reserved. | |||
// | |||
#import "ELBluetoothManager.h" | |||
#import "ELBroadcastNutritionFoodScaleDataModel.h" | |||
@protocol BroadcastNutritionFoodScaleBleDelegate <NSObject> | |||
@optional | |||
//Bluetooth connection status(蓝牙连接状态) | |||
- (void)broadcastNutritionFoodScaleBleUpdateState:(ELBluetoothState)state; | |||
// | |||
- (void)broadcastNutritionFoodScaleBleDataModel:(ELBroadcastNutritionFoodScaleDataModel *_Nonnull)model; | |||
@end | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface ELBroadcastNutritionFoodScaleBleManager : ELBluetoothManager | |||
@property(nonatomic, weak) id <BroadcastNutritionFoodScaleBleDelegate> broadcastNutritionFoodScaleBleDelegate; | |||
+ (instancetype)shareManager; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,48 @@ | |||
// | |||
// ELBroadcastNutritionFoodScaleDataModel.h | |||
// Elink | |||
// | |||
// Created by iot_user on 2020/8/21. | |||
// Copyright © 2020 iot_iMac. All rights reserved. | |||
// | |||
#import <Foundation/Foundation.h> | |||
#import "ELBroadcastNutritionFoodScaleBleHeader.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface ELBroadcastNutritionFoodScaleDataModel : NSObject | |||
@property(nonatomic, assign) int cid; | |||
@property(nonatomic, assign) int vid; | |||
@property(nonatomic, assign) int pid; | |||
@property(nonatomic, copy) NSString *mac; | |||
//Data serial number(数据流水号) | |||
@property(nonatomic, assign) Byte serialNumber; | |||
//Measurement status(测量状态) | |||
@property (nonatomic, assign) BroadcastNutritionFoodScaleStatus testStatus; | |||
//weight(重量数据) | |||
@property (nonatomic, assign) UInt32 weight; | |||
//Weight unit(重量单位) | |||
@property(nonatomic, assign) BroadcastNutritionFoodScaleWeightUnit weightUnit; | |||
//Weight decimal point(体重小数点) | |||
@property(nonatomic, assign) Byte weightPoint; | |||
//Weight negative(是否负数) | |||
@property(nonatomic, assign, getter=isNegative) BOOL negative; | |||
//Power(电量 0~100%) | |||
@property(nonatomic, assign) Byte power; | |||
//Error(异常标志) | |||
@property(nonatomic, assign) BroadcastNutritionFoodScaleErrorStatus errorStatus; | |||
//timestamp(时间戳) | |||
@property(nonatomic, assign) long long timestamp; | |||
@end | |||
NSString *BroadcastNutritionFoodScaleWeightUnitString(BroadcastNutritionFoodScaleWeightUnit unit); | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,39 @@ | |||
// | |||
// ELCM02_BatteryBleModel.h | |||
// AILinkBleSDK | |||
// | |||
// Created by cliCk on 2021/9/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <Foundation/Foundation.h> | |||
#import "ELCM02_BleHeader.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
/** 电池信息蓝牙数据模型 */ | |||
@interface ELCM02_BatteryBleModel : NSObject | |||
/** 电池温度,摄氏度 */ | |||
@property (nonatomic, assign) float tem; | |||
/** 电流状态 */ | |||
@property (nonatomic, assign) enum CM02_BatteryElectricCurrent_Type state; | |||
/** 电流 A 正数位放电电流,负数为充电电流 */ | |||
@property (nonatomic, assign) float electricCurrent; | |||
/** 电压 V */ | |||
@property (nonatomic, assign) float voltage; | |||
/** 电池总容量 mAh */ | |||
@property (nonatomic, assign) NSInteger capacitance; | |||
/** 电池充放电次数 */ | |||
@property (nonatomic, assign) NSInteger chargeTimes; | |||
+ (instancetype)instanceWithBleData:(NSData *)data; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,110 @@ | |||
// | |||
// ELCM02_BleHeader.h | |||
// AILinkBleSDK | |||
// | |||
// Created by cliCk on 2021/9/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#ifndef ELCM02_BleHeader_h | |||
#define ELCM02_BleHeader_h | |||
/** 蓝牙协议type定义 */ | |||
typedef NS_ENUM(NSInteger, CM02_BleDataType) { | |||
/** 查询设备支持功能 */ | |||
CM02_BleDataType_SupportFunction = 0x00 , | |||
/** 心跳数据交互 */ | |||
CM02_BleDataType_Heartbeat = 0x01 , | |||
/** 设置控制器状态 */ | |||
CM02_BleDataType_SetControl = 0x02 , | |||
/** 清除BM模块参数 */ | |||
CM02_BleDataType_ClearBMParam = 0x03 , | |||
/** 设置模式档位速度 */ | |||
CM02_BleDataType_SetupGear = 0x04 , | |||
/** 设置灯光 */ | |||
CM02_BleDataType_SetupLight = 0x05 , | |||
/** 设置解锁车密码 */ | |||
CM02_BleDataType_SetupPassworld = 0x06 , | |||
/** 锁车及解锁 */ | |||
CM02_BleDataType_LockOrUnlock = 0x07 , | |||
/** 售后密码查询 */ | |||
CM02_BleDataType_AfterSalesPassword = 0x08 , | |||
/** 查询单次行驶里程时间 */ | |||
CM02_BleDataType_SingleMileage = 0x0C , | |||
/** 查询总里程 */ | |||
CM02_BleDataType_TotalMileage = 0x0D , | |||
/** 查询电池信息 */ | |||
CM02_BleDataType_Battery = 0x0E , | |||
/** 查询控制器厂商代码及编号 */ | |||
CM02_BleDataType_ControlVersion = 0x10 , | |||
/** 查询仪表固件版本 */ | |||
CM02_BleDataType_DashboardVersion = 0x11 , | |||
}; | |||
/** 开机状态 */ | |||
typedef NS_ENUM(NSInteger, CM02_PoweronState_Type) { | |||
/** 开机状态 */ | |||
CM02_PoweronState_Type_Poweron = 0 , | |||
/** 准备关机 */ | |||
CM02_PoweronState_Type_ReadyShutDown , | |||
}; | |||
/** 公里制单位 */ | |||
typedef NS_ENUM(NSInteger, CM02_Unit_Type) { | |||
/** 公里制 */ | |||
CM02_Unit_Type_Kilometer = 0 , | |||
/** 英里制 */ | |||
CM02_Unit_Type_Mile = 1 , | |||
}; | |||
/** 模式 */ | |||
typedef NS_ENUM(NSInteger, CM02_Mode) { | |||
CM02_Mode_None = 0 , | |||
}; | |||
/** 密码是否正确枚举定义 */ | |||
typedef NS_ENUM(NSInteger, CM02_PasswordCorrect_Type) { | |||
/** 密码正确 */ | |||
CM02_PasswordCorrect_Type_Correct = 0 , | |||
/** 密码错误 */ | |||
CM02_PasswordCorrect_Type_Wrong = 1 , | |||
}; | |||
/** 开锁相关的功能枚举定义 */ | |||
typedef NS_ENUM(NSInteger, CM02_LockState_Type) { | |||
/** 解锁 */ | |||
CM02_LockState_Type_UnLock = 0 , | |||
/** 上锁 */ | |||
CM02_LockState_Type_Lock = 1 , | |||
/** 验证密码 */ | |||
CM02_LockState_Type_VerifyPassword = 2 , | |||
}; | |||
/** 结果枚举定义 */ | |||
typedef NS_ENUM(NSInteger, CM02_Result_Type) { | |||
/** 成功 */ | |||
CM02_Result_Type_Success = 0 , | |||
/** 失败 */ | |||
CM02_Result_Type_Faild , | |||
/** 不支持 */ | |||
CM02_Result_Type_NotSupport , | |||
}; | |||
/** 电池电流枚举定义 */ | |||
typedef NS_ENUM(NSInteger, CM02_BatteryElectricCurrent_Type) { | |||
/** 实时电流 */ | |||
CM02_BatteryElectricCurrent_Type_Real = 0 , | |||
/** 电流限流 */ | |||
CM02_BatteryElectricCurrent_Type_Limit = 1 , | |||
}; | |||
/** 设备类型 */ | |||
typedef NS_ENUM(NSInteger, CM02_DeviceType) { | |||
/** 仪表桥接:表示BM模块作为核心板,搭配客户的底板,作为仪表功能 */ | |||
CM02_DeviceType_InstrumentBridge = 0 , | |||
/** BLE透传:表示BM模块只提供BLE功能,作为透传模块,和客户的仪表通过uart连接,做透传功能 */ | |||
CM02_DeviceType_BlePassThrough = 1 , | |||
}; | |||
#endif /* ELCM02_BleHeader_h */ |
@@ -0,0 +1,126 @@ | |||
// | |||
// ELCM02_BleManager.h | |||
// AILinkBleSDK | |||
// | |||
// Created by cliCk on 2021/9/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import "ELBluetoothManager.h" | |||
#import "ELCM02_HeartbeatBleModel.h" | |||
#import "ELCM02_BatteryBleModel.h" | |||
#import "ELCM02_BleSupportFunctionModel.h" | |||
#import "ELCM02_BleHeader.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@protocol CM02_BleDelegate <NSObject> | |||
@optional | |||
- (void)CM02ManagerUpdateState:(enum ELBluetoothState)state; | |||
- (void)CM02ManagerScanDevices:(NSArray<ELPeripheralModel *> *_Nullable)CM02Devices; | |||
/** 返回设备支持的功能 */ | |||
- (void)CM02ManagerBackSupportFunctionModel:(ELCM02_BleSupportFunctionModel *)model; | |||
/** CM02返回设备心跳数据 */ | |||
- (void)CM02ManagerBackHeartbeatModel:(ELCM02_HeartbeatBleModel *)model; | |||
/** CM02回复修改密码结果 */ | |||
- (void)CM02ManagerBackUpdatePasswordResult:(enum CM02_Result_Type)result; | |||
/** CM02回复解锁和开锁状态 */ | |||
- (void)CM02ManagerBackLockState:(enum CM02_LockState_Type)lock passwordResult:(enum CM02_PasswordCorrect_Type)result; | |||
/** CM02回复售后密码 */ | |||
- (void)CM02ManagerBackAfterSalesPassword:(NSString *)afterSalesPassword; | |||
/** CM02回复单次行程和对应时间 */ | |||
- (void)CM02ManagerBackSingleMileage:(float)kmMileage time:(NSInteger)second; | |||
/** CM02回复总里程信息 */ | |||
- (void)CM02ManagerBackTotalMileage:(float)kmMileage; | |||
/** CM02回复电池信息 */ | |||
- (void)CM02ManagerBackBatteryBleModel:(ELCM02_BatteryBleModel *)model; | |||
/** CM02回复控制器编号,硬件版本号和软件版本号 */ | |||
- (void)CM02ManagerBackControlCode:(NSString *)code hardwareVersion:(NSString *)hardwareVersion softwareVersion:(NSString *)softwareVersion; | |||
/** CM02回复仪表编号,硬件版本和软件版本号 */ | |||
- (void)CM02ManagerBackDashboardCode:(NSString *)code hardwareVersion:(NSString *)hardwareVersion softwareVersion:(NSString *)softwareVersion; | |||
@end | |||
@interface ELCM02_BleManager : ELBluetoothManager | |||
@property (nonatomic, weak) id<CM02_BleDelegate> CM02Delegate; | |||
+ (ELCM02_BleManager *)shareManager; | |||
///** 查询接收端类型及支持的功能 */ | |||
- (void)getDeviceBaseInformation; | |||
/** 切换单位 */ | |||
- (void)changeUnit:(enum CM02_Unit_Type)unit; | |||
/** 定速巡航开关 */ | |||
- (void)setCruiseSwitch:(BOOL)state; | |||
/** 是否为非零速度启动 */ | |||
- (void)setSpeedStart:(BOOL)state; | |||
/** 恢复出厂设置 */ | |||
- (void)resetDevice; | |||
/** 清除除里程和时间外的其它控制器及仪表参数 */ | |||
- (void)clearOtherCacheData; | |||
/** 清除总里程 */ | |||
- (void)clearTotalMileage; | |||
/** 清除单次里程时间(设备一开机就会记录骑行时间和里程,当需要记录这些时间和里程的时候需要清除一下当次时间,重新开始记录) */ | |||
- (void)clearSingleTime; | |||
/** 设置档位(1-7) */ | |||
- (void)setGear:(NSInteger)gear; | |||
/** 开关灯 */ | |||
- (void)setLightState:(BOOL)state; | |||
/** 修改密码 */ | |||
- (void)updatePasswordWithOldPassword:(NSString *)oldPassword newPassword:(NSString *)newPassword; | |||
/** 解锁或者锁车(锁车无需传密码) */ | |||
- (void)setLockState:(enum CM02_LockState_Type)lock password:(NSString *)password; | |||
/** 查询售后密码 */ | |||
- (void)getAfterSalesPassword; | |||
/** 查询单次行驶里程和时间 */ | |||
- (void)getNowSingleMileageInformation; | |||
/** 查询总里程 */ | |||
- (void)getTotalMileageInformation; | |||
/** 查询电池信息 */ | |||
- (void)getBatteryInformation; | |||
/** 查询控制器厂商代码及编号 */ | |||
- (void)getControlVersion; | |||
/** 查询仪表盘固件版本 */ | |||
- (void)getDashboardVersion; | |||
#pragma mark - 断开设备清除缓存信息 | |||
- (void)cleanData; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,69 @@ | |||
// | |||
// ELCM02_BleSupportFunctionModel.h | |||
// AILinkBleSDK | |||
// | |||
// Created by cliCk on 2021/9/22. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <Foundation/Foundation.h> | |||
#import "ELCM02_BleHeader.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
/** CM02设备支持功能对象模型 */ | |||
@interface ELCM02_BleSupportFunctionModel : NSObject | |||
/** 设备类型 */ | |||
@property (nonatomic, assign) enum CM02_DeviceType deviceType; | |||
/** 是否支持自动背光 */ | |||
@property (nonatomic, assign) BOOL autoLight; | |||
/** 是否支持手动背光 */ | |||
@property (nonatomic, assign) BOOL manualLight; | |||
/** 支持的档位个数 */ | |||
@property (nonatomic, assign) NSInteger gearNum; | |||
/** 是否支持助力模式 */ | |||
@property (nonatomic, assign) BOOL helpMode; | |||
/** 定速巡航开关 */ | |||
@property (nonatomic, assign) BOOL cruiseControl; | |||
/** 是否支持零启动和非零启动切换 */ | |||
@property (nonatomic, assign) BOOL speedStartChange; | |||
/** 控制器厂商代码编号 */ | |||
@property (nonatomic, assign) BOOL controlCodeNum; | |||
/** 电池信息 */ | |||
@property (nonatomic, assign) BOOL batteryInformation; | |||
/** 电池厂商代码编号 */ | |||
@property (nonatomic, assign) BOOL batteryCodeNum; | |||
/** 右转灯开关 */ | |||
@property (nonatomic, assign) BOOL rightLightSwitch; | |||
/** 左转灯开关 */ | |||
@property (nonatomic, assign) BOOL leftLightSwitch; | |||
/** 氛围灯开关 */ | |||
@property (nonatomic, assign) BOOL ambientLightSwitch; | |||
/** 日行灯开关 */ | |||
@property (nonatomic, assign) BOOL daytimeRunningLightSwitch; | |||
/** 刹车灯开关 */ | |||
@property (nonatomic, assign) BOOL brakeLightSwitch; | |||
/** 前车灯开关 */ | |||
@property (nonatomic, assign) BOOL frontLightSwitch; | |||
+ (instancetype)instanceWithBleData:(NSData *)data; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,113 @@ | |||
// | |||
// ELCM02_HeartbeatBleModel.h | |||
// AILinkBleSDK | |||
// | |||
// Created by cliCk on 2021/9/13. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <Foundation/Foundation.h> | |||
#import "ELCM02_BleHeader.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
/** CM02设备心跳包数据模型 */ | |||
@interface ELCM02_HeartbeatBleModel : NSObject | |||
/** 是否正在充电 */ | |||
@property (nonatomic, assign) BOOL charging; | |||
/** 电池电量 */ | |||
@property (nonatomic, assign) NSUInteger power; | |||
/** 车辆速度 */ | |||
@property (nonatomic, assign) float speed; | |||
/** 开机状态 */ | |||
@property (nonatomic, assign) enum CM02_PoweronState_Type poweronState; | |||
/** 是否为推行模式,否则为正常行驶 */ | |||
@property (nonatomic, assign) BOOL pursueMode; | |||
/** 是否为巡航状态 */ | |||
@property (nonatomic, assign) BOOL cruiseState; | |||
/** 单位 */ | |||
@property (nonatomic, assign) enum CM02_Unit_Type unit; | |||
/** 是否为助力模式 */ | |||
@property (nonatomic, assign) BOOL helpMode; | |||
/** 巡航功能开关状态 */ | |||
@property (nonatomic, assign) BOOL cruiseSwitchState; | |||
/** 是否为非零速度启动 */ | |||
@property (nonatomic, assign) BOOL speedStart; | |||
/** 车辆是否被锁 */ | |||
@property (nonatomic, assign) BOOL isLocked; | |||
/** 模式 */ | |||
@property (nonatomic, assign) enum CM02_Mode mode; | |||
/** 档位(1-7) */ | |||
@property (nonatomic, assign) NSInteger gear; | |||
/** 转把是否有效 */ | |||
@property (nonatomic, assign) BOOL turnHandleEffective; | |||
/** 电子刹车是否再刹车 */ | |||
@property (nonatomic, assign) BOOL electronicBrakeState; | |||
/** 机械刹车是否再刹车 */ | |||
@property (nonatomic, assign) BOOL mechanicalBrakeState; | |||
/** 电机是否再运行 */ | |||
@property (nonatomic, assign) BOOL motorState; | |||
/** 右转向灯是否开启 */ | |||
@property (nonatomic, assign) BOOL rightLightState; | |||
/** 左转向灯是否开启 */ | |||
@property (nonatomic, assign) BOOL leftLightState; | |||
/** 氛围灯是否开启 */ | |||
@property (nonatomic, assign) BOOL atmosphereLightState; | |||
/** 日行灯是否开启 */ | |||
@property (nonatomic, assign) BOOL daytimeRunningLightState; | |||
/** 刹车灯是否开启 */ | |||
@property (nonatomic, assign) BOOL brakeLightState; | |||
/** 前车灯开关 */ | |||
@property (nonatomic, assign) BOOL lightState; | |||
/** 电池是否有故障 */ | |||
@property (nonatomic, assign) BOOL batteryState; | |||
/** 控制器是否有故障 */ | |||
@property (nonatomic, assign) BOOL controlState; | |||
/** 电机相线或者MOS管短路是否有故障 */ | |||
@property (nonatomic, assign) BOOL MOSState; | |||
/** 电机霍尔是否有故障 */ | |||
@property (nonatomic, assign) BOOL hallState; | |||
/** 刹车是否有故障 */ | |||
@property (nonatomic, assign) BOOL brakeState; | |||
/** 转把是否有故障 */ | |||
@property (nonatomic, assign) BOOL turnHandleState; | |||
/** 通讯是否有故障 */ | |||
@property (nonatomic, assign) BOOL communicationsState; | |||
/** 单次行驶里程距离,使用当前单位 */ | |||
@property (nonatomic, assign) float distance; | |||
/** 单次行驶时间,秒 */ | |||
@property (nonatomic, assign) NSInteger drivingTime; | |||
/** 升级状态 */ | |||
@property (nonatomic, assign) BOOL upgradeStatus; | |||
+ (instancetype)instanceWithBleData:(NSData *)data; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,59 @@ | |||
// | |||
// ELCoffeeScaleBleDataModel.h | |||
// Elink | |||
// | |||
// Created by iot_user on 2020/9/30. | |||
// Copyright © 2020 iot_iMac. All rights reserved. | |||
// | |||
#import <Foundation/Foundation.h> | |||
#import <UIKit/UIKit.h> | |||
#import "ELCoffeeScaleBleHeader.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface ELCoffeeScaleBleDataModel : NSObject | |||
/** 是否为稳定数据 */ | |||
@property (nonatomic, assign) BOOL stableData; | |||
/** 质量单位 */ | |||
@property (nonatomic, assign) ELDeviceWeightUnit weightUnit; | |||
/** 质量值 */ | |||
@property (nonatomic, copy) NSString *weightString; | |||
/** 质量值 */ | |||
@property (nonatomic, assign) CGFloat weightValue; | |||
/** 温度单位 */ | |||
@property (nonatomic, assign) ELDeviceTemperatureUnit temUnit; | |||
/** 温度值 */ | |||
@property (nonatomic, assign) CGFloat tem; | |||
/** 时间戳 */ | |||
@property (nonatomic, assign) NSTimeInterval timestamp; | |||
//质量正负标识 | |||
@property (nonatomic, assign) BOOL rawWeightNegative; | |||
//质量小数点位 | |||
@property (nonatomic, assign) NSInteger rawWeightPoint; | |||
//质量 | |||
@property (nonatomic, assign) NSInteger rawWeight; | |||
//异常状态 0无异常 1超重 | |||
@property (nonatomic, assign) NSInteger error; | |||
+ (instancetype)dataWithPayloadData:(NSData *)data; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,44 @@ | |||
// | |||
// ELCoffeeScaleBleHeader.h | |||
// Elink | |||
// | |||
// Created by iot_user on 2020/9/30. | |||
// Copyright © 2020 iot_iMac. All rights reserved. | |||
// | |||
#ifndef ELCoffeeScaleBleHeader_h | |||
#define ELCoffeeScaleBleHeader_h | |||
#import "ELSDKHeader.h" | |||
/** 咖啡秤电池充电状态枚举定义 */ | |||
typedef NS_ENUM(NSInteger, CoffeeChargingType) { | |||
/** 没有充电 */ | |||
CoffeeChargingType_NoCharging = 0 , | |||
/** 充电中 */ | |||
CoffeeChargingType_Charging , | |||
/** 充满电 */ | |||
CoffeeChargingType_FullyCharged , | |||
/** 充电异常 */ | |||
CoffeeChargingType_AbnormalCharging , | |||
}; | |||
/** 咖啡秤设置结果枚举定义 */ | |||
typedef NS_ENUM(NSInteger, CoffeeSetResultType) { | |||
/** 成功 */ | |||
CoffeeSetResultType_Success = 0 , | |||
/** 失败 */ | |||
CoffeeSetResultType_Failure = 1 , | |||
/** 不支持 */ | |||
CoffeeSetResultType_NotSupport = 2 , | |||
}; | |||
typedef NS_ENUM(NSUInteger, ELCoffeeScaleTimerControl) { | |||
ELCoffeeScaleTimerControl_count = 0x01,//计时 | |||
ELCoffeeScaleTimerControl_pause = 0x02,//暂停 | |||
ELCoffeeScaleTimerControl_reset = 0x03,//重置 | |||
}; | |||
#endif /* ELCoffeeScaleBleHeader_h */ |
@@ -0,0 +1,94 @@ | |||
// | |||
// ELCoffeeScaleBleManager.h | |||
// Elink | |||
// | |||
// Created by iot_user on 2020/9/30. | |||
// Copyright © 2020 iot_iMac. All rights reserved. | |||
// | |||
#import "ELBluetoothManager.h" | |||
#import "ELCoffeeScaleBleHeader.h" | |||
#import "ELCoffeeScaleBleDataModel.h" | |||
@protocol CoffeeScaleBleDelegate <NSObject> | |||
@optional | |||
/// 蓝牙连接状态 | |||
/// @param state 连接状态 | |||
- (void)deviceBleReceiveState:(ELBluetoothState)state; | |||
/// 附近的设备 | |||
/// @param devices 设备列表 | |||
- (void)deviceBleReceiveDevices:(NSArray<ELPeripheralModel *> *_Nullable)devices; | |||
//获得支持单位列表 | |||
- (void)supportWeightUnits:(NSArray *_Nullable)weightArray; | |||
//正在连接中倒计时 | |||
- (void)deviceBleCountDown:(NSInteger)count; | |||
/** 返回咖啡秤称量的数据模型 */ | |||
- (void)coffeeScaleBleReceiveStatusDataModel:(ELCoffeeScaleBleDataModel *_Nonnull)model; | |||
/** 返回设备电量 */ | |||
- (void)coffeeScaleBleRechargeState:(CoffeeChargingType)type powerNumber:(NSInteger)power; | |||
/** 返回报警设置指令设置结果 */ | |||
- (void)coffeeScaleAlarmSystemState:(CoffeeSetResultType)state; | |||
/** 返回计时设置指令设置结果 */ | |||
- (void)coffeeScaleBleReceiveSupportCountTime:(CoffeeSetResultType)state; | |||
//计时功能控制 | |||
- (void)coffeeScaleBleReceiveTimerControl:(BOOL)countdown duration:(NSUInteger)duration control:(ELCoffeeScaleTimerControl)control; | |||
@end | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface ELCoffeeScaleBleManager : ELBluetoothManager | |||
@property (nonatomic, weak) id<CoffeeScaleBleDelegate> coffeeScaleDelegate; | |||
+ (instancetype)shareManager; | |||
- (void)autoScan; | |||
- (void)stopAutoScan; | |||
- (void)checkStatus; | |||
//APP 下发归零 | |||
- (void)sendMakeZero; //A7 00 24 LEN *02 *01 SUM 7A | |||
//APP 下发单位设置 | |||
- (void)sendWeightUnit:(ELDeviceWeightUnit)unit; //A7 00 24 LEN *04 *[00~06] SUM 7A | |||
- (void)sendTemperatureUnit:(ELDeviceTemperatureUnit)unit; //A7 00 24 LEN *06 *[00~01] SUM 7A | |||
- (void)sendBeepOn:(BOOL)on; | |||
//APP 下发自动关机设置 | |||
- (void)sendPowerOffDuration:(NSInteger)duration; //A7 00 24 LEN *08 [*00 *00 ~ *FF *FE] SUM 7A | |||
/** APP 设置报警指令 | |||
* @param state : 开关 | |||
* @param duration : 报警持续时间值,单位s | |||
*/ | |||
- (void)sendAlarmInstructionWithState:(BOOL)state duration:(NSInteger)duration; | |||
/** 停止报警指令 */ | |||
- (void)sendStopAlarmInstruction; | |||
//APP 下发计时控制 control:1计时2暂停3重置 countdown:YES倒计时NO正计时 | |||
- (void)sendTimeControlDuration:(NSInteger)duration control:(ELCoffeeScaleTimerControl)control countdown:(BOOL)countdown; //A7 00 24 *0A *[00~01] [*00 *00 ~ *FF *FE] *[00~03] SUM 7A | |||
//退出冲煮或称重:(appMode:0 subMode:1) 冲煮:(appMode:1 subMode:0) 称重:(appMode:1 subMode:1) | |||
- (void)sendSwithAppMode:(BOOL)appMode subMode:(Byte)subMode; //A7 00 24 LEN *11 *[00~01] *[00~01] SUM 7A | |||
@end | |||
@interface ELCoffeeScaleBleManager () | |||
@property (nonatomic, assign) NSInteger supportTimer;//0 未检测 1 支持 2 不支持 | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,96 @@ | |||
// | |||
// ELEightScaleBleBfrDataModel.h | |||
// AILinkBleSDK | |||
// | |||
// Created by cliCk on 2021/8/25. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <Foundation/Foundation.h> | |||
#import "ELEightScaleSDKHeader.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
/** 秤端计算的体脂数据 */ | |||
@interface ELEightScaleBleBfrDataModel : NSObject | |||
@property (nonatomic, assign) float BMI; | |||
/** 全身体脂率 % */ | |||
@property (nonatomic, assign) float bodyBfr; | |||
/** 全身肌肉率 % */ | |||
@property (nonatomic, assign) float bodyRom; | |||
/** 左上肢脂肪量 kg */ | |||
@property (nonatomic, assign) float leftHandFatMass; | |||
/** 右上肢脂肪量 kg */ | |||
@property (nonatomic, assign) float rightHandFatMass; | |||
/** 躯干脂肪量 kg */ | |||
@property (nonatomic, assign) float bodyFatMass; | |||
/** 左下肢脂肪量 kg */ | |||
@property (nonatomic, assign) float leftFootFatMass; | |||
/** 右下肢脂肪量 kg */ | |||
@property (nonatomic, assign) float rightFootFatMass; | |||
/** 左上肢肌肉量 kg */ | |||
@property (nonatomic, assign) float leftHandMuscleMass; | |||
/** 右上肢肌肉量 kg */ | |||
@property (nonatomic, assign) float rightHandMuscleMass; | |||
/** 躯干肌肉量 kg */ | |||
@property (nonatomic, assign) float bodyMuscleMass; | |||
/** 左下肢肌肉量 kg */ | |||
@property (nonatomic, assign) float leftFootMuscleMass; | |||
/** 右下肢肌肉量 kg */ | |||
@property (nonatomic, assign) float rightFootMuscleMass; | |||
/** 身体水分 % */ | |||
@property (nonatomic, assign) float bodyWater; | |||
/** 骨重 kg */ | |||
@property (nonatomic, assign) float BoneMass; | |||
/** 基础代谢率 kcal */ | |||
@property (nonatomic, assign) int BMR; | |||
/** 蛋白率 % */ | |||
@property (nonatomic, assign) float ProteinRate; | |||
/** 内脏脂肪指数 */ | |||
@property (nonatomic, assign) int uvi; | |||
/** 皮下脂肪 % */ | |||
@property (nonatomic, assign) float sfr; | |||
/** 身高 cm */ | |||
@property (nonatomic, assign) int height; | |||
/** 身体年龄 */ | |||
@property (nonatomic, assign) int bodyAge; | |||
@end | |||
/** 八电极需要用户数据对象模型 */ | |||
@interface ELEightScaleBleUserModel : NSObject | |||
/** 用户特征 */ | |||
@property (nonatomic, assign) enum EightScaleRole role; | |||
/** 当前用户所属好身材用户编号 */ | |||
@property (nonatomic, assign) int number; | |||
/** 性别 1男,0女 */ | |||
@property (nonatomic, assign) int gender; | |||
/** 年龄 */ | |||
@property (nonatomic, assign) int age; | |||
/** 身高 cm */ | |||
@property (nonatomic, assign) int height; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -9,6 +9,7 @@ | |||
#import "ELBluetoothManager.h" | |||
#import "ELEightScaleSDKHeader.h" | |||
#import "ELEightScaleBleDataModel.h" | |||
#import "ELEightScaleBleBfrDataModel.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@@ -59,6 +60,23 @@ NS_ASSUME_NONNULL_BEGIN | |||
/// Switch weight unit result(切换体重单位结果) | |||
/// @param result 结果 | |||
-(void)eightScaleBleReceiveSwitchWeightUnitResult:(EightScaleSwitchUnitResult)result; | |||
///MCU上报身高数据 | |||
- (void)eightScaleBleReportHeightDataWithHeight:(NSInteger)height unit:(ELDeviceHeightUnit)unit testStatus:(enum EightScaleTestStatus)status; | |||
///MCU请求用户信息 | |||
- (void)eightScaleBleGetUserData; | |||
///MCU返回设备测量信息(测量完成的时候才会回调该方法) | |||
- (void)eightScaleBleReportTestData:(ELEightScaleBleDataModel *)dataModle bfrData:(ELEightScaleBleBfrDataModel *)bfrDataModle; | |||
/** MCU返回操作结果 */ | |||
- (void)eightScaleBleReportOperationWithType:(enum EightScaleOperationType)type unitResult:(enum EightScaleSwitchUnitResult)result; | |||
/** 设备上发错误码 */ | |||
- (void)eightScaleBleReportErrorCode:(enum EightScaleErrorCodeType)type; | |||
@end | |||
@interface ELEightScaleBleManager : ELBluetoothManager | |||
@@ -82,6 +100,17 @@ NS_ASSUME_NONNULL_BEGIN | |||
/// Switch temperature unit(切换温度单位) | |||
/// @param unit Temperature unit(温度单位) | |||
-(void)eightScaleSwitchTempUnit:(ELDeviceTemperatureUnit)unit; | |||
/** 设置用户信息 */ | |||
- (void)eightScaleSendUserDataWithUserModel:(ELEightScaleBleUserModel *)model; | |||
/** 回复测量完成 */ | |||
- (void)eightScaleSendEndTest; | |||
/** 下发操作指令 */ | |||
- (void)eightScaleSendOperationWithType:(enum EightScaleOperationType)type unit:(NSInteger)unit; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -36,6 +36,7 @@ typedef NS_ENUM(NSUInteger, EightScaleAdcTestStep) { | |||
//测阻抗成功,带上阻抗数据,并使用APP算法(APP 会根据byte7的算法标识进行计算) | |||
EightScaleAdcTestStepSuccess = 0x03, | |||
EightScaleAdcTestStepTestEnd = 0x04,//End of impedance measurement.(测阻抗结束。) | |||
EightScaleAdcBfrTestStepSuccess = 0x05, //阻抗测量成功,并使用 MCU 端算法。体脂算法 ID=0。 | |||
}; | |||
// 阻抗类型 | |||
typedef NS_ENUM(NSUInteger, EightScaleAdcType) { | |||
@@ -98,4 +99,64 @@ typedef NS_ENUM(NSUInteger, EightScaleTestStatus) { | |||
EightScaleTestStatusError = 3,//Error(测量出错) | |||
}; | |||
/** 八电极设备mcuhead枚举定义 */ | |||
typedef NS_ENUM(NSUInteger, EightScale_MCU_HeadType) { | |||
/** 上报称重状态 */ | |||
EightScale_MCU_HeadType_ReportWeightData = 0x01 , | |||
/** 上报阻抗数据 */ | |||
EightScale_MCU_HeadType_ReportADC = 0x02 , | |||
/** 上报心率数据 */ | |||
EightScale_MCU_HeadType_ReportHeartRate = 0x03 , | |||
/** 发送温度数据 */ | |||
EightScale_MCU_HeadType_ReportTem = 0x04 , | |||
/** 上报身高数据 */ | |||
EightScale_MCU_HeadType_ReportHeightData = 0x05 , | |||
/** 请求用户信息 */ | |||
EightScale_MCU_HeadType_RequestUserData = 0x08 , | |||
/** 发送体脂数据 */ | |||
EightScale_MCU_HeadType_ReportBodyFatData = 0x09 , | |||
/** 发送测量完成 */ | |||
EightScale_MCU_HeadType_ReportCompleted = 0x0F , | |||
/** 下发操作指令 */ | |||
EightScale_MCU_HeadType_SendOperation = 0x81 , | |||
/** 回复操作结果 */ | |||
EightScale_MCU_HeadType_ReportOperation = 0x82 , | |||
/** 回复测量完成 */ | |||
EightScale_MCU_HeadType_SendCompleted = 0x84 , | |||
/** 设备上发错误码 */ | |||
EightScale_MCU_HeadType_ReportErrorCode = 0xFF , | |||
}; | |||
//Character(角色) 同四电极体脂秤枚举 | |||
typedef NS_ENUM(NSUInteger, EightScaleRole) { | |||
EightScaleRole_Ordinary = 0x00,//Ordinary(普通人) | |||
EightScaleRole_Athlete = 0x01,//Athlete(业余运动员) | |||
EightScaleRole_AthletePro = 0x02,//AthletePro(专业运动员) | |||
EightScaleRole_Pregnancy = 0x03,//Pregnancy(孕妇) | |||
}; | |||
///app下发指令操作枚举定义 | |||
typedef NS_ENUM(NSUInteger, EightScaleOperationType) { | |||
/** 校准 */ | |||
EightScaleOperationType_Calibration = 0x01 , | |||
/** 温度单位切换 */ | |||
EightScaleOperationType_UpdateTemUnit , | |||
/** 重量单位切换 */ | |||
EightScaleOperationType_UpdateWeightUnit , | |||
/** 身高单位切换 */ | |||
EightScaleOperationType_UpdateHeightUnit , | |||
}; | |||
///设备上发错误码 | |||
typedef NS_ENUM(NSUInteger, EightScaleErrorCodeType) { | |||
/** 超重 */ | |||
EightScaleErrorCodeType_Overweight = 0x01 , | |||
} ; | |||
#endif /* ELEightScaleSDKHeader_h */ |
@@ -0,0 +1,72 @@ | |||
// | |||
// ELEncryptTool.h | |||
// AILinkSDK | |||
// | |||
// Created by iot_user on 2019/5/7. | |||
// Copyright © 2019 IOT. All rights reserved. | |||
// | |||
#import <Foundation/Foundation.h> | |||
#import "ELSDKHeader.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface ELEncryptTool : NSObject | |||
/** | |||
app与ble握手的数据 | |||
@return:app与ble握手的数据 | |||
*/ | |||
+(NSData *)handshake; | |||
/** | |||
将蓝牙发送的请求握手数据的3〜18位数据加密后再得到符合条件的数据发送给蓝牙 | |||
@param receiveData 蓝牙发送的请求握手数据的3〜18位数据 | |||
@return 送给蓝牙的握手验证数据 | |||
*/ | |||
+(NSData *)blueToothHandshakeWithData:(NSData *)receiveData; | |||
/** | |||
加密验证方法1 | |||
@param handshake 3-18位置的数据 | |||
@return:加密后的数据 | |||
*/ | |||
+ (NSData *)encryptTEA:(NSData * _Nonnull)handshake; | |||
/** | |||
TEA加密 | |||
@param v 要加密的数据 | |||
@param k 密钥 | |||
*/ | |||
+ (void)encrypt_tea:(uint32_t *)v key:(uint32_t *)k; | |||
/** | |||
加密验证方法2 | |||
@param macXOR mac地址对应的数据,传ELPeripheralModel的macXOR | |||
@param deviceTypeXOR 设备类型对应的数据,传ELPeripheralModel的deviceTypeXOR | |||
@param dataXOR 要加密的数据 | |||
@return 加密后的数据 | |||
*/ | |||
+ (NSData *)encryptXOR:(NSData *)macXOR deviceTypeXOR:(NSData *)deviceTypeXOR withXORData:(NSData *)dataXOR; | |||
/// 对广播设备数据进行加密 | |||
/// @param handshake 原始数据 | |||
/// @param cid cid | |||
/// @param vid vid | |||
/// @param pid pid | |||
+ (NSData *)broadcastDecryptTEA:(NSData * _Nonnull)handshake cid:(Byte)cid vid:(Byte)vid pid:(Byte)pid; | |||
///对跳绳数据进行加密 | |||
+ (NSData *)skipEncryptTEA:(NSData *_Nonnull)baseData; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,47 @@ | |||
// | |||
// ELFaceMaskBleDataModel.h | |||
// Elink | |||
// | |||
// Created by iot_user on 2020/9/30. | |||
// Copyright © 2020 iot_iMac. All rights reserved. | |||
// | |||
#import <Foundation/Foundation.h> | |||
#import "ELFaceMaskBleHeader.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface ELFaceMaskBleDataModel : NSObject | |||
@property (nonatomic, assign) int index;//空气质量指数,大端序 无效则该值为 65535 | |||
/* | |||
风扇状态 | |||
0:关闭状态 | |||
1:1 档状态 | |||
2:2 档状态 | |||
*/ | |||
@property (nonatomic, assign) FaceMaskFanStatus fanStatus; | |||
//电池电量,单位 % 0-100 | |||
@property (nonatomic, assign) int battery; | |||
/* | |||
电池状态 | |||
1:充电 | |||
2:非充电 如该值无效则为 0xFF | |||
*/ | |||
@property (nonatomic, assign) FaceMaskBatteryStatus batteryStatus; | |||
//电池续航 大端序。单位:分钟 无效则该值为 65535 | |||
@property (nonatomic, assign) int batteryLife; | |||
//呼吸频率 单位,次/min | |||
@property (nonatomic, assign) int breathRate; | |||
/* | |||
呼吸状态 | |||
1:呼气 | |||
2:吸气 无效则该值为 0xFF | |||
*/ | |||
@property (nonatomic, assign) FaceMaskBreathStatus breathStatus; | |||
//滤网的总工作时长 大端序,单位:min | |||
@property (nonatomic, assign) int workTime; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,59 @@ | |||
// | |||
// ELFaceMaskBleHeader.h | |||
// Elink | |||
// | |||
// Created by iot_user on 2020/9/30. | |||
// Copyright © 2020 iot_iMac. All rights reserved. | |||
// | |||
#ifndef ELFaceMaskBleHeader_h | |||
#define ELFaceMaskBleHeader_h | |||
#import "ELSDKHeader.h" | |||
/* | |||
风扇状态 | |||
0:关闭状态 | |||
1:1 档状态 | |||
2:2 档状态 | |||
*/ | |||
typedef NS_ENUM(NSUInteger, FaceMaskFanStatus) { | |||
FaceMaskFanStatusClose = 0x00, | |||
FaceMaskFanStatusFirstGear = 0x01, | |||
FaceMaskFanStatusSecondGear = 0x02, | |||
}; | |||
/* | |||
电池状态 | |||
1:充电 | |||
2:非充电 | |||
如该值无效则为 0xFF | |||
*/ | |||
typedef NS_ENUM(NSUInteger, FaceMaskBatteryStatus) { | |||
FaceMaskBatteryStatusRecharge = 1, | |||
FaceMaskBatteryStatusNoRecharge = 2, | |||
FaceMaskBatteryStatusInvalid = 0xFF, | |||
}; | |||
/* | |||
呼吸状态 | |||
1:呼气 | |||
2:吸气 无效则该值为 0xFF | |||
*/ | |||
typedef NS_ENUM(NSUInteger, FaceMaskBreathStatus) { | |||
FaceMaskBreathStatusExhale = 1, | |||
FaceMaskBreathStatusInhale = 2, | |||
FaceMaskBreathStatusInvalid = 0xFF, | |||
}; | |||
/* | |||
风扇控制结果 | |||
0x00:成功 0x01:失败,电量不足 0x02:不支持 0x03:失败,风扇已坏 | |||
*/ | |||
typedef NS_ENUM(NSUInteger, FaceMaskFanControlResult) { | |||
FaceMaskFanControlResultSuccess = 0, | |||
FaceMaskFanControlResultFailed = 1, | |||
FaceMaskFanControlResultUnsupported = 2, | |||
FaceMaskFanControlResultFault = 3, | |||
}; | |||
#endif /* ELFaceMaskBleHeader_h */ |
@@ -0,0 +1,60 @@ | |||
// | |||
// ELFaceMaskBleManager.h | |||
// Elink | |||
// | |||
// Created by iot_user on 2020/9/30. | |||
// Copyright © 2020 iot_iMac. All rights reserved. | |||
// | |||
#import "ELBluetoothManager.h" | |||
#import "ELFaceMaskBleHeader.h" | |||
#import "ELFaceMaskBleDataModel.h" | |||
@protocol FaceMaskBleDelegate <NSObject> | |||
@optional | |||
/// 蓝牙连接状态 | |||
/// @param state 连接状态 | |||
- (void)faceMaskBleReceiveState:(ELBluetoothState)state; | |||
/// 附近的设备 | |||
/// @param devices 设备列表 | |||
- (void)faceMaskBleReceiveDevices:(NSArray<ELPeripheralModel *> *_Nullable)devices; | |||
- (void)faceMaskBleReceiveStatusDataModel:(ELFaceMaskBleDataModel *_Nonnull)model; | |||
- (void)faceMaskReplaceSuccess:(BOOL)success; | |||
- (void)faceMaskSwitchFanResult:(FaceMaskFanControlResult)result; | |||
- (void)faceMaskPoweroffSuccess:(BOOL)success; | |||
@end | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface ELFaceMaskBleManager : ELBluetoothManager | |||
@property (nonatomic, weak) id<FaceMaskBleDelegate> faceMaskDelegate; | |||
@property (nonatomic, assign) FaceMaskFanStatus fanStatus; | |||
@property (nonatomic, assign) NSInteger filterWorkTime; | |||
@property (nonatomic, assign) int battery; | |||
+ (instancetype)shareManager; | |||
//APP 获取设备状态 | |||
- (void)queryFaceMaskStatusData; | |||
//APP 下发更换滤网指令 | |||
- (void)replaceFilter; | |||
//APP 下发风扇控制指令 | |||
- (void)switchFanStatus:(FaceMaskFanStatus)status; | |||
//APP 下发关机指令 | |||
- (void)powerOff; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,67 @@ | |||
// | |||
// ELFoodThermometerBleManager.h | |||
// Elink | |||
// | |||
// Created by LarryZhang on 2021/4/23. | |||
// Copyright © 2021 iot_iMac. All rights reserved. | |||
// | |||
#import "ELBluetoothManager.h" | |||
#import "ELFoodThermometerHead.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@protocol FoodThermometerBleDelegate <NSObject> | |||
@optional | |||
//Bluetooth status callback(回调蓝牙状态) | |||
- (void)deviceBleReceiveState:(ELBluetoothState)state; | |||
//Callback FoodThermometer device list(回调设备列表) | |||
- (void)deviceBleReceiveDevices:(NSArray<ELPeripheralModel *> *)devices; | |||
//设备返回基础信息 | |||
- (void)foodThermometerBasicInfo:(BasicInfo)basicInfo; | |||
//设备返回数据状态 | |||
- (void)foodThermometerProbeStatus:(ProbeStatus)probeStatus; | |||
//设备设置温度 | |||
- (void)foodThermometerSwitchTemperatureUnit:(ELDeviceTemperatureUnit)unit; | |||
@end | |||
@interface ELFoodThermometerBleManager : ELBluetoothManager | |||
@property(nonatomic, weak) id <FoodThermometerBleDelegate> foodThermometerBleDelegate; | |||
+ (instancetype)shareManager; | |||
- (void)autoScan; | |||
- (void)stopAutoScan; | |||
- (void)checkStatus; | |||
@end | |||
//发送数据给设备 | |||
@interface ELFoodThermometerBleManager (cmd) | |||
//获取基础信息 A7 01 | |||
- (void)checkDeviceInfo; | |||
//切换温度单位 A7 04 | |||
- (void)switchTemperatureUnit:(ELDeviceTemperatureUnit)unit; | |||
//取消报警 A7 06 | |||
- (void)cancelAlarm:(NSUInteger)probeIndex; | |||
//设置目标温度 A7 08 | |||
- (void)setTarget:(NSUInteger)probeIndex temperature:(NSInteger)temperature unit:(ELDeviceTemperatureUnit)unit; | |||
//设置定时时长 A7 0A | |||
- (void)setTarget:(NSUInteger)probeIndex duration:(NSUInteger)duration; | |||
//启动关闭设备探针 A7 12 | |||
- (void)setProbe:(NSUInteger)probeIndex start:(BOOL)start; | |||
//下发时间 A7 10 | |||
- (void)sendCurrentTime; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,71 @@ | |||
// | |||
// ELFoodThermometerHead.h | |||
// Elink | |||
// | |||
// Created by LarryZhang on 2021/4/23. | |||
// Copyright © 2021 iot_iMac. All rights reserved. | |||
// | |||
#ifndef ELFoodThermometerHead_h | |||
#define ELFoodThermometerHead_h | |||
#import "ELSDKHeader.h" | |||
typedef NS_ENUM(NSUInteger, FoodThermometerProtocol) {//cmd:命令 sta:状态 ack:应答 | |||
FoodThermometerProtocol_AppGetBasicInfo_cmd_A701 = 0x01, //APP-获取设备基础信息 | |||
FoodThermometerProtocol_DeviceBasicInfo_sta_A702 = 0x02, //MCU-上发设备基础信息 | |||
FoodThermometerProtocol_DeviceDataInfo_sta_A703 = 0x03, //MCU-上发数据状态 | |||
FoodThermometerProtocol_AppSetUnit_cmd_A704 = 0x04, //APP-切换单位 | |||
FoodThermometerProtocol_DeviceSetUnit_ack_A705 = 0x05, //MCU-切换单位ack | |||
FoodThermometerProtocol_AppDeviceSetAlarm_cmd_A706 = 0x06, //APP-MCU-同步取消报警 | |||
FoodThermometerProtocol_AppDeviceSetAlarm_ack_A707 = 0x07, //APP-MCU-同步取消报警ack | |||
FoodThermometerProtocol_AppSetTempPre_cmd_A708 = 0x08, //APP-设置目标温度 | |||
FoodThermometerProtocol_DeviceSetUnit_ack_A709 = 0x09, //MCU-设置目标温度ack | |||
FoodThermometerProtocol_AppSetDuration_cmd_A70A = 0x0A, //APP-设置定时时间时长 | |||
FoodThermometerProtocol_DeviceSetDuration_ack_A70B = 0x0B, //MCU-设置定时时间时长ack | |||
FoodThermometerProtocol_AppDeviceSetPower_cmd_A70C = 0x0C, //APP-MCU-开始结束指令 | |||
FoodThermometerProtocol_AppDeviceSetPower_ack_A70D = 0x0D, //APP-MCU-开始结束指令ack | |||
FoodThermometerProtocol_AppSetDateTime_cmd_A710 = 0x10, //APP-下发时间 | |||
FoodThermometerProtocol_DeviceSetDateTime_ack_A711 = 0x11, //MCU-下发时间ack | |||
FoodThermometerProtocol_AppDeviceSetStart_cmd_A712 = 0x12, //APP-MCU-启动关闭设备探针 | |||
FoodThermometerProtocol_AppDeviceSetStart_ack_A713 = 0x13, //APP-MCU-启动关闭设备探针 | |||
}; | |||
//A7 02 | |||
//MCU 上发基础信息 | |||
typedef struct { | |||
//探针总数量 | |||
Byte probeCount; | |||
//电池充电状态 | |||
Byte charging; | |||
//电量(若无电量检测功能,则该值为0xFF) | |||
Byte batteryLevel; | |||
//当前温度 | |||
Byte curTemperatureUnit; | |||
//异常报警类型 | |||
Byte alarmType; | |||
//设备支持烧烤模式 | |||
Byte mode; | |||
//设备支持报警模式 | |||
Byte alarmMode; | |||
} BasicInfo; | |||
//A7 03 | |||
//MCU上发数据状态 | |||
typedef struct { | |||
Byte index;//探针编号 1~8 | |||
Byte working;//探针是否插入设备状态 | |||
UInt16 internalRawTemperature;//实时温度 | |||
UInt16 ambientRawTemperature;//环境温度 | |||
UInt16 targetRawTemperature;//目标温度 | |||
Byte inserting;//探针状态是否已插入肉内 | |||
Byte started;//探针状态是否已启动报警功能,关联app Start | |||
Byte mode;//模式0:烤架。1:烤箱 | |||
UInt16 duration;//定时时间(大端序,单位min。若无,则该值为0xFFFF) | |||
Byte alarmType;//报警类型 0:无报警 1:温度达到报警 2:定时达到报警 | |||
} ProbeStatus; | |||
#endif /* ELFoodThermometerHead_h */ |
@@ -24,7 +24,7 @@ typedef NS_ENUM(NSUInteger, ForeheadBleDataType) { | |||
ForeheadBleDataTypeFailCode = 0xFF, //Report an error message(上报错误信息) | |||
}; | |||
@class ELPeripheralModel; | |||
@protocol ELForeheadBleManagerDelegate <NSObject> | |||
@optional | |||
@@ -0,0 +1,44 @@ | |||
// | |||
// ELHeightBodyFatScaleBleWeightBodyModel.h | |||
// AILinkBleSDK | |||
// | |||
// Created by cliCk on 2021/3/25. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <Foundation/Foundation.h> | |||
NS_ASSUME_NONNULL_BEGIN | |||
/** 体脂数据对象模型 */ | |||
@interface ELHeightBodyFatScaleBleWeightBodyModel : NSObject | |||
///Body fat rate, need / 10(体脂率,需要/10) | |||
@property (nonatomic, assign) NSUInteger bfr; | |||
///Subcutaneous fat rate, need / 10(皮下脂肪率,需要/10) | |||
@property (nonatomic, assign) NSUInteger sfr; | |||
///Visceral fat rate with an accuracy of 1(内脏脂肪率,精度为1) | |||
@property (nonatomic, assign) NSUInteger uvi; | |||
///Muscle rate, need / 10(肌肉率,需要/10) | |||
@property (nonatomic, assign) NSUInteger rom; | |||
///Basal metabolic rate with an accuracy of 1(基础代谢率,精度为1) | |||
@property (nonatomic, assign) NSUInteger bmr; | |||
///Body age with an accuracy of 1(身体年龄,精度为1) | |||
@property (nonatomic, assign) NSUInteger bodyAge; | |||
///Bone quality, need / 10(骨骼质量,需要/10) | |||
@property (nonatomic, assign) NSUInteger bm; | |||
///Water content, need / 10(水含量,需要/10) | |||
@property (nonatomic, assign) NSUInteger vwc; | |||
///Protein rate, need / 10(蛋白率,需要/10) | |||
@property (nonatomic, assign) NSUInteger pp; | |||
///BMI 需要/10 | |||
@property (nonatomic, assign) NSUInteger BMI; | |||
///Heart rate with an accuracy of 1(心率,精度为1) | |||
@property (nonatomic, assign) NSUInteger heartRate; | |||
///肥胖等级 | |||
@property (nonatomic, assign) NSUInteger obesityGrade; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -18,7 +18,7 @@ typedef NS_ENUM(NSUInteger, HeightGaugeBleDataType) { | |||
HeightGaugeBleDataTypeFailCode = 0xFF, //error code | |||
}; | |||
@class ELPeripheralModel; | |||
@protocol ELHeightGaugeBleManagerDelegate <NSObject> | |||
@optional | |||
@@ -0,0 +1,34 @@ | |||
// | |||
// ELHygrothermographBleHeader.h | |||
// AILinkBleSDK | |||
// | |||
// Created by cliCk on 2021/5/8. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#ifndef ELHygrothermographBleHeader_h | |||
#define ELHygrothermographBleHeader_h | |||
/** 温湿度计 ble head type 枚举定义 */ | |||
typedef NS_ENUM (NSInteger, Hygrothermograph_BleHeadType) { | |||
/** App获取设备状态 */ | |||
Hygrothermograph_BleHeadType_App_GetDevState = 0x01 , | |||
/** 设备定时返回设备状态 */ | |||
Hygrothermograph_BleHeadType_MCU_ReturnDevState = 0x02 , | |||
/** App设备变化阀值 */ | |||
Hygrothermograph_BleHeadType_App_SetDevThreshold = 0x03 , | |||
/** 设备定时返回阀值 */ | |||
Hygrothermograph_BleHeadType_MCU_ReturnDevThreshold = 0x04 , | |||
/** App读取设备的历史数据 */ | |||
Hygrothermograph_BleHeadType_App_GetDevRecordData = 0x05 , | |||
/** 设备返回历史数据 */ | |||
Hygrothermograph_BleHeadType_MCU_ReturnRecordData = 0x06 , | |||
/** 设置采样频率和保存频率 */ | |||
Hygrothermograph_BleHeadType_APP_SetSamplingFrequency = 0x07 , | |||
/** 设备返回采样频率和保存频率 */ | |||
Hygrothermograph_BleHeadType_MCU_ReturnSamplingFrequency = 0x08 , | |||
/** App返回收到历史数据反馈 */ | |||
Hygrothermograph_BleHeadType_App_DataFeedback = 0x09 , | |||
}; | |||
#endif /* ELHygrothermographBleHeader_h */ |
@@ -0,0 +1,76 @@ | |||
// | |||
// ELHygrothermographBleManager.h | |||
// AILinkBleSDK | |||
// | |||
// Created by cliCk on 2021/5/7. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <AILinkBleSDK/ELBluetoothManager.h> | |||
NS_ASSUME_NONNULL_BEGIN | |||
@class ELHygrothermographBleRecordData; | |||
@protocol ELHygrothermographBleDelegate <NSObject> | |||
@optional | |||
/** 返回设备的连接状态 */ | |||
- (void)hygrothermographManagerUpdateState:(ELBluetoothState)state; | |||
/** 回调扫描到的温湿度计 */ | |||
- (void)hygrothermographManagerScanDevices:(NSArray<ELPeripheralModel *> *)scanDevices; | |||
/** 设备返回当前状态 | |||
* @param power : 电量 0~100 | |||
* @parm time : 设备开机时间 | |||
* @param tem : 温度,单位摄氏度 | |||
* @param hum : 湿度,单位% | |||
*/ | |||
- (void)hygrothermographManagerReturnDevStatePower:(NSInteger)power bootTime:(long long)time tem:(float)tem hum:(float)hum; | |||
/** 设备返回阀值 | |||
* @param tem : 温度阀值,单位摄氏度 | |||
* @param hum : 湿度阀值,单位% | |||
*/ | |||
- (void)hygrothermographManagerReturnThresholdTemThreshold:(float)tem humThreshold:(float)hum; | |||
/** 设备返回历史记录数据 | |||
* @param list : 历史记录列表 | |||
* @param allNumber : 历史记录总数量 | |||
* @param getNumber : 已发数量 | |||
*/ | |||
- (void)hygrothermographManagerReturnRecordDataList:(NSArray<ELHygrothermographBleRecordData *> *)list allListNumber:(long long)allNumber getListNumber:(long long)getNumber; | |||
/** 返回设备采样频率和保存频率 */ | |||
- (void)hygrothermographManagerReturnSamplingFrequency:(NSInteger)sampling saveFrequency:(NSInteger)save timeInterval:(NSInteger)timeInterval; | |||
@end | |||
@interface ELHygrothermographBleManager : ELBluetoothManager | |||
@property (nonatomic, weak) id<ELHygrothermographBleDelegate> hygrothermographDelegate; | |||
+ (ELHygrothermographBleManager *)shareManager; | |||
/** 获取设备状态信息 */ | |||
- (void)getDevState; | |||
/** 设置阀值 | |||
* @param tem 区间为 0.1 ~ 10摄氏度 (超过区间就设置为临界值) | |||
* @param hum 区间为 0.1 ~ 10 %(同上) | |||
*/ | |||
- (void)setDevThresholdWithTem:(float)tem hum:(float)hum; | |||
/** 读取设备历史记录 | |||
* 因为设备保存的历史数据过多,APP 不需每次多获取全部历史。 所以 APP 可以根据自身上一次获取到的开机时间,获取新的历 史数据。 例如:APP 首次连接设备获取数据时,则该值为 0. 如果首次已经获取到了开机时间的 100s 时,再次获取时,该值 应该为 100 | |||
*/ | |||
- (void)getDevRecordDataWithDevTime:(long long)devTime; | |||
/** 设置采样频率和保存频率 */ | |||
- (void)setSamplingFrequency:(NSInteger)sampling saveFrequency:(NSInteger)save timeInterval:(NSInteger)timeInterval; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,27 @@ | |||
// | |||
// ELHygrothermographBleRecordData.h | |||
// AILinkBleSDK | |||
// | |||
// Created by cliCk on 2021/5/8. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <Foundation/Foundation.h> | |||
NS_ASSUME_NONNULL_BEGIN | |||
/** 温湿度计历史记录对象模型 */ | |||
@interface ELHygrothermographBleRecordData : NSObject | |||
/** 开机时间 */ | |||
@property (nonatomic, assign) long long bootTime; | |||
/** 温度 摄氏度 */ | |||
@property (nonatomic, assign) float tem; | |||
/** 湿度 % */ | |||
@property (nonatomic, assign) float hum; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,61 @@ | |||
// | |||
// ELNutritionScaleBleHeader.h | |||
// Elink | |||
// | |||
// Created by iot_user on 2020/8/21. | |||
// Copyright © 2020 iot_iMac. All rights reserved. | |||
// | |||
#ifndef ELNutritionScaleBleHeader_h | |||
#define ELNutritionScaleBleHeader_h | |||
#import "ELSDKHeader.h" | |||
typedef NS_ENUM(NSUInteger, NutritionScaleTestStatus) { | |||
//Real-time weight(实时重量) | |||
NutritionScaleTestStatus_RealTime = 1, | |||
//Stable weight(稳定重量) | |||
NutritionScaleTestStatus_Stable = 2, | |||
}; | |||
/** 营养秤 Weight unit(重量单位)*/ | |||
typedef NS_ENUM(NSInteger, NutritionScaleWeightUnit) { | |||
/** g */ | |||
NutritionScaleWeightUnit_G = 0 , | |||
/** ml */ | |||
NutritionScaleWeightUnit_ML = 1 , | |||
/** lb:oz */ | |||
NutritionScaleWeightUnit_LB_OZ = 2 , | |||
/** oz */ | |||
NutritionScaleWeightUnit_OZ = 3 , | |||
/** kg */ | |||
NutritionScaleWeightUnit_KG = 4 , | |||
/** 斤 */ | |||
NutritionScaleWeightUnit_JIN = 5 , | |||
/** 牛奶 ml */ | |||
NutritionScaleWeightUnit_MILK_ML = 6 , | |||
/** 水 ml */ | |||
NutritionScaleWeightUnit_WATER_ML = 7 , | |||
/** 牛奶 fl.oz */ | |||
NutritionScaleWeightUnit_MILK_FLOZ = 8 , | |||
/** 水 fl.oz */ | |||
NutritionScaleWeightUnit_WATER_FLOZ = 9 , | |||
/** lb */ | |||
NutritionScaleWeightUnit_LB = 10 , | |||
/** Unsupported unit */ | |||
NutritionScaleWeightUnit_Fail = 0xFF , | |||
}; | |||
typedef NS_ENUM(NSUInteger, NutritionScaleErrorStatus) { | |||
//Over Range(1: 超重 0:正常) | |||
NutritionScaleErrorStatus_Over_Range_mask = 1 << 0, | |||
//Low Power(1:电量过低,无法测试 0:正常) | |||
NutritionScaleErrorStatus_Low_Power_mask = 1 << 1, | |||
}; | |||
#endif /* ELNutritionScaleBleHeader_h */ |
@@ -0,0 +1,70 @@ | |||
// | |||
// ELNutritionScaleBleManager.h | |||
// Elink | |||
// | |||
// Created by iot_user on 2020/8/21. | |||
// Copyright © 2020 iot_iMac. All rights reserved. | |||
// | |||
#import "ELBluetoothManager.h" | |||
#import "ELNutritionScaleDataModel.h" | |||
@protocol NutritionScaleBleDelegate <NSObject> | |||
@optional | |||
/// 蓝牙连接状态 | |||
/// @param state 连接状态 | |||
- (void)deviceBleReceiveState:(ELBluetoothState)state; | |||
/// 附近的设备 | |||
/// @param devices 设备列表 | |||
- (void)deviceBleReceiveDevices:(NSArray<ELPeripheralModel *> *_Nullable)devices; | |||
//获得支持单位列表 | |||
- (void)supportUnits:(NSArray *_Nonnull)unitArray; | |||
//正在连接中倒计时 | |||
- (void)deviceBleCountDown:(NSInteger)count; | |||
//称重数据 | |||
- (void)nutritionScaleBleDataModel:(ELNutritionScaleDataModel *_Nonnull)model; | |||
//超载 | |||
- (void)overload:(BOOL)status; | |||
//低电 | |||
- (void)lowPower:(BOOL)status; | |||
@end | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface ELNutritionScaleBleManager : ELBluetoothManager | |||
@property(nonatomic, weak) id <NutritionScaleBleDelegate> nutritionScaleBleDelegate; | |||
+ (instancetype)shareManager; | |||
@end | |||
@interface ELNutritionScaleBleManager () | |||
- (void)autoScan; | |||
- (void)stopAutoScan; | |||
- (void)checkStatus; | |||
@end | |||
@interface ELNutritionScaleBleManager (send) | |||
//APP 下发归零 | |||
- (void)sendMakeZero; | |||
//APP 切换单位 | |||
- (void)sendUnit:(NutritionScaleWeightUnit)unit; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,38 @@ | |||
// | |||
// ELNutritionScaleDataModel.h | |||
// Elink | |||
// | |||
// Created by iot_user on 2020/8/21. | |||
// Copyright © 2020 iot_iMac. All rights reserved. | |||
// | |||
#import <Foundation/Foundation.h> | |||
#import "ELNutritionScaleBleHeader.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@interface ELNutritionScaleDataModel : NSObject | |||
//Data serial number(数据流水号) | |||
@property(nonatomic, assign) Byte serialNumber; | |||
//Measurement status(测量状态) | |||
@property (nonatomic, assign) NutritionScaleTestStatus testStatus; | |||
//weight(重量数据) | |||
@property (nonatomic, assign) UInt32 weight; | |||
//Weight unit(重量单位) | |||
@property(nonatomic, assign) NutritionScaleWeightUnit weightUnit; | |||
//Weight decimal point(体重小数点) | |||
@property(nonatomic, assign) Byte weightPoint; | |||
//Weight negative(是否负数) | |||
@property(nonatomic, assign, getter=isNegative) BOOL negative; | |||
//timestamp(时间戳) | |||
@property(nonatomic, assign) long long timestamp; | |||
@end | |||
NSString *NutritionScaleWeightUnitString(NutritionScaleWeightUnit unit); | |||
NS_ASSUME_NONNULL_END |
@@ -8,8 +8,7 @@ | |||
#import <AILinkBleSDK/ELBluetoothManager.h> | |||
#import "ELOximeterBleModel.h" | |||
@class ELPeripheralModel; | |||
#import "ELOximeterDeviceModel.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@@ -55,7 +54,7 @@ typedef NS_ENUM(NSInteger, OximeterErrorCodeType) { | |||
- (void)oximeterManagerBleState:(ELBluetoothState)state; | |||
/** 回调搜索到的血氧仪设备 */ | |||
- (void)oximeterManagerScanDevices:(NSArray<ELPeripheralModel *> *)devices; | |||
- (void)oximeterManagerScanDevices:(NSArray<ELOximeterDeviceModel *> *)devices; | |||
/** mcu上报设置信息 */ | |||
- (void)oximeterManagerSetupState:(ELOximeterBleModel *)bleModel markType:(enum OximeterTestMarkType)markType; | |||
@@ -66,9 +65,6 @@ typedef NS_ENUM(NSInteger, OximeterErrorCodeType) { | |||
/** 设备上报错误码 */ | |||
- (void)oximeterManagerUploadErrorCode:(enum OximeterErrorCodeType)codeType; | |||
///返回原始数据 | |||
- (void)oximeterManagerBleBackManufactureData:(NSData *)data; | |||
@end | |||
@interface ELOximeterBleManager : ELBluetoothManager |
@@ -32,6 +32,7 @@ NS_ASSUME_NONNULL_BEGIN | |||
PID | |||
*/ | |||
@property (nonatomic, assign) NSInteger productID; | |||
@property (nonatomic, copy) NSString *deviceName; | |||
@property (nonatomic, copy) NSString *macAddress; | |||
@@ -9,8 +9,8 @@ | |||
#import <Foundation/Foundation.h> | |||
#import "ELRemoteControlBleHeader.h" | |||
#import "ELBluetoothManager.h" | |||
#import "ELRemoteControlDeviceModel.h" | |||
@class ELPeripheralModel; | |||
NS_ASSUME_NONNULL_BEGIN | |||
@@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN | |||
- (void)remoteControlManagerUpdateState:(ELBluetoothState )state; | |||
/** 回调所有遥控器设备 */ | |||
- (void)remoteControlManagerScanDevices:(NSArray<ELPeripheralModel *> *)deviceList; | |||
- (void)remoteControlManagerScanDevices:(NSArray<ELRemoteControlDeviceModel *> *)deviceList; | |||
@end | |||
@@ -62,6 +62,8 @@ typedef NS_ENUM(NSUInteger, ELInetGetCmdType) { | |||
#pragma mark ============End 蓝牙Wifi ============== | |||
ELInetGetCmdTypeRequestAuthorize = 0x7F, //Request device authorization (请求设备授权) | |||
ELInetGetCmdTypeToothbrushA6Data = 0xC0, //A6 data for toothbrush(牙刷专用A6数据,详情请见协议的2级指令)(See the second order for details) | |||
ELInetGetDevOfflineHistory = 0xF1, //获取离线历史记录 | |||
}; | |||
//Instruction type set by Inet(Inet设置的指令类型) | |||
typedef NS_ENUM(NSUInteger, ELInetSetCmdType) { | |||
@@ -77,7 +79,7 @@ typedef NS_ENUM(NSUInteger, ELInetSetCmdType) { | |||
ELInetSetCmdTypeSetAutoSleepTime = 0x17, //Set the module's automatic sleep time without connection(设置模块无连接的自动休眠时间) | |||
ELInetSetCmdTypeSetGotoSleep = 0x19, //Set to sleep(设置进入睡眠) | |||
ELInetSetCmdTypeSetMCUWakeUp = 0x1A, //Set module wake up(设置模块唤醒) | |||
ELInetSetCmdTypeSetMCUNowDate = 0x1B, //Set the current time of the system(设置系统当前时间) | |||
ELInetSetCmdTypeSyncBleNowDate = 0x1B, //Set the current time of the system(设置手机时间给蓝牙模块Type:1B、1C) | |||
ELInetSetCmdTypeSetC_V_P_ID = 0x1D, //Set CID, VID, PID(设置CID、VID、PID) | |||
ELInetSetCmdTypeSetCommunicationMode = 0x1F, //Set module serial port mode, I2C mode, SPI mode(设置模块串口模式、I2C模式、SPI模式) | |||
ELInetSetCmdTypeSetMCURestart = 0x21, //Set module restart(设置模块重启) | |||
@@ -86,7 +88,7 @@ typedef NS_ENUM(NSUInteger, ELInetSetCmdType) { | |||
ELInetSetCmdTypeSetHandshake = 0x23, //Encrypted handshake data returned by Bluetooth(蓝牙返回的加密的握手数据) | |||
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(设置系统当前时间) | |||
ELInetSetCmdTypeSyncMCUNowDate = 0x37, //Sync the current time of the system(设置手机时间给MCU) | |||
#pragma mark ============ 蓝牙Wifi ============== | |||
ELInetSetCmdTypeBleWifiSetWifiMac = 0x84, //设置WIFI Mac地址 | |||
ELInetSetCmdTypeBleWifiSetWifiPwd = 0x86, //设置WIFI 密码 | |||
@@ -130,18 +132,24 @@ typedef NS_ENUM(NSUInteger, ELSupportDeviceType) { | |||
ELSupportDeviceTypeCoffeeScale = 0x0024 , //咖啡秤 | |||
ELSupportDeviceTypeElectricScooter= 0x0025 , //滑板车 | |||
ELSupportDeviceTypeHeightBodyFatScale = 0x0026 , //身高体脂秤 | |||
ELSupportDeviceTypeFoodThermometer = 0x002B, //Food Thermometer(食品温度计) | |||
ELSupportDeviceTypeBLEToothbrush = 0x002D, //Bluetooth toothbrush(蓝牙牙刷) | |||
ELSupportDeviceTypeHygrothermograph = 0x002E , //温湿度计 | |||
ELSupportDeviceTypeSkip = 0x002F , //跳绳 | |||
ELSupportDeviceTypeBLE_BfrEightScale = 0x0032, //MCU会计算体脂信息的八电极蓝牙秤 | |||
ELSupportDeviceTypeElectricScooter= 0x0033 , //滑板车 | |||
ELSupportDeviceTypeNutritionScale = 0x0034 , //营养秤(蓝牙连接) | |||
ELSupportDeviceTypeAiFreshNutritionScale = 0x0037 , //好营养营养秤(蓝牙连接) | |||
ELSupportDeviceTypeBroadcastScale = (0xffff +0x01) , //655536 Broadcast body fat scale(AILink广播体脂秤) | |||
ELSupportDeviceTypeBroadcastHeightGauge = (0xffff + 0x03) , //65538 广播身高仪 | |||
ELSupportDeviceTypeBroadcastScale_Lingyang = (0xffff +0x16) , //65557 凌阳广播体脂秤 | |||
ELSupportDeviceTypeBroadcastNutritionFoodScale = (0xffff + 0x04) , //65539 广播营养秤 | |||
}; | |||
//Communication mode(通信模式) | |||
@@ -192,7 +200,7 @@ struct ELAutoSleepTimeStruct { | |||
}; | |||
//WiFi连接状态 | |||
typedef NS_ENUM(NSUInteger, BleWiFiConnectState) { | |||
BleWiFiConnectStateNoWiFi = 0,//0:没有连接,0: No connection | |||
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 | |||
@@ -227,6 +235,10 @@ typedef NS_ENUM(NSInteger, ELDeviceUnitType) { | |||
ELDeviceUnitType_Pressure = 5 , | |||
/**Blood sugar(血糖单位)*/ | |||
ELDeviceUnitType_BloodSugar = 6 , | |||
/**体积(体积单位)*/ | |||
ELDeviceUnitType_Volume = 7 , | |||
/**营养秤专用单位*/ | |||
ELDeviceUnitType_Nutrition = 8 , | |||
}; | |||
#define AiLinkBleWeightUnit_KG_Str @"kg" | |||
@@ -236,10 +248,17 @@ typedef NS_ENUM(NSInteger, ELDeviceUnitType) { | |||
#define AiLinkBleWeightUnit_ST_LB_Str @"st:lb" | |||
#define AiLinkBleWeightUnit_G_Str @"g" | |||
#define AiLinkBleWeightUnit_LB_Str @"lb" | |||
#define AiLinkBleWeightUnit_ML_Str @"ml" | |||
#define AiLinkBleWeightUnit_FL_OZ_Str @"fl.oz" | |||
#define AiLinkBleWeightUnit_CC_Str @"cc" | |||
#define AiLinkBleWeightUnit_L_Str @"l" | |||
#define AiLinkBleWeightUnit_GAL_Str @"gal" | |||
#define AiLinkBleWeightUnitStrDic(key) [@{AiLinkBleWeightUnit_KG_Str:@(ELDeviceWeightUnit_KG),AiLinkBleWeightUnit_Jin_Str:@(ELDeviceWeightUnit_JIN),AiLinkBleWeightUnit_LB_OZ_Str:@(ELDeviceWeightUnit_LB_OZ),AiLinkBleWeightUnit_OZ_Str:@(ELDeviceWeightUnit_OZ),AiLinkBleWeightUnit_ST_LB_Str:@(ELDeviceWeightUnit_ST_LB),AiLinkBleWeightUnit_G_Str:@(ELDeviceWeightUnit_G),AiLinkBleWeightUnit_LB_Str:@(ELDeviceWeightUnit_LB)}[key] integerValue] | |||
#define AiLinkBleWeightUnitDic @{@(ELDeviceWeightUnit_KG):AiLinkBleWeightUnit_KG_Str,@(ELDeviceWeightUnit_JIN):AiLinkBleWeightUnit_Jin_Str,@(ELDeviceWeightUnit_LB_OZ):AiLinkBleWeightUnit_LB_OZ_Str,@(ELDeviceWeightUnit_OZ):AiLinkBleWeightUnit_OZ_Str,@(ELDeviceWeightUnit_ST_LB):AiLinkBleWeightUnit_ST_LB_Str,@(ELDeviceWeightUnit_G):AiLinkBleWeightUnit_G_Str,@(ELDeviceWeightUnit_LB):AiLinkBleWeightUnit_LB_Str} | |||
//#define AiLinkBleWeightUnitDic @{@(ELDeviceWeightUnit_KG):AiLinkBleWeightUnit_KG_Str,@(ELDeviceWeightUnit_JIN):AiLinkBleWeightUnit_Jin_Str,@(ELDeviceWeightUnit_LB_OZ):AiLinkBleWeightUnit_LB_OZ_Str,@(ELDeviceWeightUnit_OZ):AiLinkBleWeightUnit_OZ_Str,@(ELDeviceWeightUnit_ST_LB):AiLinkBleWeightUnit_ST_LB_Str,@(ELDeviceWeightUnit_G):AiLinkBleWeightUnit_G_Str,@(ELDeviceWeightUnit_LB):AiLinkBleWeightUnit_LB_Str} | |||
#define AiLinkBleWeightUnitDic @{@(ELDeviceWeightUnit_KG):AiLinkBleWeightUnit_KG_Str,@(ELDeviceWeightUnit_JIN):AiLinkBleWeightUnit_Jin_Str,@(ELDeviceWeightUnit_LB_OZ):AiLinkBleWeightUnit_LB_OZ_Str,@(ELDeviceWeightUnit_OZ):AiLinkBleWeightUnit_OZ_Str,@(ELDeviceWeightUnit_ST_LB):AiLinkBleWeightUnit_ST_LB_Str,@(ELDeviceWeightUnit_G):AiLinkBleWeightUnit_G_Str,@(ELDeviceWeightUnit_LB):AiLinkBleWeightUnit_LB_Str, @(ELDeviceWeightUnit_ML):AiLinkBleWeightUnit_ML_Str, @(ELDeviceWeightUnit_FLOZ):AiLinkBleWeightUnit_FL_OZ_Str, @(ELDeviceWeightUnit_CC):AiLinkBleWeightUnit_CC_Str, @(ELDeviceWeightUnit_L):AiLinkBleWeightUnit_L_Str, @(ELDeviceWeightUnit_GAL):AiLinkBleWeightUnit_GAL_Str} | |||
/** AiLink Weight unit(体重单位)*/ | |||
typedef NS_ENUM(NSInteger, ELDeviceWeightUnit) { | |||
/** kg */ | |||
@@ -256,6 +275,17 @@ typedef NS_ENUM(NSInteger, ELDeviceWeightUnit) { | |||
ELDeviceWeightUnit_G = 0x05 , | |||
/** lb */ | |||
ELDeviceWeightUnit_LB = 0x06 , | |||
//体积 咖啡秤有ml单位 所以协议增加体积部分 | |||
/** ml */ | |||
ELDeviceWeightUnit_ML = 0x10 , | |||
/** fl.oz */ | |||
ELDeviceWeightUnit_FLOZ = 0x20 , | |||
/** cc */ | |||
ELDeviceWeightUnit_CC = 0x30 , | |||
/** l */ | |||
ELDeviceWeightUnit_L = 0x40 , | |||
/** gal */ | |||
ELDeviceWeightUnit_GAL = 0x50 , | |||
/** Unsupported unit */ | |||
ELDeviceWeightUnit_Fail = 0xFF , | |||
@@ -368,6 +398,61 @@ typedef NS_ENUM(NSUInteger, ELDeviceBloodSugarUnit) { | |||
}; | |||
#define AiLinkBleVolumeUnit_mlStr @"ml" | |||
#define AiLinkBleVolumeUnit_flozStr @"fl.oz" | |||
#define AiLinkBleVolumeUnit_ccStr @"cc" | |||
#define AiLinkBleVolumeUnit_lStr @"l" | |||
#define AiLinkBleVolumeUnit_galStr @"gal" | |||
#define AiLinkBleVolumeUnitDic @{@(ELDeviceVolumeUnit_ML):AiLinkBleVolumeUnit_mlStr, @(ELDeviceVolumeUnit_FLOZ):AiLinkBleVolumeUnit_flozStr, @(ELDeviceVolumeUnit_CC):AiLinkBleVolumeUnit_ccStr, @(ELDeviceVolumeUnit_L):AiLinkBleVolumeUnit_lStr, @(ELDeviceVolumeUnit_GAL):AiLinkBleVolumeUnit_galStr} | |||
/** AiLink Temperature unit(温度单位)*/ | |||
typedef NS_ENUM(NSInteger, ELDeviceVolumeUnit) { | |||
/** ml */ | |||
ELDeviceVolumeUnit_ML = 0x00 , | |||
/** fl.oz */ | |||
ELDeviceVolumeUnit_FLOZ = 0x01 , | |||
/** cc */ | |||
ELDeviceVolumeUnit_CC = 0x02 , | |||
/** l */ | |||
ELDeviceVolumeUnit_L = 0x03 , | |||
/** gal */ | |||
ELDeviceVolumeUnit_GAL = 0x04 , | |||
/** Unsupported unit */ | |||
ELDeviceVolumeUnit_Fail = 0xFF , | |||
}; | |||
/** AiLink Nutrition unit(营养秤专用单位)*/ | |||
typedef NS_ENUM(NSInteger, ELDeviceNutritionUnit) { | |||
/** g */ | |||
ELDeviceNutritionUnit_G = 0x00 , | |||
/** ml */ | |||
ELDeviceNutritionUnit_ML = 0x01 , | |||
/** lb.oz */ | |||
ELDeviceNutritionUnit_LBOZ = 0x02 , | |||
/** oz */ | |||
ELDeviceNutritionUnit_OZ = 0x03 , | |||
/** kg */ | |||
ELDeviceNutritionUnit_KG = 0x04 , | |||
/** jin */ | |||
ELDeviceNutritionUnit_JIN = 0x05 , | |||
/** 牛奶ml */ | |||
ELDeviceNutritionUnit_MILK_ML = 0x06 , | |||
/** 水ml */ | |||
ELDeviceNutritionUnit_WATER_ML = 0x07 , | |||
/** 牛奶floz */ | |||
ELDeviceNutritionUnit_MILK_FLOZ = 0x08 , | |||
/** 水floz */ | |||
ELDeviceNutritionUnit_WATER_FLOZ = 0x09 , | |||
/** lb. */ | |||
ELDeviceNutritionUnit_LB = 0x0A , | |||
/** Unsupported unit */ | |||
ELDeviceNutritionUnit_Fail = 0xFF , | |||
}; | |||
#pragma mark ============ 枚举 ============== | |||
typedef NS_ENUM(NSUInteger, ELBluetoothState) { | |||
ELBluetoothStateUnavailable, //Bluetooth is not available(蓝牙不可用) | |||
@@ -381,6 +466,9 @@ typedef NS_ENUM(NSUInteger, ELBluetoothState) { | |||
ELBluetoothStateDidDisconnect, //Disconnect(断开连接) | |||
ELBluetoothStateDidValidationPass, //approved(通过验证) | |||
ELBluetoothStateFailedValidation, //Failed verification(未通过验证) | |||
ELBluetoothStateUnauthorized = 0XFF , //No Bluetooth permission (没有蓝牙权限) | |||
}; | |||
//sex(性别) |
@@ -0,0 +1,66 @@ | |||
// | |||
// ELSkipBleDataModel.h | |||
// AILinkBleSDK | |||
// | |||
// Created by cliCk on 2021/6/17. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <Foundation/Foundation.h> | |||
#import "ELSkipBleHeader.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
/** 跳绳基础的数据模型 */ | |||
@interface ELSkipBleDataModel : NSObject | |||
/** 模式 */ | |||
@property (nonatomic, assign) enum Skip_UseModeType modeType; | |||
/** 倒计时跳绳或倒计数跳绳模式下的倒计时或倒计数 */ | |||
@property (nonatomic, assign) NSUInteger countdownNum; | |||
/** 运动时间 */ | |||
@property (nonatomic, assign) NSUInteger sportTime; | |||
/** 跳绳个数 */ | |||
@property (nonatomic, assign) NSUInteger sportNum; | |||
@end | |||
/** 绊绳数据对象模型 */ | |||
@interface ELSkipBleTripRopeModel : NSObject | |||
/** 本次连跳的累计时间 */ | |||
@property (nonatomic, assign) long long tripTime; | |||
/** 本次连跳的累计个数 */ | |||
@property (nonatomic, assign) NSUInteger tripJump; | |||
@end | |||
/** 跳绳记录数据模型 */ | |||
@interface ELSkipHistoryDataModel : NSObject | |||
/** 开始时间戳 */ | |||
@property (nonatomic, assign) long long startTime; | |||
/** 跳绳基础数据模型 */ | |||
@property (nonatomic, strong) ELSkipBleDataModel *dataModel; | |||
/** 平均频次(次/分) */ | |||
@property (nonatomic, assign) NSUInteger avgRate; | |||
/** 最快频次(次/分) */ | |||
@property (nonatomic, assign) NSUInteger maxRate; | |||
/** 绊绳数据列表 */ | |||
@property (nonatomic, copy) NSArray<ELSkipBleTripRopeModel *> *tripRopeList; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -0,0 +1,88 @@ | |||
// | |||
// ELSkipBleHeader.h | |||
// AILinkBleSDK | |||
// | |||
// Created by cliCk on 2021/6/16. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#ifndef ELSkipBleHeader_h | |||
#define ELSkipBleHeader_h | |||
/** 跳绳 ble head type 枚举定义 */ | |||
typedef NS_ENUM (NSInteger, Skip_BleHeadType) { | |||
/** 同步时间戳 */ | |||
Skip_BleHeadType_SyncTimestamp = 0x00 , | |||
/** 启动/结束自由跳绳模式 */ | |||
Skip_BleHeadType_StartFreeMode = 0x01 , | |||
/** 启动/结束倒计时跳绳模式 */ | |||
Skip_BleHeadType_StartCountdownTimeMode = 0x02 , | |||
/** 启动/结束倒计数跳绳模式 */ | |||
Skip_BleHeadType_StartCountdownNumMode = 0x03 , | |||
/** 修改默认倒计时 */ | |||
Skip_BleHeadType_UpdateCountdownTime = 0x04 , | |||
/** 修改默认倒计数 */ | |||
Skip_BleHeadType_UpdateCountdownNum = 0x05 , | |||
/** 实时跳绳数据上报 */ | |||
Skip_BleHeadType_RealtimeDataReporting = 0x10 , | |||
/** 跳绳结束,结果数据上报 */ | |||
Skip_BleHeadType_EndRopeUploadData = 0x20 , | |||
/** 绑定设备 */ | |||
Skip_BleHeadType_BindDevice = 0xB0 , | |||
/** 请求获取离线记录 */ | |||
Skip_BleHeadType_GetOfflineHistory = 0xF1 , | |||
}; | |||
/** 跳绳回复结果枚举定义 */ | |||
typedef NS_ENUM (NSInteger, Skip_ResultType) { | |||
/** 成功 */ | |||
Skip_ResultType_Success = 0x00 , | |||
/** 失败 */ | |||
Skip_ResultType_Fail = 0x01 , | |||
/** 不支持 */ | |||
Skip_ResultType_NotSupport = 0x02 , | |||
}; | |||
/** 启动/结束跳绳命令枚举 */ | |||
typedef NS_ENUM (NSInteger, Skip_UseDevCommandType) { | |||
/** 结束(本次跳绳数据上报) */ | |||
Skip_UseDevCommandType_End = 0x00 , | |||
/** 启动 */ | |||
Skip_UseDevCommandType_Start = 0x01 , | |||
/** 重新开始 */ | |||
Skip_UseDevCommandType_Restart = 0x02 , | |||
}; | |||
/** 跳绳使用状态枚举定义 */ | |||
typedef NS_ENUM(NSInteger, Skip_ReadyStateType) { | |||
/** 跳绳准备阶段 */ | |||
Skip_ReadyStateType_NotStarted = 0 , | |||
/** 正在跳绳阶段 */ | |||
Skip_ReadyStateType_Sporting , | |||
/** 跳绳完成阶段 */ | |||
Skip_ReadyStateType_End , | |||
}; | |||
/** 跳绳模式枚举定义 */ | |||
typedef NS_ENUM(NSInteger, Skip_UseModeType) { | |||
/** 自由模式 */ | |||
Skip_UseModeType_Free = 1 , | |||
/** 倒计时模式 */ | |||
Skip_UseModeType_CountdownTime , | |||
/** 倒计数模式 */ | |||
Skip_UseModeType_CountdownNum , | |||
}; | |||
/** 绑定设备类型定义 */ | |||
typedef NS_ENUM(NSInteger, Skip_BindDeviceType) { | |||
/** 直接绑定 */ | |||
Skip_BindDeviceType_DirectBinding = 0x00 , | |||
/** 按键绑定 */ | |||
Skip_BindDeviceType_KeyBinding = 0x01 , | |||
}; | |||
#endif /* ELSkipBleHeader_h */ |
@@ -0,0 +1,84 @@ | |||
// | |||
// ELSkipBleManager.h | |||
// AILinkBleSDK | |||
// | |||
// Created by cliCk on 2021/6/16. | |||
// Copyright © 2021 IOT. All rights reserved. | |||
// | |||
#import <AILinkBleSDK/ELBluetoothManager.h> | |||
#import "ELSkipBleHeader.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@class ELSkipBleDataModel; | |||
@class ELSkipHistoryDataModel; | |||
@protocol ELSkipBleDelegate <NSObject> | |||
//@optional | |||
/** 返回设备的连接状态 */ | |||
- (void)skipManagerUpdateState:(ELBluetoothState)state; | |||
/** 回调扫描到的设备 */ | |||
- (void)skipManagerScanDevices:(NSArray<ELPeripheralModel *> *)scanDevices; | |||
/** 返回命令结果 */ | |||
- (void)skipManagerResult:(enum Skip_ResultType)result bleHeaderType:(enum Skip_BleHeadType)type; | |||
/** 实时跳绳数据上报 | |||
* @param readyState : 跳绳状态 | |||
* @param model : 运动数据模型 | |||
* @param power : 当前电量百分比 | |||
*/ | |||
- (void)skipManagerRealtimeDataWithState:(enum Skip_ReadyStateType)readyState skipModel:(ELSkipBleDataModel *)model power:(NSUInteger)power; | |||
/** 跳绳结束,上报数据 | |||
* @param model : 跳绳记录数据模型 | |||
*/ | |||
- (void)skipManagerSportEndReportDataWithHistoryModel:(ELSkipHistoryDataModel *)model; | |||
/** 上报离线历史记录 | |||
* @param modelList : 记录模型列表 | |||
*/ | |||
- (void)skipManagerReportOfflineHistoryWithHistoryModelList:(NSArray<ELSkipHistoryDataModel *> *)modelList; | |||
@end | |||
@interface ELSkipBleManager : ELBluetoothManager | |||
@property (nonatomic, weak) id<ELSkipBleDelegate> skipDelegate; | |||
+ (ELSkipBleManager *)shareManager; | |||
/** 绑定设备,该功能与硬件没有实际的交互用途,只用户处理app绑定设备时的逻辑处理 */ | |||
- (void)bindDeviceWithType:(enum Skip_BindDeviceType)type; | |||
/** 同步时间戳 */ | |||
- (void)syncDevTimeStamp:(NSInteger)timestamp; | |||
/** 启动/结束自由跳绳 */ | |||
- (void)sendFreeModeWithType:(enum Skip_UseDevCommandType)type; | |||
/** 启动/结束倒计时跳绳 */ | |||
- (void)sendCountdownTimeModeWithType:(enum Skip_UseDevCommandType)type; | |||
/** 修改默认倒计时 */ | |||
- (void)updateCountdownTimeWithNum:(NSUInteger)num; | |||
/** 启动/结束倒计数跳绳 */ | |||
- (void)sendCountDownNumWithType:(enum Skip_UseDevCommandType)type; | |||
/** 修改默认倒计数 */ | |||
- (void)updateCountdownNumWithNum:(NSUInteger)num; | |||
/** 请求接收离线历史记录 */ | |||
- (void)getOfflineHistory; | |||
/** 清空离线历史记录 */ | |||
- (void)clearOfflineHistory; | |||
@end | |||
NS_ASSUME_NONNULL_END |
@@ -7,6 +7,7 @@ | |||
// | |||
#import "ELBluetoothManager.h" | |||
#import "ELThermometerDeviceModel.h" | |||
#import "ELThermometerBleModel.h" | |||
NS_ASSUME_NONNULL_BEGIN | |||
@@ -45,7 +46,6 @@ typedef NS_ENUM(NSInteger , ThermometerBleErrorCode) { | |||
ThermometerBleErrorCode_Failure , | |||
}; | |||
@class ELPeripheralModel; | |||
@protocol ELThermometerBleDelegate <NSObject> | |||
@optional | |||
@@ -53,7 +53,7 @@ typedef NS_ENUM(NSInteger , ThermometerBleErrorCode) { | |||
- (void)thermometerManagerUpdateState:(ELBluetoothState )state; | |||
/** Call back all thermometer devices(回调所有体温计设备) */ | |||
- (void)thermometerManagerScanDevices:(NSArray<ELPeripheralModel *> *)thermometerDevices; | |||
- (void)thermometerManagerScanDevices:(NSArray<ELThermometerDeviceModel *> *)thermometerDevices; | |||
/** Callback temperature data(回调温度数据) */ | |||
- (void)thermometerManagerReceiveModel:(ELThermometerBleModel *)model; |
@@ -15,132 +15,175 @@ NS_ASSUME_NONNULL_BEGIN | |||
@optional | |||
//Bluetooth status callback(回调蓝牙状态) | |||
-(void)toothbrushReceiveState:(ELBluetoothState)state; | |||
- (void)toothbrushReceiveState:(ELBluetoothState)state; | |||
//Callback toothbrush device list(回调牙刷设备列表) | |||
-(void)toothbrushReceiveDevices:(NSArray<ELPeripheralModel *> *)devices; | |||
- (void)toothbrushReceiveDevices:(NSArray<ELPeripheralModel *> *)devices; | |||
/// Callback gear information(回调档位信息) | |||
/// @param oneGear First gear(一档档位) | |||
/// @param twoGear Second gear(二档档位) | |||
-(void)toothbrushReceiveOneGear:(NSArray<NSNumber *> *)oneGear twoGear:(NSArray<NSNumber *> *)twoGear; | |||
- (void)toothbrushReceiveOneGear:(NSArray<NSNumber *> *)oneGear twoGear:(NSArray<NSNumber *> *)twoGear; | |||
/// Set work gear result(设置工作档位结果) | |||
/// @param result 结果 | |||
-(void)toothbrushReceiveSetWorkGearResult:(ELSetBluetoothResponseType)result; | |||
- (void)toothbrushReceiveSetWorkGearResult:(ELSetBluetoothResponseType)result; | |||
//Call back current working gear information(回调当前工作档位信息) | |||
-(void)toothbrushReceiveWorkGear:(ToothbrushWorkGear)workGear; | |||
- (void)toothbrushReceiveWorkGear:(ToothbrushWorkGear)workGear; | |||
/// Call back trial results(回调试用结果) | |||
/// @param result 结果 | |||
-(void)toothbrushReceiveTryResult:(ToothbrushSetResult)result; | |||
- (void)toothbrushReceiveTryResult:(ToothbrushSetResult)result; | |||
/// Report work phase(上报工作阶段) | |||
/// @param workPhase Work stage information(工作阶段信息) | |||
-(void)toothbrushReceiveWorkPhase:(ToothBrushWorkPhase)workPhase; | |||
- (void)toothbrushReceiveWorkPhase:(ToothBrushWorkPhase)workPhase; | |||
/// Recall the data of manually set gear(回调手动设置档位的数据) | |||
/// @param custom data(数据) | |||
-(void)toothbrushReceiveCustomData:(ToothbrushCustomData)custom; | |||
- (void)toothbrushReceiveCustomData:(ToothbrushCustomData)custom; | |||
/// Callback switch toothbrush result(回调开关牙刷结果) | |||
/// @param result 结果 | |||
-(void)toothbrushReceiveSwitchResult:(ToothbrushSetResult)result; | |||
- (void)toothbrushReceiveSwitchResult:(ToothbrushSetResult)result; | |||
/// Callback three-axis direction(回调三轴方向) | |||
/// @param direction 方向 | |||
-(void)toothbrushReceiveTriaxialDirection:(ToothbrushTriaxialDirection)direction; | |||
- (void)toothbrushReceiveTriaxialDirection:(ToothbrushTriaxialDirection)direction; | |||
/// Recall three-axis data(回调三轴数据) | |||
/// @param success 是否成功 | |||
/// @param x x轴数据 | |||
/// @param y y轴数据 | |||
/// @param z z轴数据 | |||
-(void)toothbrushReceiveTriaxialData:(BOOL)success triaxialX:(int)x triaxialY:(int)y triaxialZ:(int)z; | |||
- (void)toothbrushReceiveTriaxialData:(BOOL)success triaxialX:(int)x triaxialY:(int)y triaxialZ:(int)z; | |||
/// Default value of second gear(二档档位默认值) | |||
/// @param gear Second gear(二档档位) | |||
-(void)toothbrushReceiveTwoGearDefault:(ToothbrushGearType)gear; | |||
- (void)toothbrushReceiveTwoGearDefault:(ToothbrushGearType)gear; | |||
/// Set the second gear default gear result(设置二档默认档位结果) | |||
/// @param result 结果 | |||
-(void)toothbrushReceiveSettingTwoGearDefaultResult:(ELSetBluetoothResponseType)result; | |||
- (void)toothbrushReceiveSettingTwoGearDefaultResult:(ELSetBluetoothResponseType)result; | |||
/// Call back brushing data(回调刷牙数据) | |||
/// @param data 刷牙数据 | |||
-(void)toothbrushtReceiveToothbrushData:(ToothbrushData)data; | |||
- (void)toothbrushtReceiveToothbrushData:(ToothbrushData)data; | |||
/// Call back brushing offline data(回调刷牙数据) | |||
/// @param data 刷牙离线数据 | |||
- (void)toothbrushtReceiveToothbrushOfflineData:(ToothbrushOfflineData)data; | |||
- (void)toothbrushtReceiveToothbrushOfflineDataCount:(unsigned char)count result:(unsigned char)result; | |||
/** MCU replies to the result of setting the ip address (MCU回复设置ip地址结果 ) | |||
* @param result : 1:成功,0:失败,2:不支持 | |||
*/ | |||
- (void)toothbrushManagerCallBackSetIPAddressResult:(NSInteger)result; | |||
@end | |||
@interface ELToothbrushBleManager : ELBluetoothManager | |||
//Current working mode(当前工作模式) | |||
@property (nonatomic, assign) ToothbrushGearType currentMode; | |||
@property(nonatomic, assign) ToothbrushGearType currentMode; | |||
//Current default working hours(当前默认工作时长) | |||
@property (nonatomic, assign) NSInteger currentWorkTime; | |||
@property(nonatomic, assign) NSInteger currentWorkTime; | |||
//Current gear(当前档位) | |||
@property (nonatomic, assign) ToothSupportGearType currentGear; | |||
@property(nonatomic, assign) ToothSupportGearType currentGear; | |||
@property (nonatomic, weak) id<ToothbrushDelegate> toothbrushDelegate; | |||
@property(nonatomic, weak) id <ToothbrushDelegate> toothbrushDelegate; | |||
+(instancetype)shareManager; | |||
+ (instancetype)shareManager; | |||
//Get supported gear(获取支持的档位) | |||
-(void)getGear; | |||
- (void)getGear; | |||
/// Set brushing mode(设置刷牙模式) | |||
/// @param gearType Brushing mode(刷牙模式) | |||
/// @param interval Brushing time (0: do not modify the working time, before keeping)(刷牙时间(0:不修改工作时长,保留之前)) | |||
/// @param supportType Which gear is it(是哪个档位) | |||
-(void)setWorkGear:(ToothbrushGearType)gearType interval:(int)interval supportGearType:(ToothSupportGearType)supportType; | |||
- (void)setWorkGear:(ToothbrushGearType)gearType interval:(int)interval supportGearType:(ToothSupportGearType)supportType; | |||
- (void)setWorkGear:(ToothbrushGearType)gearType interval:(int)interval supportGearType:(ToothSupportGearType)supportType withCid:(ELSupportDeviceType)cid; | |||
/// Get the current working gear(获取当前工作的档位) | |||
-(void)getWorkGear; | |||
- (void)getWorkGear; | |||
- (void)getWorkGearWithCid:(ELSupportDeviceType)cid; | |||
/// try out(试用) | |||
/// @param gear Gear (ToothbrushGearTypeStop means stop trial)(档位(ToothbrushGearTypeStop 表示停止试用)) | |||
/// @param gear Gear (ToothbrushGearTypeStop_00 means stop trial)(档位(ToothbrushGearTypeStop_00 表示停止试用)) | |||
/// @param supportType Which gear(第几档) | |||
/// @param frequency 频率 | |||
/// @param duty 占空比 | |||
-(void)tryGear:(ToothbrushGearType)gear supportType:(ToothSupportGearType)supportType frequency:(int)frequency duty:(int)duty; | |||
- (void)tryGear:(ToothbrushGearType)gear supportType:(ToothSupportGearType)supportType frequency:(int)frequency duty:(int)duty; | |||
- (void)tryGear:(ToothbrushGearType)gear supportType:(ToothSupportGearType)supportType frequency:(int)frequency duty:(int)duty withCid:(ELSupportDeviceType)cid; | |||
/// Get the current work stage(获取当前工作阶段) | |||
-(void)getWorkPhase; | |||
- (void)getWorkPhase; | |||
- (void)getWorkPhaseWithCid:(ELSupportDeviceType)cid; | |||
/// Set manual setting gear(设置手动设置档位) | |||
/// @param frequency 频率 | |||
/// @param duty 占空比 | |||
/// @param interval 时间 | |||
-(void)setCustomGearData:(int)frequency duty:(int)duty interval:(int)interval; | |||
- (void)setCustomGearData:(int)frequency duty:(int)duty interval:(int)interval; | |||
- (void)setCustomGearData:(int)frequency duty:(int)duty interval:(int)interval withCid:(ELSupportDeviceType)cid; | |||
/// Get manual profile data(获取手动设置档数据) | |||
-(void)getCustomGear; | |||
- (void)getCustomGear; | |||
- (void)getCustomGearWithCid:(ELSupportDeviceType)cid; | |||
/// Switch toothbrush(开关牙刷) | |||
-(void)switchToothbrush; | |||
- (void)switchToothbrush; | |||
- (void)switchToothbrushWithCid:(ELSupportDeviceType)cid; | |||
//Get three axis direction(获取三轴方向) | |||
-(void)getTriaxialDirection; | |||
- (void)getTriaxialDirection; | |||
//APP 获取离线历史记录条数 二级指令 0x11 | |||
- (void)getOfflineDataCount; | |||
//APP 请求接收离线历史记录 二级指令 0x12 | |||
- (void)getOfflineDataStart; | |||
//APP 取消接收离线历史记录 二级指令 0x13 | |||
- (void)getOfflineDataCancel; | |||
//APP 请求清空离线历史记录 二级指令 0x14 | |||
- (void)getOfflineDataClear; | |||
//Get three-axis data(获取三轴数据) | |||
-(void)getTriaxialData; | |||
- (void)getTriaxialData; | |||
//Set the second gear default gear(设置二档默认档位) | |||
-(void)setTwoGearDefaultGear:(ToothbrushGearType)gear; | |||
- (void)setTwoGearDefaultGear:(ToothbrushGearType)gear; | |||
- (void)setTwoGearDefaultGear:(ToothbrushGearType)gear withCid:(ELSupportDeviceType)cid; | |||
//Get the second gear default gear(获取二档默认档位) | |||
-(void)getTwoGearDefualt; | |||
- (void)getTwoGearDefualt; | |||
- (void)getTwoGearDefualtWithCid:(ELSupportDeviceType)cid; | |||
//Report the results of receiving brushing data(上报刷牙数据接收结果) | |||
-(void)reportReceiveResultOfToothbrushData:(BOOL)result; | |||
- (void)reportReceiveResultOfToothbrushData:(BOOL)result; | |||
- (void)reportReceiveResultOfToothbrushData:(BOOL)result withCid:(ELSupportDeviceType)cid; | |||
///清除wifi记录指令 | |||
- (void)bleWifiCleanWifiRecord; | |||
@@ -148,6 +191,14 @@ NS_ASSUME_NONNULL_BEGIN | |||
///获取设备连接的wifi名称 | |||
- (void)getBleLinkWifiName; | |||
/// Request device authorization(请求设备授权) | |||
/// @param interval 时间截 | |||
-(void)requestDeviceAuthorization:(NSInteger)interval; | |||
/** 设置设备的IP地址,端口号和访问路径 */ | |||
- (void)setDevAccessIpAddress:(NSString *)address portNumber:(NSUInteger)portNum path:(NSString *)path; | |||
@end | |||
NS_ASSUME_NONNULL_END |