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
|
//
// BP3L.h
// testShareCommunication
//
// Created by my on 14/10/13.
// Copyright (c) 2013年 my. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "BPV24Device.h"
/**
BP3L device class
*/
@interface BP3L : BPV24Device <BPBasicBTLEProtocol,BPRealtimeMeasureProtocol>
/**
* Establish measurement connection and start BP measurement.
* @param blockZeroState Zeroing state
* @param pressure Pressure value in the process of measurement, the unit is ‘mmHg’.
* @param blockWaveletWithHeartbeat Wavelet data set with heart beat.
* @param blockWaveletWithoutHeartbeat Wavelet data set without heart beat.
* @param result result of the measurement, including systolic pressure, diastolic pressure, pulse rate and irregular judgment. Relevant key: time, sys, dia, heartRate, irregular. irregular will be 0 or 1.
* @param error Return error codes.
*/
-(void)commandStartMeasureWithZeroingState:(BlockZero)blockZeroState pressure:(BlockPressure)pressure waveletWithHeartbeat:(BlockWavelet)blockWaveletWithHeartbeat waveletWithoutHeartbeat:(BlockWavelet)blockWaveletWithoutHeartbeat result:(BlockMeasureResult)result errorBlock:(BlockError)error;
/**
* Measurement termination and stop BP3L measurement
* @param success The block return means measurement has been terminated.
* @param error A block to return the error in ‘Establish measurement connection’ in BP3L.
*/
-(void)stopBPMeassureSuccessBlock:(BlockSuccess)success errorBlock:(BlockError)error;
/**
* Synchronize time and judge if the device supports BT auto-connection, offline detection, and if the function on or off, corresponding KEYs are haveBlue, haveOffline, blueOpen, offlineOpen. ‘True’ means yes or on, ‘False’ means no or off
* @param function A block to return the function and states that the device supports.
* @param error A block to refer ‘error’ in ‘Establish measurement connection’ in BP3L.
*/
-(void)commandFunction:(BlockDeviceFunction)function errorBlock:(BlockError)error;
/**
* Query battery remaining energy
* @param energyValue A block to return the device battery remaining energy percentage, ‘80’ stands for 80%.
* @param error A block to return the error in ‘Establish measurement connection’.
*/
-(void)commandEnergy:(BlockEnergyValue)energyValue errorBlock:(BlockError)error;
/**
* Disconnect current device
*/
-(void)commandDisconnectDevice;
@end
|