summaryrefslogtreecommitdiff
path: root/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/HS4.h
blob: 066b3edc6537a46d5d6250b64e14b155c43aa971 (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
//
//  HS4.h
//  testShareCommunication
//
//  Created by daiqingquan on 13-12-2.
//  Copyright (c) 2013年 my. All rights reserved.
//

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


/**
 HS4
 */
@interface HS4 : 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 HS4: 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
 */
-(void)commandMeasureWithUint:(HSUnit)tempUnit Weight:(UnStableWeight)unStableWeight StableWeight:(StableWeight)stableWeight DisposeErrorBlock:(DisposeHS4ErrorBlock)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.0~180.0(kg)]
 @param finishTransmission Finish memory transmission.
 @param disposeErrorBlock Record the error code in uploading process.
 */
-(void)commandTransferMemorryData:(StartHS4Transmission)startTransmission DisposeProgress:(DisposeProgress)progress MemorryData:(MemorryData)memorryData FinishTransmission:(FinishHS4Transmission)finishTransmission DisposeErrorBlock:(DisposeHS4ErrorBlock)disposeErrorBlock;

/**
  * End Current Measure Connection
  * @param result  - the result of end current action
  * @param disposeErrorBlock  - error code
  * Error code definition ---refer to “error” : HS4 error instruction.
*/

-(void)commandEndCurrentConnection:(DisposeResult)result DisposeErrorBlock:(DisposeHS4ErrorBlock)disposeErrorBlock;

/**
 Disconnect current device
 */

-(void)commandDisconnectDevice;

@end