diff options
| author | hc <haocheng.xie@respiree.com> | 2026-04-13 15:17:52 +0800 |
|---|---|---|
| committer | hc <haocheng.xie@respiree.com> | 2026-04-13 15:17:52 +0800 |
| commit | d6d9a09d505d11148599a95a5be3e1351edbe0ac (patch) | |
| tree | a5f5891983d1ff207e99f683a5e151519cef4980 /libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BG3.h | |
| parent | e4fb9966e762852bf17f21c8406501d42fae0b61 (diff) | |
Local iHealth SDK, device detail screen, iOS event fixes
Diffstat (limited to 'libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BG3.h')
| -rw-r--r-- | libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BG3.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BG3.h b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BG3.h new file mode 100644 index 0000000..6c44904 --- /dev/null +++ b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/BG3.h | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | // | ||
| 2 | // BG3.h | ||
| 3 | // iHealthBG | ||
| 4 | // | ||
| 5 | // Created by daiqingquan on 14-2-20. | ||
| 6 | // Copyright (c) 2014年 andon. All rights reserved. | ||
| 7 | // | ||
| 8 | |||
| 9 | #import <Foundation/Foundation.h> | ||
| 10 | #import "BGMacroFile.h" | ||
| 11 | |||
| 12 | |||
| 13 | /** | ||
| 14 | DisposeAuthenticationBlock | ||
| 15 | |||
| 16 | @param result UserAuthenResult | ||
| 17 | */ | ||
| 18 | typedef void (^DisposeAuthenticationBlock)(UserAuthenResult result);//the result of userID verification | ||
| 19 | |||
| 20 | |||
| 21 | /** | ||
| 22 | BG3 | ||
| 23 | */ | ||
| 24 | @interface BG3 : NSObject{ | ||
| 25 | |||
| 26 | uint8_t allCodeBuf[170]; | ||
| 27 | uint8_t allCTLCodeBuf[170]; | ||
| 28 | |||
| 29 | DisposeBGErrorBlock _disposeBGErrorBlock; | ||
| 30 | DisposeBGStripInBlock _disposeBGStripInBlock; | ||
| 31 | DisposeBGStripOutBlock _disposeBGStripOutBlock; | ||
| 32 | DisposeBGBloodBlock _disposeBGBloodBlock; | ||
| 33 | DisposeBGResultBlock _disposeBGResultBlock; | ||
| 34 | DisposeBGSendCodeBlock _disposeBGSendCodeBlock; | ||
| 35 | DisposeAuthenticationBlock _disposeAuthenticationBlock; | ||
| 36 | |||
| 37 | NSString *thirdUserID; | ||
| 38 | |||
| 39 | NSString *clientSDKUserName; | ||
| 40 | NSString *clientSDKID; | ||
| 41 | NSString *clientSDKSecret; | ||
| 42 | |||
| 43 | BGMeasureMode clientTestMode; | ||
| 44 | } | ||
| 45 | |||
| 46 | @property (strong, nonatomic) NSString *currentUUID; | ||
| 47 | ///‘serialNumber’ is for separating different device when multiple device have been connected. | ||
| 48 | @property (strong, nonatomic) NSString *serialNumber; | ||
| 49 | |||
| 50 | |||
| 51 | /** | ||
| 52 | * Start measure | ||
| 53 | * @param testMode The 'testMode' send measurement mode, BGMeasureMode_Blood means blood measurement mode, BGMeasureMode_NoBlood means control solution measurement mode. | ||
| 54 | * @param encodeString Get the code information by scanning the QR code. | ||
| 55 | * @param userID The only user label, is indicated by form of email address. | ||
| 56 | * @param clientID 'clientID' and 'clientSecret' are the only user label, will be achieved after the register of SDK application. Please contact louie@ihealthlabs.com for the registration. | ||
| 57 | * @param clientSecret 'clientID' and 'clientSecret' are the only user label, will be achieved after the register of SDK application. Please contact louie@ihealthlabs.com for the registration. | ||
| 58 | * @param disposeAuthenticationBlock This block returns results after the verification of userID,clientID,clientSecret. | ||
| 59 | * Results: | ||
| 60 | * a) UserAuthen_RegisterSuccess, new register successes. | ||
| 61 | * b) UserAuthen_LoginSuccess, user logs in successfully. | ||
| 62 | * c) UserAuthen_CombinedSuccess, user has been recognised as iHealth user, the measurement via SDK could be activated, the result data belongs to the user. | ||
| 63 | * d) UserAuthen_TrySuccess, network error, the measurement is only for testing, SDK is not fully functional. | ||
| 64 | * e) UserAuthen_InvalidateUserInfo, the verification of userID/clientID/clientSecret failed. | ||
| 65 | * f) UserAuthen_SDKInvalidateRight, the application has not been authorised. | ||
| 66 | * g) UserAuthen_UserInvalidateRight, the user has not been authorised. | ||
| 67 | * h) UserAuthen_InternetError, network error, verification failed. | ||
| 68 | * -- PS: | ||
| 69 | * 1. the measurement via SDK is functional in the case from a) to d). | ||
| 70 | * 2. the measurement via SDK will be determined in the case from e) to h), please contact iHealth support team, louie@ihealthlabs.com | ||
| 71 | * 3. “iHealth Disclaimer” will pop up and need to be proved by the user when SDK is activated for the first time. | ||
| 72 | * 4. if iHealth SDK has been using without internet, there is only 10-day try out because the SDK can not be certified. | ||
| 73 | * @param disposeBGSendCodeBlock disposeBGSendCodeBlock | ||
| 74 | * @param disposeBGStripInBlock The block returns yes means strip slides in. | ||
| 75 | * @param disposeBGBloodBlock The block returns yes means the blood drop has beed sensed from the strip | ||
| 76 | * @param disposeBGResultBlock block returns the measurement by the unit of mg/dL, range from 20-600. | ||
| 77 | * @param disposeBGErrorBlock A block to return error codes. | ||
| 78 | */ | ||
| 79 | -(void)commandCreateBG3TestModel:(BGMeasureMode)testMode CodeString:(NSString *)encodeString UserID:(NSString*)userID clientID:(NSString *)clientID clientSecret:(NSString *)clientSecret Authentication:(DisposeAuthenticationBlock)disposeAuthenticationBlock DisposeBGSendCodeBlock:(DisposeBGSendCodeBlock)disposeBGSendCodeBlock DisposeBGStripInBlock:(DisposeBGStripInBlock)disposeBGStripInBlock DisposeBGBloodBlock:(DisposeBGBloodBlock)disposeBGBloodBlock DisposeBGResultBlock:(DisposeBGResultBlock)disposeBGResultBlock DisposeBGErrorBlock:(DisposeBGErrorBlock)disposeBGErrorBlock; | ||
| 80 | |||
| 81 | |||
| 82 | |||
| 83 | @end | ||
