summaryrefslogtreecommitdiff
path: root/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/HS2.h
blob: 347b7a9e63fef9c41f075a80b0a6438893bb299d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//
//  HS2.h
//  iHealthSDKStatic
//
//  Created by ihealth on 2017/6/6.
//  Copyright © 2017年 daiqingquan. All rights reserved.
//

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

@interface HS2 : NSObject
@property (strong, nonatomic) NSString *currentUUID;
@property (strong, nonatomic) NSString *deviceID;
@property (strong, nonatomic) NSNumber *daiModel;
@property (retain, nonatomic) NSString *firmwareVersion;

/**
 
 * Establish memory and measurement connection
 
 * Import parameter:
 * @param tempUnit  -Unit displayed on HS2: HSUnit_Kg、HSUnit_LB、HSUnit_ST。
 
 * Return parameters:
 The measurement via SDK will be operated in the case of 1-4, and will be terminated if any of 5-8 occurs. The interface needs to be re-called after analyzing the return parameters.
 
 * @param unStableWeight     - Current weight, (Kg) [Value Range:0~180]
 * @param stableWeight       - Stable weight, (Kg) [Value Range:0~180]
 * @param disposeErrorBlock  - error code
 * Error code definition:
 *  refer to “error” : HS2 error instruction.
 */

-(void)commandHS2MeasureWithUint:(HSUnit)tempUnit Weight:(UnStableWeight)unStableWeight StableWeight:(StableWeight)stableWeight DisposeErrorBlock:(DisposeHS2ErrorBlock)disposeErrorBlock;

/**
 * Upload memory data
 
 * Return parameters:
 * @param  startTransmission -Start Memory transmission.
 * @param  progress         -Memory transmission progress,[Range:0.0~1.0].
 * @param  memorryData      -Record data including weight (kg), measurement time,coordinated key:weight,date.[Range of weight 0~180(kg)] (If it exceeds 180kg, it will display er1 error, but the SDK interface will also return data. More than 180kg of data is not recommended.)
 * @param  finishTransmission -Finish memory transmission.
 * @param  disposeErrorBlock  -Record the error code in uploading process.
 * Error code definition: refer to ”error” : HS2 error instruction.
 */

-(void)commandHS2TransferMemorryData:(StartHS2Transmission)startTransmission DisposeProgress:(DisposeProgress)progress MemorryData:(MemorryData)memorryData FinishTransmission:(FinishHS2Transmission)finishTransmission DisposeErrorBlock:(DisposeHS2ErrorBlock)disposeErrorBlock;

/**
 *Get HS2 Battery

 * @param HS2battery HS2battery [Range:0~100]%
 * @param disposeErrorBlock error code
 */
-(void)commandGetHS2Battery:(DisposeHS2BatteryBlock)HS2battery DiaposeErrorBlock:(DisposeHS2ErrorBlock)disposeErrorBlock;
/**
 Disconnect current device
 */

-(void)commandDisconnectDevice;

@end