@ovok/native 0.4.11 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +667 -8
- package/lib/commonjs/modules/bt-management/services/bt-manager.js +13 -15
- package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/device-creator.js +1 -7
- package/lib/commonjs/modules/bt-management/services/device-creator.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.device.js +51 -113
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.main-services.js +77 -41
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01.main-services.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +12 -24
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -1
- package/lib/module/modules/bt-management/services/bt-manager.js +13 -15
- package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/module/modules/bt-management/services/device-creator.js +1 -7
- package/lib/module/modules/bt-management/services/device-creator.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bc01/bc01.device.js +51 -113
- package/lib/module/modules/bt-management/services/devices/bc01/bc01.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bc01/bc01.main-services.js +77 -41
- package/lib/module/modules/bt-management/services/devices/bc01/bc01.main-services.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +12 -24
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts +13 -33
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.main-services.d.ts +17 -11
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01.main-services.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +25 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts +13 -33
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.main-services.d.ts +17 -11
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01.main-services.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +25 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -1
- package/package.json +13 -12
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js +0 -184
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js.map +0 -1
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-frame-parser.js +0 -114
- package/lib/commonjs/modules/bt-management/services/devices/bc01/bc01-frame-parser.js.map +0 -1
- package/lib/module/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js +0 -180
- package/lib/module/modules/bt-management/services/devices/bc01/bc01-command-sequencer.js.map +0 -1
- package/lib/module/modules/bt-management/services/devices/bc01/bc01-frame-parser.js +0 -110
- package/lib/module/modules/bt-management/services/devices/bc01/bc01-frame-parser.js.map +0 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts +0 -53
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-frame-parser.d.ts +0 -53
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bc01/bc01-frame-parser.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts +0 -53
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-command-sequencer.d.ts.map +0 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-frame-parser.d.ts +0 -53
- package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-frame-parser.d.ts.map +0 -1
package/lib/typescript/module/src/modules/bt-management/services/devices/bc01/bc01-frame-parser.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
/** BC401 stored-record frame is always sixteen bytes: header, timestamp, analytes, checksum. */
|
|
2
|
-
declare const BC01_RECORD_LENGTH = 16;
|
|
3
|
-
/** The two opcodes the firmware uses for a stored URS-7 record. */
|
|
4
|
-
declare const BC01_URS_OPCODE = 225;
|
|
5
|
-
declare const BC01_PAGED_URS_OPCODE = 226;
|
|
6
|
-
/**
|
|
7
|
-
* The bit `0x40` of the flags byte marks the last record of a paginated set.
|
|
8
|
-
* The sequencer keys off it to send the `[0x92, 0x7E, chk]` acknowledgement.
|
|
9
|
-
*/
|
|
10
|
-
declare const BC01_LAST_OF_SET_BIT = 64;
|
|
11
|
-
/**
|
|
12
|
-
* URS-7 pad names, in the exact order they occupy the packed 3-bit slots
|
|
13
|
-
* across bytes 8..14 (see M1/a.java). The eleventh slot is a Contec-firmware
|
|
14
|
-
* field the vendor's own catalog calls "vc" and no other name is documented.
|
|
15
|
-
*/
|
|
16
|
-
declare const BC01_ANALYTE_ORDER: readonly ["uro", "bld", "bil", "ket", "glu", "pro", "ph", "nit", "leu", "sg", "vc"];
|
|
17
|
-
/** The result of decoding one 16-byte record. `lastOfSet` is what the sequencer keys on. */
|
|
18
|
-
interface Bc01ParsedRecord {
|
|
19
|
-
/** Local wall-clock time the device recorded, with millisecond precision unavailable. */
|
|
20
|
-
timestamp: Date;
|
|
21
|
-
/** True when the flags byte set bit 0x40 — this is the frame that must be acknowledged. */
|
|
22
|
-
lastOfSet: boolean;
|
|
23
|
-
/** Low nibble of the flags byte; the page counter the firmware writes. */
|
|
24
|
-
pageIndex: number;
|
|
25
|
-
/**
|
|
26
|
-
* Analyte level indices, absent for any pad the strip did not measure.
|
|
27
|
-
* A pad the strip did measure carries a value in [0, 6]; the vendor's own
|
|
28
|
-
* lookup tables translate that to a categorical result per analyte.
|
|
29
|
-
*/
|
|
30
|
-
values: Partial<Record<(typeof BC01_ANALYTE_ORDER)[number], number>>;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Decodes a 16-byte E1 or E2 frame into its timestamp and analyte indices.
|
|
34
|
-
*
|
|
35
|
-
* Returns `undefined` for any frame that is not the right length or does not
|
|
36
|
-
* open with an E1/E2 opcode — the caller is not asked to guess whether a
|
|
37
|
-
* frame is a record or a heartbeat, and a frame that fails these checks is
|
|
38
|
-
* skipped rather than parsed into a plausible-looking wrong reading.
|
|
39
|
-
*
|
|
40
|
-
* The checksum byte is not verified here: the SDK's read path already ensures
|
|
41
|
-
* frame integrity before the parser sees the bytes, and a URS-7 pad value can
|
|
42
|
-
* only land in [0, 7] anyway — a corrupt payload would fail the pad-value
|
|
43
|
-
* check before it made it into a measurement.
|
|
44
|
-
*/
|
|
45
|
-
declare const parseBc01Record: (frame: readonly string[]) => Bc01ParsedRecord | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* True when the buffer holds a complete BC401 stored record. Used by the
|
|
48
|
-
* driver's `validatePackage` hook so the SDK's read path only advances once
|
|
49
|
-
* the notification carries a whole 16-byte frame.
|
|
50
|
-
*/
|
|
51
|
-
declare const isBc01Record: (frame: readonly string[]) => boolean;
|
|
52
|
-
export { BC01_ANALYTE_ORDER, BC01_LAST_OF_SET_BIT, BC01_PAGED_URS_OPCODE, BC01_RECORD_LENGTH, BC01_URS_OPCODE, Bc01ParsedRecord, isBc01Record, parseBc01Record, };
|
|
53
|
-
//# sourceMappingURL=bc01-frame-parser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bc01-frame-parser.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/modules/bt-management/services/devices/bc01/bc01-frame-parser.ts"],"names":[],"mappings":"AAIA,gGAAgG;AAChG,QAAA,MAAM,kBAAkB,KAAK,CAAC;AAE9B,mEAAmE;AACnE,QAAA,MAAM,eAAe,MAAO,CAAC;AAC7B,QAAA,MAAM,qBAAqB,MAAO,CAAC;AAEnC;;;GAGG;AACH,QAAA,MAAM,oBAAoB,KAAO,CAAC;AAelC;;;;GAIG;AACH,QAAA,MAAM,kBAAkB,qFAYuC,CAAC;AAKhE,4FAA4F;AAC5F,UAAU,gBAAgB;IAExB,yFAAyF;IACzF,SAAS,EAAE,IAAI,CAAC;IAEhB,2FAA2F;IAC3F,SAAS,EAAE,OAAO,CAAC;IAEnB,0EAA0E;IAC1E,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;CACtE;AAUD;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,eAAe,GACnB,OAAO,SAAS,MAAM,EAAE,KACvB,gBAAgB,GAAG,SA0CrB,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,YAAY,GAAI,OAAO,SAAS,MAAM,EAAE,KAAG,OAQhD,CAAC;AAEF,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,eAAe,GAChB,CAAC"}
|