summaryrefslogtreecommitdiff
path: root/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/ECG3USB.h
diff options
context:
space:
mode:
authorhc <haocheng.xie@respiree.com>2026-04-13 15:17:52 +0800
committerhc <haocheng.xie@respiree.com>2026-04-13 15:17:52 +0800
commitd6d9a09d505d11148599a95a5be3e1351edbe0ac (patch)
treea5f5891983d1ff207e99f683a5e151519cef4980 /libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/ECG3USB.h
parente4fb9966e762852bf17f21c8406501d42fae0b61 (diff)
Local iHealth SDK, device detail screen, iOS event fixes
Diffstat (limited to 'libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/ECG3USB.h')
-rwxr-xr-xlibs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/ECG3USB.h145
1 files changed, 145 insertions, 0 deletions
diff --git a/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/ECG3USB.h b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/ECG3USB.h
new file mode 100755
index 0000000..5882028
--- /dev/null
+++ b/libs/ihealth-sdk/ios/ReactNativeIOSLibrary/Communication_SDK/Headers/ECG3USB.h
@@ -0,0 +1,145 @@
1//
2// ECG3.h
3// iHealthDemoCode
4//
5// Created by daiqingquan on 15/9/15.
6// Copyright (c) 2015年 zhiwei jing. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10#import "ECGMacroFile.h"
11
12/**
13 Sync Start
14 */
15typedef void (^ECG3USBSyncStartBlock)(void);
16
17/**
18 Sync Progress
19
20 @param progress 0-100
21 */
22typedef void (^ECG3USBSyncProgressBlock)(NSUInteger progress);
23
24/**
25 @brief Sync Result
26
27 @param resultArray An array contains Dictionary
28 @code Dictionary format: {
29 @"SampleRate":@(sampleRate),
30 @"StartTime":startTimeString,
31 @"EndTime":endTimeString,
32 @"FileName":fileName,
33 @"FilePath":path
34 });
35 @endcode
36 @param finish YES means all data has been uploaded, NO means not all data has been uploaded because of some reasons sucn as device disconnect\communication error\iOS device's memory issue\raw data error. The reason you can get from ECG3USBErrorBlock.
37 */
38typedef void (^ECG3USBSyncResultBlock)(NSArray *resultArray,BOOL finish);
39
40/**
41 Sync Error
42
43 @param errorID error ID
44 */
45typedef void (^ECG3USBErrorBlock)(ECG3USBError errorID);
46
47
48/**
49 Format SD Card Success
50 */
51typedef void (^ECG3FormatSDCardSuccessBlock)(void);
52
53/**
54 Format SD Card Fail
55 */
56typedef void (^ECG3FormatSDCardFailBlock)(ECG3USBError error);
57/**
58 Format Progress
59
60 @param progress 0-100
61 */
62typedef void (^ECG3USBFormatProgressBlock)(NSUInteger progress);
63/**
64 ECG3USB
65 */
66@interface ECG3USB : NSObject
67@property (strong, nonatomic) NSString *currentUUID;
68@property (strong, nonatomic) NSString *serialNumber;
69@property (strong, nonatomic) NSString *firmwareVersion;
70
71/**
72 Sync Data
73
74 @param startBlock means start
75 @param progressBlock 0-100
76 @param resultBlock You can get filtered data from the NSDocumentDirectory path.
77
78 Abnormal Point Marked by User: OBData_FileName.xml
79 Filtered ECG Data: ECGAnalyseResult_FileName.dat
80 Lead Off Begin Point: ECGLeadOffBegin_FileName.xml
81 Lead Off End Point: ECGLeadOffEnd_FileName.xml
82 ECG HR Information EveryHour: ECGHREveryHour_FileName.xml
83 Abnormal Point Filtered by Algorithm: ECGOBbyFilter_FileName.xml
84 ECG HR Information for Day: ECGDetail_FileName.xml
85 @param errorBlock error
86
87 */
88- (void)syncDataWithStartBlock:(ECG3USBSyncStartBlock)startBlock
89 progressBlock:(ECG3USBSyncProgressBlock)progressBlock
90 resultBlock:(ECG3USBSyncResultBlock)resultBlock
91 errorBlock:(ECG3USBErrorBlock)errorBlock;
92
93/**
94 Format SD Card
95
96 @param successBlock Success
97 @param progressBlock 0-100
98 @param failBlock Fail
99 */
100-(void)formatSDCard:(ECG3FormatSDCardSuccessBlock)successBlock
101 progressBlock:(ECG3USBFormatProgressBlock)progressBlock
102 errorBlock:(ECG3FormatSDCardFailBlock)failBlock;
103
104/**
105 Splice data
106
107 @param fileNames An Array with FileName value from ECG3USBSyncResultBlock
108 @param successBlock a block contains a dictionary with keys: success(@{@"DataFileName":dataFileName,@"MarkFileName":markFileName,@"StartTime":yyyyMMddHHmmss,@"EndTime":yyyyMMddHHmmss,@"FilePath":directory});
109 @param errorBlock a block contains error message
110 */
111+ (void)spliceWithFileNames:(NSArray<NSString *>*)fileNames
112 successBlock:(void(^)(NSDictionary *dic))successBlock
113 errorBlock:(void(^)(ECG3USBError error,NSString *message))errorBlock;
114
115
116/**
117 Get data cache
118
119 @param block An array contains Dictionary object
120 {
121 @"SampleRate":@(sampleRate),
122 @"StartTime":startTimeString,
123 @"EndTime":endTimeString,
124 @"FileName":fileName,
125 @"FilePath":path
126 });
127 */
128- (void)getCacheDataWithBlock:(void(^)(NSArray *array))block;
129
130/**
131
132
133 @param dic the dictionary from the success block of method ’synthesisWithFileNames:success:error:‘
134 */
135
136/**
137 Filter
138
139 @param dic the dictionary from the success block of method ’synthesisWithFileNames:success:error:‘
140 @param success see ECG3USBSyncResultBlock comments
141 @param error a block contains error message (If the files don't exist, no error block retrun but print error message in the console)
142 */
143- (void)getFilterDataWithDic:(NSDictionary *)dic success:(ECG3USBSyncResultBlock)success error:(void(^)(NSString *message))error;
144
145@end