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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
//
// ABPM.h
// iHealthSDKStatic
//
// Created by Realank on 2017/9/26.
// Copyright © 2017年 ihealthSDK. All rights reserved.
//
#import "BPBV10Device.h"
/**
ABPM device class
*/
@interface ABPM : BPBV10Device<BPBasicBTLEProtocol,BPRealtimeMeasureProtocol,BPOfflineDataTransferProtocol>
/**
* Synchronize time and return functions this device supports.
* @param function A block to return the functions and states that the device supports.
* @param error Operation failed, and returns the error codes.
*/
-(void)commandFunction:(BlockDeviceFunction)function errorBlock:(BlockError)error;
/**
* Get battery remaining energy by percent
* @param energyValue A block to return the device battery remaining energy percentage, ‘80’ stands for 80%.
* @param error Operation failed, and returns the error codes.
*/
-(void)commandEnergy:(BlockEnergyValue)energyValue errorBlock:(BlockError)error;
/**
* Get detailed battery remaining energy
* @param energyValueBlock A block to return the device's battery percentage, voltage and measure times left.
* @param errorBlock Operation failed, and returns the error codes.
*/
-(void)commandEnergyDetail:(BlockEnergyDetailValue)energyValueBlock errorBlock:(BlockError)errorBlock;
/**
* Set units for the Device
* @param UnitName The unit name of the result, must be @"mmHg" or @"kPa".
* @param setResult This block return means set success.
* @param error Operation failed, and returns the error codes.
*/
-(void)commandSetUnit:(NSString *)UnitName disposeSetReslut:(BlockSuccess)setResult errorBlock:(BlockError)error;
/**
* Disconnect current device
*/
-(void)commandDisconnectDevice;
/**
* 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 including pulse rate
* @param blockWaveletWithoutHeartbeat Wavelet data set without pulse rate
* @param result result of the measurement, including systolic pressure, diastolic pressure, pulse rate and irregular judgment. Relevant keys: time, sys, dia, heartRate, irregular. irregular will be 0 or 1.
* @param error Operation failed, and returns the error codes.
*/
-(void)commandStartMeasureWithZeroingState:(BlockZero)blockZeroState pressure:(BlockPressure)pressure waveletWithHeartbeat:(BlockWavelet)blockWaveletWithHeartbeat waveletWithoutHeartbeat:(BlockWavelet)blockWaveletWithoutHeartbeat result:(BlockMeasureResult)result errorBlock:(BlockError)error;
/**
* Stop measurement
* @param success The block return means measurement has been terminated.
* @param error Operation failed, and returns the error codes.
*/
-(void)stopBPMeassureSuccessBlock:(BlockSuccess)success errorBlock:(BlockError)error;
/**
* Upload history data.
* @param totalCount history data total Count.
* @param progress upload completion ratio , from 0.0 to 1.0.
* @param uploadDataArray offline data set, including measurement time, systolic pressure, diastolic pressure, pulse rate, irregular judgment,scheme ID,body movement flag. corresponding KEYs are time, sys, dia, heartRate, irregular,schemeID,bodyMovementFlg.
* @param error Operation failed, and returns the error codes.
*/
-(void)commandTransferMemoryDataWithTotalCount:(BlockBachCount)totalCount progress:(BlockBachProgress)progress dataArray:(BlockBachArray)uploadDataArray errorBlock:(BlockError)error;
-(void)commandTransferMemoryDataAndRawPressureWithTotalCount:(BlockBachCount)totalCount progress:(BlockBachProgress)progress dataArray:(BlockBachArray)uploadDataArray errorBlock:(BlockError)error;
/**
* Upload history data total Count.
* @param totalCount item quantity of total data.
* @param error Operation failed, and returns the error codes.
*/
-(void)commandTransferMemoryTotalCount:(BlockBachCount)totalCount errorBlock:(BlockError)error;
/**
Delete all the history memory stored in device
@param successBlock A block refer to delete complete.
@param errorBlock Operation failed, and returns the error codes.
*/
- (void)commandDeleteAllMemoryWithSuccessBlock:(BlockSuccess)successBlock errorBlock:(BlockError)errorBlock;
/**
Set ID String (eg.patientID, schemeID), length 100 max
@param idString the content of id
@param successBlock A block refer to success.
@param errorBlock Operation failed, and returns the error codes.
*/
- (void)commandSetIDString:(NSString*)idString successBlock:(BlockSuccess)successBlock errorBlock:(BlockError)errorBlock;
/**
Ask ID String
@param idStringResultBlock return ID String
@param errorBlock Operation failed, and returns the error codes.
*/
- (void)commandAskIDStringWithResult:(BlockAskIDString)idStringResultBlock errorBlock:(BlockError)errorBlock;
/**
Set auto loop measure scheme
@param scheme scheme content
@param successBlock A block refer to success.
@param errorBlock Operation failed, and returns the error codes.
*/
- (void)commandSetLoopMeasureScheme:(BPLoopMeasureSettingModel*)scheme successBlock:(BlockSuccess)successBlock errorBlock:(BlockError)errorBlock;
/**
Get auto loop measure scheme
@param loopMeasureSchemeBlock return auto loop measure scheme content
@param errorBlock Operation failed, and returns the error codes.
*/
- (void)commandAskLoopMeasureScheme:(BlockAskLoopMeasureScheme)loopMeasureSchemeBlock errorBlock:(BlockError)errorBlock;
/**
Change loop measure scheme status
@param start YES to start, NO to pause
@param successBlock A block refer to success.
@param errorBlock Operation failed, and returns the error codes.
*/
- (void)commandChangeLoopMeasureStatusToStart:(BOOL)start successBlock:(BlockSuccess)successBlock errorBlock:(BlockError)errorBlock;
@end
|