summaryrefslogtreecommitdiff
path: root/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/PO1.h
blob: 1b3c9079f93f849e4650ccb67264bfed455e5770 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//
//  PO1.h
//  testShareCommunication
//
//  Created by daiqingquan on 13-11-29.
//  Copyright (c) 2013年 my. All rights reserved.
//

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


/**
 PO1
 */
@interface PO1 : NSObject

@property (strong, nonatomic) NSString *currentUUID;
@property (strong, nonatomic) NSString *serialNumber;
@property (strong, nonatomic) NSString *firmwareVersion;


/**
 * Get device IDPS
 * @param function  A block to return the function and states that the device supports.
 * {
     MAC = 60A4232504ED;
     accessoryName = "Pulse Oximeter";
     firmwareVersion = "1.0.0";
     hardwareVersion = "1.0.0";
     manufaturer = iHealth;
     modelNumber = "PO1 11070";
     protocol = "com.jiuan.PO1";
 }
 * @param errorBlock  A block to refer ‘error’ in ‘Establish measurement connection’ in PO1.
 */
-(void)commandFunction:(DisposePO1DeviceFunctionBlock)function DisposeErrorBlock:(DisposePO1ErrorBlock)errorBlock;

/**
 * Query power status
 * @param batteryBlock Battery,from 0~100
 * @param errorBlock Communication error codes
 */
-(void)commandPO1GetDeviceBattery:(DisposePO1BatteryBlock)batteryBlock withErrorBlock:(DisposePO1ErrorBlock)errorBlock;


/**
Measure data  Notification

 PO1NotificationMeasureData

You need to listen to this message to get real-time measurements
 
 The unit of PI is %.

Content of measurement results:
{
    PI = "5.8";
    bpm = 90;
    height = 4;
    spo2 = 98;
    wave =     (
        42,
        41,
        41,
        41,
        40
    );
}
 */


/*
 Disconnect current device
 */

-(void)commandDisconnectDevice;

@end