summaryrefslogtreecommitdiff
path: root/libs/ihealth-sdk/module/HS4SModule.js
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ihealth-sdk/module/HS4SModule.js')
-rwxr-xr-xlibs/ihealth-sdk/module/HS4SModule.js53
1 files changed, 53 insertions, 0 deletions
diff --git a/libs/ihealth-sdk/module/HS4SModule.js b/libs/ihealth-sdk/module/HS4SModule.js
new file mode 100755
index 0000000..5bba0c3
--- /dev/null
+++ b/libs/ihealth-sdk/module/HS4SModule.js
@@ -0,0 +1,53 @@
1/**
2 * Created by lixuesong on 11/11/2016.
3 */
4'use strict';
5
6var {NativeModules} = require('react-native');
7
8var RCTModule = NativeModules.HS4SModule
9
10/**
11 * @module HS4SModule
12 */
13module.exports = {
14 /**
15 * Notify event type for HS4S
16 */
17 Event_Notify: RCTModule.Event_Notify,
18
19 /**
20 * Start real-time measurement.
21 * @param {string} mac Device's mac address
22 * @param {string} unit Device's unit
23 * @param {string} userId user id
24 */
25 measureOnline: function (mac, unit, userId) {
26 RCTModule.measureOnline(mac, unit, userId)
27 },
28
29 /**
30 * Get the value of historical data in the HS4S.
31 * @param {string} mac Device's mac address
32 */
33 getOfflineData: function (mac) {
34 RCTModule.getOfflineData(mac)
35 },
36
37 /**
38 * Disconnect the HS4S
39 * @param mac The mac address for blood pressure monitor
40 */
41 disconnect: function (mac) {
42 RCTModule.disconnect(mac)
43 },
44
45 /**
46 * Get all connected HS4S device
47 *
48 * e.g. {"devices":["A4D5783FB00C","A4D5783FFE58"]}
49 */
50 getAllConnectedDevices: function () {
51 RCTModule.getAllConnectedDevices()
52 },
53}