From d6d9a09d505d11148599a95a5be3e1351edbe0ac Mon Sep 17 00:00:00 2001 From: hc Date: Mon, 13 Apr 2026 15:17:52 +0800 Subject: Local iHealth SDK, device detail screen, iOS event fixes --- .../Communication_SDK/Headers/BPM1AE.h | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BPM1AE.h (limited to 'libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BPM1AE.h') diff --git a/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BPM1AE.h b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BPM1AE.h new file mode 100644 index 0000000..4027742 --- /dev/null +++ b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BPM1AE.h @@ -0,0 +1,80 @@ +// +// BPM1AE.h +// iHealthDemoCode +// +// Created by XuJianbo on 16/8/18. +// Copyright © 2016年 zhiwei jing. All rights reserved. +// + +#import + +typedef NS_ENUM(NSUInteger, WifiSetWifiError) { + WifiDidDisconnect=0,//下位机断开 + WifiOverTimeError,//超时 + WifiParameterInputWrong=400,//输入参数错误 +}; + + +typedef void(^BlockWifiError)(WifiSetWifiError error); +typedef void(^BlockWifiSetSuccess)(NSNumber *waitFlg); +typedef void(^BlockWifiConnectState)(void); +typedef void(^BlockWifiInfoDictionary) (NSDictionary *dict); + + +#define Wifi_SSID @"Wifi_SSID" +#define Wifi_Channel @"Wifi_Channel" +#define Wifi_Security @"Wifi_Security" +#define Wifi_RSSI @"Wifi_RSSI" + + + +/** + BPM1AE device class + */ +@interface BPM1AE : NSObject + + +/** + *Start search the UDP access point device. + * @param wifiIDPSDic A block return the IDPS of the connected wifi Device. + * @param error This block will be invoked when error occurs. + * Specification: + * 1. WifiDidDisconnect: Socket connection disconnected. + * 2. WifiOverTimeError: Command time out. + * 3. WifiParameterInputWrong: Input wrong parameter(s). + */ +-(void)commandStartSearchDeviceGetIDPS:(BlockWifiInfoDictionary)wifiIDPSDic blockError:(BlockWifiError)error; +/** + *Start search the UDP access point device. + * @param blockWifiArrayDic The block return a dictionary which contains the wifi list and the wifi count that the device scan. + * @param error This block will be invoked when error occurs. + * Specification: + * 1. WifiDidDisconnect: Socket connection disconnected. + * 2. WifiOverTimeError: Command time out. + * 3. WifiParameterInputWrong: Input wrong parameter(s). + */ +-(void)commandGetWifiArrayDictionary:(BlockWifiInfoDictionary)blockWifiArrayDic blockError:(BlockWifiError)error; + +/** + *Send wifi name and password to the device and return the connect status of the device. + * @param wifiName wifiname + * @param password wifiName,password are the information of the wifi that selected to connect. + * @param phoneIDStr The unique device ID of the current iPhone,iTouch or iPad. + * @param urlStr a service URL, to where the AP device send the wifi connect status. + * @param setResult The block return means set success, containing a flg to show whether need to wait the 'stepAndStateDic', @1 means need,@0 means not. + * @param stepAndStateDic The block return a dictionary which contains the connection step and the connection status. + * @param error This block will be invoked when error occurs. + * Specification: + * 1. WifiDidDisconnect: Socket connection disconnected. + * 2. WifiOverTimeError: Command time out. + * 3. WifiParameterInputWrong: Input wrong parameter(s). + */ +-(void)commandSendWifiName:(NSString*)wifiName password:(NSString *) password phoneID:(NSString *)phoneIDStr withURL:(NSString *)urlStr setResult:(BlockWifiSetSuccess)setResult blockConnectState:(BlockWifiInfoDictionary)stepAndStateDic blockError:(BlockWifiError)error; + + +/** + Disconnect current socket + */ +- (void)disconnect; + +@end -- cgit