summaryrefslogtreecommitdiff
path: root/libs/ihealth-sdk/module/BG1Module.js
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ihealth-sdk/module/BG1Module.js')
-rwxr-xr-xlibs/ihealth-sdk/module/BG1Module.js40
1 files changed, 40 insertions, 0 deletions
diff --git a/libs/ihealth-sdk/module/BG1Module.js b/libs/ihealth-sdk/module/BG1Module.js
new file mode 100755
index 0000000..ed55f2c
--- /dev/null
+++ b/libs/ihealth-sdk/module/BG1Module.js
@@ -0,0 +1,40 @@
1'use strict';
2
3
4var { NativeModules } = require('react-native');
5
6var RCTModule = NativeModules.BG1Module
7
8/**
9 * @module BG1Module
10 */
11module.exports = {
12 Event_Notify: RCTModule.Event_Notify,
13
14 /**
15 * Send code to bg1 device
16 * @param {string} QRCode the result string of scanning strip bottle(ignore if use GDH strip)
17 * @param {int} stripType 1:GOD 2:GDH
18 * @param {int} measureType 1:Test with Blood 2:Test with control liquid (CTL)
19 */
20 sendCode: function(QRCode, stripType, measureType) {
21 if (RCTModule != null) {
22 RCTModule.sendCode(QRCode, stripType, measureType);
23 }else {
24 console.log('~~~~~ RCTModule is null')
25 }
26 },
27
28 /**
29 * Parse bottle info from QRCode, include strip expire time,strip number,bottle id
30 * @param {string} QRCode
31 */
32 getBottleInfoFromQR: function(QRCode){
33 if (RCTModule != null) {
34 RCTModule.getBottleInfoFromQR(QRCode);
35 }else {
36 console.log('~~~~~ RCTModule is null')
37 }
38 }
39
40}