jooby-codec 1.7.0 → 1.9.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/dist/BinaryBuffer.d.ts +2 -0
- package/dist/BinaryBuffer.js +9 -0
- package/dist/BinaryBuffer.js.map +1 -1
- package/dist/CommandBinaryBuffer.d.ts +182 -49
- package/dist/CommandBinaryBuffer.js +274 -28
- package/dist/CommandBinaryBuffer.js.map +1 -1
- package/dist/commands/downlink/CorrectTime2000.d.ts +4 -3
- package/dist/commands/downlink/CorrectTime2000.js +1 -0
- package/dist/commands/downlink/CorrectTime2000.js.map +1 -1
- package/dist/commands/downlink/GetArchiveDaysMC.d.ts +5 -4
- package/dist/commands/downlink/GetArchiveDaysMC.js +2 -1
- package/dist/commands/downlink/GetArchiveDaysMC.js.map +1 -1
- package/dist/commands/downlink/GetArchiveEvents.d.ts +4 -3
- package/dist/commands/downlink/GetArchiveEvents.js +3 -5
- package/dist/commands/downlink/GetArchiveEvents.js.map +1 -1
- package/dist/commands/downlink/GetArchiveHoursMC.d.ts +5 -4
- package/dist/commands/downlink/GetArchiveHoursMC.js +2 -1
- package/dist/commands/downlink/GetArchiveHoursMC.js.map +1 -1
- package/dist/commands/downlink/GetCurrentMC.d.ts +1 -0
- package/dist/commands/downlink/GetCurrentMC.js +1 -0
- package/dist/commands/downlink/GetCurrentMC.js.map +1 -1
- package/dist/commands/downlink/{ExAbsArchiveDaysMC.d.ts → GetExAbsArchiveDaysMC.d.ts} +12 -11
- package/dist/commands/downlink/{ExAbsArchiveDaysMC.js → GetExAbsArchiveDaysMC.js} +12 -11
- package/dist/commands/downlink/GetExAbsArchiveDaysMC.js.map +1 -0
- package/dist/commands/downlink/{ExAbsArchiveHoursMC.d.ts → GetExAbsArchiveHoursMC.d.ts} +12 -11
- package/dist/commands/downlink/{ExAbsArchiveHoursMC.js → GetExAbsArchiveHoursMC.js} +12 -11
- package/dist/commands/downlink/GetExAbsArchiveHoursMC.js.map +1 -0
- package/dist/commands/downlink/{ExAbsCurrentMC.d.ts → GetExAbsCurrentMC.d.ts} +8 -7
- package/dist/commands/downlink/{ExAbsCurrentMC.js → GetExAbsCurrentMC.js} +12 -11
- package/dist/commands/downlink/GetExAbsCurrentMC.js.map +1 -0
- package/dist/commands/downlink/{GetLmicVersion.d.ts → GetLmicInfo.d.ts} +7 -6
- package/dist/commands/downlink/{GetLmicVersion.js → GetLmicInfo.js} +12 -11
- package/dist/commands/downlink/GetLmicInfo.js.map +1 -0
- package/dist/commands/downlink/GetParameter.d.ts +4 -3
- package/dist/commands/downlink/GetParameter.js +3 -8
- package/dist/commands/downlink/GetParameter.js.map +1 -1
- package/dist/commands/downlink/{NewStatus.d.ts → GetStatus.d.ts} +9 -7
- package/dist/commands/downlink/{NewStatus.js → GetStatus.js} +18 -10
- package/dist/commands/downlink/GetStatus.js.map +1 -0
- package/dist/commands/downlink/SetParameter.d.ts +1 -0
- package/dist/commands/downlink/SetParameter.js +94 -16
- package/dist/commands/downlink/SetParameter.js.map +1 -1
- package/dist/commands/downlink/SetTime2000.d.ts +4 -3
- package/dist/commands/downlink/SetTime2000.js +1 -0
- package/dist/commands/downlink/SetTime2000.js.map +1 -1
- package/dist/commands/downlink/SoftRestart.d.ts +1 -0
- package/dist/commands/downlink/SoftRestart.js +1 -0
- package/dist/commands/downlink/SoftRestart.js.map +1 -1
- package/dist/commands/downlink/index.d.ts +5 -5
- package/dist/commands/downlink/index.js +5 -5
- package/dist/commands/downlink/index.js.map +1 -1
- package/dist/commands/uplink/CorrectTime2000Response.d.ts +39 -0
- package/dist/commands/uplink/{CorrectTime2000.js → CorrectTime2000Response.js} +23 -14
- package/dist/commands/uplink/CorrectTime2000Response.js.map +1 -0
- package/dist/commands/uplink/CurrentMC.d.ts +41 -0
- package/dist/commands/uplink/{GetCurrentMC.js → CurrentMC.js} +19 -18
- package/dist/commands/uplink/CurrentMC.js.map +1 -0
- package/dist/commands/uplink/DataDayMC.d.ts +32 -3
- package/dist/commands/uplink/DataDayMC.js +47 -4
- package/dist/commands/uplink/DataDayMC.js.map +1 -1
- package/dist/commands/uplink/DataHourMC.d.ts +32 -2
- package/dist/commands/uplink/DataHourMC.js +49 -4
- package/dist/commands/uplink/DataHourMC.js.map +1 -1
- package/dist/commands/uplink/ExAbsCurrentMC.d.ts +32 -4
- package/dist/commands/uplink/ExAbsCurrentMC.js +46 -0
- package/dist/commands/uplink/ExAbsCurrentMC.js.map +1 -1
- package/dist/commands/uplink/ExAbsDayMC.d.ts +32 -2
- package/dist/commands/uplink/ExAbsDayMC.js +50 -2
- package/dist/commands/uplink/ExAbsDayMC.js.map +1 -1
- package/dist/commands/uplink/ExAbsHourMC.d.ts +16 -11
- package/dist/commands/uplink/ExAbsHourMC.js +32 -9
- package/dist/commands/uplink/ExAbsHourMC.js.map +1 -1
- package/dist/commands/uplink/GetArchiveDaysMCResponse.d.ts +58 -0
- package/dist/commands/uplink/{GetArchiveDaysMC.js → GetArchiveDaysMCResponse.js} +44 -20
- package/dist/commands/uplink/GetArchiveDaysMCResponse.js.map +1 -0
- package/dist/commands/uplink/GetArchiveEventsResponse.d.ts +54 -0
- package/dist/commands/uplink/{GetArchiveEvents.js → GetArchiveEventsResponse.js} +24 -18
- package/dist/commands/uplink/GetArchiveEventsResponse.js.map +1 -0
- package/dist/commands/uplink/GetArchiveHoursMCResponse.d.ts +58 -0
- package/dist/commands/uplink/GetArchiveHoursMCResponse.js +77 -0
- package/dist/commands/uplink/GetArchiveHoursMCResponse.js.map +1 -0
- package/dist/commands/uplink/GetExAbsArchiveDaysMCResponse.d.ts +47 -0
- package/dist/commands/uplink/{ExAbsArchiveDaysMC.js → GetExAbsArchiveDaysMCResponse.js} +52 -7
- package/dist/commands/uplink/GetExAbsArchiveDaysMCResponse.js.map +1 -0
- package/dist/commands/uplink/GetExAbsArchiveHoursMCResponse.d.ts +44 -0
- package/dist/commands/uplink/{ExAbsArchiveHoursMC.js → GetExAbsArchiveHoursMCResponse.js} +46 -7
- package/dist/commands/uplink/GetExAbsArchiveHoursMCResponse.js.map +1 -0
- package/dist/commands/uplink/GetLmicInfoResponse.d.ts +52 -0
- package/dist/commands/uplink/{GetLmicVersion.js → GetLmicInfoResponse.js} +27 -27
- package/dist/commands/uplink/GetLmicInfoResponse.js.map +1 -0
- package/dist/commands/uplink/GetParameterResponse.d.ts +35 -0
- package/dist/commands/uplink/{GetParameter.js → GetParameterResponse.js} +25 -32
- package/dist/commands/uplink/GetParameterResponse.js.map +1 -0
- package/dist/commands/uplink/LastEvent.d.ts +19 -10
- package/dist/commands/uplink/LastEvent.js +21 -12
- package/dist/commands/uplink/LastEvent.js.map +1 -1
- package/dist/commands/uplink/NewEvent.d.ts +12 -8
- package/dist/commands/uplink/NewEvent.js +12 -8
- package/dist/commands/uplink/NewEvent.js.map +1 -1
- package/dist/commands/uplink/SetTime2000Response.d.ts +38 -0
- package/dist/commands/uplink/{SetTime2000.js → SetTime2000Response.js} +23 -15
- package/dist/commands/uplink/SetTime2000Response.js.map +1 -0
- package/dist/commands/uplink/SoftRestartResponse.d.ts +28 -0
- package/dist/commands/uplink/SoftRestartResponse.js +44 -0
- package/dist/commands/uplink/SoftRestartResponse.js.map +1 -0
- package/dist/commands/uplink/Status.d.ts +55 -0
- package/dist/commands/uplink/Status.js +153 -0
- package/dist/commands/uplink/Status.js.map +1 -0
- package/dist/commands/uplink/Time2000.d.ts +11 -9
- package/dist/commands/uplink/Time2000.js +18 -8
- package/dist/commands/uplink/Time2000.js.map +1 -1
- package/dist/commands/uplink/index.d.ts +12 -12
- package/dist/commands/uplink/index.js +12 -12
- package/dist/commands/uplink/index.js.map +1 -1
- package/dist/constants/deviceParameters.d.ts +26 -12
- package/dist/constants/deviceParameters.js +26 -12
- package/dist/constants/deviceParameters.js.map +1 -1
- package/dist/constants/hardwareTypes.d.ts +55 -27
- package/dist/constants/hardwareTypes.js +55 -27
- package/dist/constants/hardwareTypes.js.map +1 -1
- package/dist/constants/index.d.ts +2 -1
- package/dist/constants/index.js +2 -1
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/rx2SpreadFactors.d.ts +12 -0
- package/dist/constants/rx2SpreadFactors.js +13 -0
- package/dist/constants/rx2SpreadFactors.js.map +1 -0
- package/package.json +5 -1
- package/readme.md +33 -16
- package/dist/commands/downlink/ExAbsArchiveDaysMC.js.map +0 -1
- package/dist/commands/downlink/ExAbsArchiveHoursMC.js.map +0 -1
- package/dist/commands/downlink/ExAbsCurrentMC.js.map +0 -1
- package/dist/commands/downlink/GetLmicVersion.js.map +0 -1
- package/dist/commands/downlink/NewStatus.js.map +0 -1
- package/dist/commands/uplink/CorrectTime2000.d.ts +0 -37
- package/dist/commands/uplink/CorrectTime2000.js.map +0 -1
- package/dist/commands/uplink/ExAbsArchiveDaysMC.d.ts +0 -18
- package/dist/commands/uplink/ExAbsArchiveDaysMC.js.map +0 -1
- package/dist/commands/uplink/ExAbsArchiveHoursMC.d.ts +0 -18
- package/dist/commands/uplink/ExAbsArchiveHoursMC.js.map +0 -1
- package/dist/commands/uplink/GetArchiveDaysMC.d.ts +0 -50
- package/dist/commands/uplink/GetArchiveDaysMC.js.map +0 -1
- package/dist/commands/uplink/GetArchiveEvents.d.ts +0 -48
- package/dist/commands/uplink/GetArchiveEvents.js.map +0 -1
- package/dist/commands/uplink/GetArchiveHoursMC.d.ts +0 -69
- package/dist/commands/uplink/GetArchiveHoursMC.js +0 -72
- package/dist/commands/uplink/GetArchiveHoursMC.js.map +0 -1
- package/dist/commands/uplink/GetCurrentMC.d.ts +0 -40
- package/dist/commands/uplink/GetCurrentMC.js.map +0 -1
- package/dist/commands/uplink/GetLmicVersion.d.ts +0 -46
- package/dist/commands/uplink/GetLmicVersion.js.map +0 -1
- package/dist/commands/uplink/GetParameter.d.ts +0 -30
- package/dist/commands/uplink/GetParameter.js.map +0 -1
- package/dist/commands/uplink/NewStatus.d.ts +0 -56
- package/dist/commands/uplink/NewStatus.js +0 -141
- package/dist/commands/uplink/NewStatus.js.map +0 -1
- package/dist/commands/uplink/SetTime2000.d.ts +0 -37
- package/dist/commands/uplink/SetTime2000.js.map +0 -1
- package/dist/commands/uplink/SoftRestart.d.ts +0 -24
- package/dist/commands/uplink/SoftRestart.js +0 -34
- package/dist/commands/uplink/SoftRestart.js.map +0 -1
- package/dist/constants/general.d.ts +0 -1
- package/dist/constants/general.js +0 -2
- package/dist/constants/general.js.map +0 -1
- package/dist/utils/getBitArrayFromNumber.d.ts +0 -14
- package/dist/utils/getBitArrayFromNumber.js +0 -15
- package/dist/utils/getBitArrayFromNumber.js.map +0 -1
- package/dist/utils/getIntFromBitString.d.ts +0 -6
- package/dist/utils/getIntFromBitString.js +0 -6
- package/dist/utils/getIntFromBitString.js.map +0 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import { UPLINK } from '../../constants/directions.js';
|
|
3
|
+
const COMMAND_ID = 0x19;
|
|
4
|
+
const examples = [
|
|
5
|
+
{
|
|
6
|
+
name: 'simple response',
|
|
7
|
+
hex: { header: '19 00', body: '' }
|
|
8
|
+
}
|
|
9
|
+
];
|
|
10
|
+
/**
|
|
11
|
+
* Uplink command.
|
|
12
|
+
*
|
|
13
|
+
* @example create command instance from command body hex dump
|
|
14
|
+
* ```js
|
|
15
|
+
* import SoftRestartResponse from 'jooby-codec/commands/uplink/SoftRestartResponse';
|
|
16
|
+
*
|
|
17
|
+
* const commandBody = new Uint8Array([]);
|
|
18
|
+
* const command = SoftRestartResponse.fromBytes(commandBody);
|
|
19
|
+
*
|
|
20
|
+
* // this command doesn't have any parameters
|
|
21
|
+
* console.log(command.parameters);
|
|
22
|
+
* // output:
|
|
23
|
+
* undefined
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/SoftRestart.md#response)
|
|
27
|
+
*/
|
|
28
|
+
class SoftRestartResponse extends Command {
|
|
29
|
+
// data - only body (without header)
|
|
30
|
+
static fromBytes() {
|
|
31
|
+
return new SoftRestartResponse();
|
|
32
|
+
}
|
|
33
|
+
// returns full message - header with body
|
|
34
|
+
// eslint-disable-next-line class-methods-use-this
|
|
35
|
+
toBytes() {
|
|
36
|
+
return Command.toBytes(COMMAND_ID);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
SoftRestartResponse.id = COMMAND_ID;
|
|
40
|
+
SoftRestartResponse.directionType = UPLINK;
|
|
41
|
+
SoftRestartResponse.examples = examples;
|
|
42
|
+
SoftRestartResponse.hasParameters = false;
|
|
43
|
+
export default SoftRestartResponse;
|
|
44
|
+
//# sourceMappingURL=SoftRestartResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SoftRestartResponse.js","sourceRoot":"","sources":["../../../src/commands/uplink/SoftRestartResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAGrD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,iBAAiB;QACvB,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAC;KACnC;CACJ,CAAC;AAGF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,mBAAoB,SAAQ,OAAO;IAUrC,oCAAoC;IACpC,MAAM,CAAC,SAAS;QACZ,OAAO,IAAI,mBAAmB,EAAE,CAAC;IACrC,CAAC;IAED,0CAA0C;IAC1C,kDAAkD;IAClD,OAAO;QACH,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;;AAlBe,sBAAE,GAAG,UAAU,CAAC;AAEhB,iCAAa,GAAG,MAAM,CAAC;AAEvB,4BAAQ,GAAG,QAAQ,CAAC;AAEpB,iCAAa,GAAG,KAAK,CAAC;AAgB1C,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
interface IStatusBase {
|
|
3
|
+
}
|
|
4
|
+
interface IProduct {
|
|
5
|
+
version: number;
|
|
6
|
+
type: number;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Status command parameters
|
|
10
|
+
*/
|
|
11
|
+
interface IStatusParameters {
|
|
12
|
+
software: IProduct;
|
|
13
|
+
hardware: IProduct;
|
|
14
|
+
data: IStatusBase;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Uplink command.
|
|
18
|
+
*
|
|
19
|
+
* @example create command instance from command body hex dump
|
|
20
|
+
* ```js
|
|
21
|
+
* import Status from 'jooby-codec/commands/uplink/Status';
|
|
22
|
+
*
|
|
23
|
+
* const commandBody = new Uint8Array([
|
|
24
|
+
* 0x02, 0x0a, 0x03, 0x01, 0xc5, 0x6d, 0xc2, 0x27, 0x32, 0x0e, 0x68, 0x22
|
|
25
|
+
* ]);
|
|
26
|
+
* const command = Status.fromBytes(commandBody);
|
|
27
|
+
*
|
|
28
|
+
* console.log(command.parameters);
|
|
29
|
+
* // output:
|
|
30
|
+
* {
|
|
31
|
+
* software: {type: 2, version: 10},
|
|
32
|
+
* hardware: {type: 3, version: 1},
|
|
33
|
+
* data: {
|
|
34
|
+
* batteryVoltage: {low: 3158, high: 3522},
|
|
35
|
+
* batteryInternalResistance: 10034,
|
|
36
|
+
* temperature: 14,
|
|
37
|
+
* remainingBatteryCapacity: 41,
|
|
38
|
+
* lastEventSequenceNumber: 34
|
|
39
|
+
* }
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/GetStatus.md#response)
|
|
44
|
+
*/
|
|
45
|
+
declare class Status extends Command {
|
|
46
|
+
parameters: IStatusParameters;
|
|
47
|
+
constructor(parameters: IStatusParameters);
|
|
48
|
+
static readonly id = 20;
|
|
49
|
+
static readonly directionType = 2;
|
|
50
|
+
static readonly examples: TCommandExampleList;
|
|
51
|
+
static readonly hasParameters = true;
|
|
52
|
+
static fromBytes(data: Uint8Array): Status;
|
|
53
|
+
toBytes(): Uint8Array;
|
|
54
|
+
}
|
|
55
|
+
export default Status;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import CommandBinaryBuffer from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import roundNumber from '../../utils/roundNumber.js';
|
|
4
|
+
import * as hardwareTypes from '../../constants/hardwareTypes.js';
|
|
5
|
+
import { UPLINK } from '../../constants/directions.js';
|
|
6
|
+
const COMMAND_ID = 0x14;
|
|
7
|
+
const COMMAND_BODY_MAX_SIZE = 20;
|
|
8
|
+
const UNKNOWN_BATTERY_RESISTANCE = 65535;
|
|
9
|
+
// max battery capacity, 254 - 100%
|
|
10
|
+
const UNKNOWN_BATTERY_CAPACITY = 255;
|
|
11
|
+
const examples = [
|
|
12
|
+
{
|
|
13
|
+
name: 'status for GASI3',
|
|
14
|
+
parameters: {
|
|
15
|
+
software: { type: 2, version: 10 },
|
|
16
|
+
hardware: { type: hardwareTypes.GASI3, version: 1 },
|
|
17
|
+
data: {
|
|
18
|
+
batteryVoltage: { low: 3158, high: 3522 },
|
|
19
|
+
batteryInternalResistance: 10034,
|
|
20
|
+
temperature: 14,
|
|
21
|
+
remainingBatteryCapacity: 41,
|
|
22
|
+
lastEventSequenceNumber: 34
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
hex: { header: '14 0c', body: '02 0a 03 01 c5 6d c2 27 32 0e 68 22' }
|
|
26
|
+
}
|
|
27
|
+
];
|
|
28
|
+
/**
|
|
29
|
+
* Uplink command.
|
|
30
|
+
*
|
|
31
|
+
* @example create command instance from command body hex dump
|
|
32
|
+
* ```js
|
|
33
|
+
* import Status from 'jooby-codec/commands/uplink/Status';
|
|
34
|
+
*
|
|
35
|
+
* const commandBody = new Uint8Array([
|
|
36
|
+
* 0x02, 0x0a, 0x03, 0x01, 0xc5, 0x6d, 0xc2, 0x27, 0x32, 0x0e, 0x68, 0x22
|
|
37
|
+
* ]);
|
|
38
|
+
* const command = Status.fromBytes(commandBody);
|
|
39
|
+
*
|
|
40
|
+
* console.log(command.parameters);
|
|
41
|
+
* // output:
|
|
42
|
+
* {
|
|
43
|
+
* software: {type: 2, version: 10},
|
|
44
|
+
* hardware: {type: 3, version: 1},
|
|
45
|
+
* data: {
|
|
46
|
+
* batteryVoltage: {low: 3158, high: 3522},
|
|
47
|
+
* batteryInternalResistance: 10034,
|
|
48
|
+
* temperature: 14,
|
|
49
|
+
* remainingBatteryCapacity: 41,
|
|
50
|
+
* lastEventSequenceNumber: 34
|
|
51
|
+
* }
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/GetStatus.md#response)
|
|
56
|
+
*/
|
|
57
|
+
class Status extends Command {
|
|
58
|
+
constructor(parameters) {
|
|
59
|
+
super();
|
|
60
|
+
this.parameters = parameters;
|
|
61
|
+
}
|
|
62
|
+
// data - only body (without header)
|
|
63
|
+
static fromBytes(data) {
|
|
64
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
65
|
+
const software = { type: buffer.getUint8(), version: buffer.getUint8() };
|
|
66
|
+
const hardware = { type: buffer.getUint8(), version: buffer.getUint8() };
|
|
67
|
+
let statusData;
|
|
68
|
+
switch (hardware.type) {
|
|
69
|
+
case hardwareTypes.GASI1:
|
|
70
|
+
case hardwareTypes.GASI2:
|
|
71
|
+
case hardwareTypes.GASI3:
|
|
72
|
+
case hardwareTypes.NOVATOR:
|
|
73
|
+
case hardwareTypes.IMP2EU:
|
|
74
|
+
case hardwareTypes.IMP4EU:
|
|
75
|
+
case hardwareTypes.IMP2AS:
|
|
76
|
+
case hardwareTypes.IMP2IN:
|
|
77
|
+
case hardwareTypes.IMP4IN:
|
|
78
|
+
case hardwareTypes.GASIC:
|
|
79
|
+
statusData = {
|
|
80
|
+
batteryVoltage: buffer.getBatteryVoltage(),
|
|
81
|
+
batteryInternalResistance: buffer.getUint16(false),
|
|
82
|
+
temperature: buffer.getUint8(),
|
|
83
|
+
remainingBatteryCapacity: buffer.getUint8(),
|
|
84
|
+
lastEventSequenceNumber: buffer.getUint8()
|
|
85
|
+
};
|
|
86
|
+
if (statusData.batteryInternalResistance === UNKNOWN_BATTERY_RESISTANCE) {
|
|
87
|
+
statusData.batteryInternalResistance = undefined;
|
|
88
|
+
}
|
|
89
|
+
if (statusData.remainingBatteryCapacity === UNKNOWN_BATTERY_CAPACITY) {
|
|
90
|
+
statusData.remainingBatteryCapacity = undefined;
|
|
91
|
+
}
|
|
92
|
+
else if (statusData.remainingBatteryCapacity !== undefined) {
|
|
93
|
+
statusData.remainingBatteryCapacity = roundNumber((statusData.remainingBatteryCapacity * 100) / (UNKNOWN_BATTERY_CAPACITY - 1), 0);
|
|
94
|
+
}
|
|
95
|
+
break;
|
|
96
|
+
case hardwareTypes.MTXLORA:
|
|
97
|
+
case hardwareTypes.ELIMP:
|
|
98
|
+
default:
|
|
99
|
+
throw new Error(`${this.getId()}: hardware type ${hardware.type} is not supported`);
|
|
100
|
+
}
|
|
101
|
+
return new Status({ software, hardware, data: statusData });
|
|
102
|
+
}
|
|
103
|
+
// returns full message - header with body
|
|
104
|
+
toBytes() {
|
|
105
|
+
const { software, hardware, data } = this.parameters;
|
|
106
|
+
const buffer = new CommandBinaryBuffer(COMMAND_BODY_MAX_SIZE);
|
|
107
|
+
let statusData;
|
|
108
|
+
buffer.setUint8(software.type);
|
|
109
|
+
buffer.setUint8(software.version);
|
|
110
|
+
buffer.setUint8(hardware.type);
|
|
111
|
+
buffer.setUint8(hardware.version);
|
|
112
|
+
switch (hardware.type) {
|
|
113
|
+
case hardwareTypes.GASI1:
|
|
114
|
+
case hardwareTypes.GASI2:
|
|
115
|
+
case hardwareTypes.GASI3:
|
|
116
|
+
case hardwareTypes.NOVATOR:
|
|
117
|
+
case hardwareTypes.IMP2EU:
|
|
118
|
+
case hardwareTypes.IMP4EU:
|
|
119
|
+
case hardwareTypes.IMP2AS:
|
|
120
|
+
case hardwareTypes.IMP2IN:
|
|
121
|
+
case hardwareTypes.IMP4IN:
|
|
122
|
+
case hardwareTypes.GASIC:
|
|
123
|
+
statusData = data;
|
|
124
|
+
buffer.setBatteryVoltage(statusData.batteryVoltage);
|
|
125
|
+
if (statusData.batteryInternalResistance === undefined) {
|
|
126
|
+
buffer.setUint16(UNKNOWN_BATTERY_RESISTANCE, false);
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
buffer.setUint16(statusData.batteryInternalResistance, false);
|
|
130
|
+
}
|
|
131
|
+
buffer.setUint8(statusData.temperature);
|
|
132
|
+
if (statusData.remainingBatteryCapacity === undefined) {
|
|
133
|
+
buffer.setUint8(UNKNOWN_BATTERY_CAPACITY);
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
buffer.setUint8((UNKNOWN_BATTERY_CAPACITY - 1) * (statusData.remainingBatteryCapacity / 100));
|
|
137
|
+
}
|
|
138
|
+
buffer.setUint8(statusData.lastEventSequenceNumber);
|
|
139
|
+
break;
|
|
140
|
+
case hardwareTypes.MTXLORA:
|
|
141
|
+
case hardwareTypes.ELIMP:
|
|
142
|
+
default:
|
|
143
|
+
throw new Error(`${Status.getId()}: hardware type ${hardware.type} is not supported`);
|
|
144
|
+
}
|
|
145
|
+
return Command.toBytes(COMMAND_ID, buffer.getBytesToOffset());
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
Status.id = COMMAND_ID;
|
|
149
|
+
Status.directionType = UPLINK;
|
|
150
|
+
Status.examples = examples;
|
|
151
|
+
Status.hasParameters = true;
|
|
152
|
+
export default Status;
|
|
153
|
+
//# sourceMappingURL=Status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Status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CAAC;AA2GzC,eAAe,MAAM,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Command from '../../Command.js';
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
2
|
import { TTime2000 } from '../../utils/time.js';
|
|
3
3
|
/**
|
|
4
4
|
* Time2000 command parameters
|
|
@@ -15,18 +15,19 @@ interface ITime2000Parameters {
|
|
|
15
15
|
/**
|
|
16
16
|
* Uplink command.
|
|
17
17
|
*
|
|
18
|
-
* @example
|
|
18
|
+
* @example create command instance from command body hex dump
|
|
19
19
|
* ```js
|
|
20
|
-
* import
|
|
20
|
+
* import CorrectTime2000Response from 'jooby-codec/commands/uplink/CorrectTime2000Response';
|
|
21
21
|
*
|
|
22
|
-
* //
|
|
23
|
-
* const
|
|
24
|
-
* const command =
|
|
22
|
+
* // failure
|
|
23
|
+
* const commandBody = new Uint8Array([0x4d, 0x2b, 0xbd, 0x98, 0xad]);
|
|
24
|
+
* const command = CorrectTime2000Response.fromBytes(commandBody);
|
|
25
25
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
26
|
+
* console.log(command.parameters);
|
|
27
|
+
* // output:
|
|
28
|
+
* {sequenceNumber: 77, time: 733845677}
|
|
29
29
|
* ```
|
|
30
|
+
*
|
|
30
31
|
* [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/uplink/Time2000.md)
|
|
31
32
|
*/
|
|
32
33
|
declare class Time2000 extends Command {
|
|
@@ -34,6 +35,7 @@ declare class Time2000 extends Command {
|
|
|
34
35
|
constructor(parameters: ITime2000Parameters);
|
|
35
36
|
static readonly id = 9;
|
|
36
37
|
static readonly directionType = 2;
|
|
38
|
+
static readonly examples: TCommandExampleList;
|
|
37
39
|
static readonly hasParameters = true;
|
|
38
40
|
static fromBytes(data: Uint8Array): Time2000;
|
|
39
41
|
toBytes(): Uint8Array;
|
|
@@ -3,21 +3,30 @@ import CommandBinaryBuffer from '../../CommandBinaryBuffer.js';
|
|
|
3
3
|
import { UPLINK } from '../../constants/directions.js';
|
|
4
4
|
const COMMAND_ID = 0x09;
|
|
5
5
|
const COMMAND_BODY_SIZE = 5;
|
|
6
|
+
const examples = [
|
|
7
|
+
{
|
|
8
|
+
name: '',
|
|
9
|
+
// time: 2023-04-03T14:01:17.000Z
|
|
10
|
+
parameters: { sequenceNumber: 77, time: 733845677 },
|
|
11
|
+
hex: { header: '09 05', body: '4d 2b bd 98 ad' }
|
|
12
|
+
}
|
|
13
|
+
];
|
|
6
14
|
/**
|
|
7
15
|
* Uplink command.
|
|
8
16
|
*
|
|
9
|
-
* @example
|
|
17
|
+
* @example create command instance from command body hex dump
|
|
10
18
|
* ```js
|
|
11
|
-
* import
|
|
19
|
+
* import CorrectTime2000Response from 'jooby-codec/commands/uplink/CorrectTime2000Response';
|
|
12
20
|
*
|
|
13
|
-
* //
|
|
14
|
-
* const
|
|
15
|
-
* const command =
|
|
21
|
+
* // failure
|
|
22
|
+
* const commandBody = new Uint8Array([0x4d, 0x2b, 0xbd, 0x98, 0xad]);
|
|
23
|
+
* const command = CorrectTime2000Response.fromBytes(commandBody);
|
|
16
24
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
25
|
+
* console.log(command.parameters);
|
|
26
|
+
* // output:
|
|
27
|
+
* {sequenceNumber: 77, time: 733845677}
|
|
20
28
|
* ```
|
|
29
|
+
*
|
|
21
30
|
* [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/uplink/Time2000.md)
|
|
22
31
|
*/
|
|
23
32
|
class Time2000 extends Command {
|
|
@@ -51,6 +60,7 @@ class Time2000 extends Command {
|
|
|
51
60
|
}
|
|
52
61
|
Time2000.id = COMMAND_ID;
|
|
53
62
|
Time2000.directionType = UPLINK;
|
|
63
|
+
Time2000.examples = examples;
|
|
54
64
|
Time2000.hasParameters = true;
|
|
55
65
|
export default Time2000;
|
|
56
66
|
//# sourceMappingURL=Time2000.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Time2000.js","sourceRoot":"","sources":["../../../src/commands/uplink/Time2000.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Time2000.js","sourceRoot":"","sources":["../../../src/commands/uplink/Time2000.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAmB,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAkBrD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAE5B,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,EAAE;QACR,iCAAiC;QACjC,UAAU,EAAE,EAAC,cAAc,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAC;QACjD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAC;KACjD;CACJ,CAAC;AAGF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,QAAS,SAAQ,OAAO;IAC1B,YAAqB,UAA+B;QAChD,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAqB;IAEpD,CAAC;IAYD,oCAAoC;IACpC,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,IAAK,IAAI,CAAC,UAAU,KAAK,iBAAiB,EAAG;YACzC,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,wBAAwB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;SAChF;QAED,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAC7C,MAAM,UAAU,GAAG;YACf,cAAc,EAAE,MAAM,CAAC,QAAQ,EAAE;YACjC,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE;SACzB,CAAC;QAEF,IAAK,CAAC,MAAM,CAAC,OAAO,EAAG;YACnB,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,8BAA8B,CAAC,CAAC;SACpE;QAED,OAAO,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAC;IACpC,CAAC;IAED,0CAA0C;IAC1C,OAAO;QACH,MAAM,EAAC,cAAc,EAAE,IAAI,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAC/C,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;QAE1D,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;QAChC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAErB,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AArCe,WAAE,GAAG,UAAU,CAAC;AAEhB,sBAAa,GAAG,MAAM,CAAC;AAEvB,iBAAQ,GAAG,QAAQ,CAAC;AAEpB,sBAAa,GAAG,IAAI,CAAC;AAmCzC,eAAe,QAAQ,CAAC"}
|
|
@@ -3,23 +3,23 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @packageDocumentation
|
|
5
5
|
*/
|
|
6
|
-
export { default as
|
|
6
|
+
export { default as CorrectTime2000Response } from './CorrectTime2000Response.js';
|
|
7
|
+
export { default as CurrentMC } from './CurrentMC.js';
|
|
7
8
|
export { default as DataDayMC } from './DataDayMC.js';
|
|
8
9
|
export { default as DataHourMC } from './DataHourMC.js';
|
|
9
10
|
export { default as ExAbsCurrentMC } from './ExAbsCurrentMC.js';
|
|
10
|
-
export { default as ExAbsArchiveDaysMC } from './ExAbsArchiveDaysMC.js';
|
|
11
|
-
export { default as ExAbsArchiveHoursMC } from './ExAbsArchiveHoursMC.js';
|
|
12
11
|
export { default as ExAbsDayMC } from './ExAbsDayMC.js';
|
|
13
12
|
export { default as ExAbsHourMC } from './ExAbsHourMC.js';
|
|
14
|
-
export { default as
|
|
15
|
-
export { default as
|
|
16
|
-
export { default as
|
|
17
|
-
export { default as
|
|
18
|
-
export { default as
|
|
19
|
-
export { default as
|
|
13
|
+
export { default as GetArchiveDaysMCResponse } from './GetArchiveDaysMCResponse.js';
|
|
14
|
+
export { default as GetArchiveEventsResponse } from './GetArchiveEventsResponse.js';
|
|
15
|
+
export { default as GetArchiveHoursMCResponse } from './GetArchiveHoursMCResponse.js';
|
|
16
|
+
export { default as GetExAbsArchiveDaysMCResponse } from './GetExAbsArchiveDaysMCResponse.js';
|
|
17
|
+
export { default as GetExAbsArchiveHoursMCResponse } from './GetExAbsArchiveHoursMCResponse.js';
|
|
18
|
+
export { default as GetLmicInfoResponse } from './GetLmicInfoResponse.js';
|
|
19
|
+
export { default as GetParameterResponse } from './GetParameterResponse.js';
|
|
20
20
|
export { default as LastEvent } from './LastEvent.js';
|
|
21
21
|
export { default as NewEvent } from './NewEvent.js';
|
|
22
|
-
export { default as
|
|
23
|
-
export { default as
|
|
24
|
-
export { default as
|
|
22
|
+
export { default as SetTime2000Response } from './SetTime2000Response.js';
|
|
23
|
+
export { default as SoftRestartResponse } from './SoftRestartResponse.js';
|
|
24
|
+
export { default as Status } from './Status.js';
|
|
25
25
|
export { default as Time2000 } from './Time2000.js';
|
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @packageDocumentation
|
|
5
5
|
*/
|
|
6
|
-
export { default as
|
|
6
|
+
export { default as CorrectTime2000Response } from './CorrectTime2000Response.js';
|
|
7
|
+
export { default as CurrentMC } from './CurrentMC.js';
|
|
7
8
|
export { default as DataDayMC } from './DataDayMC.js';
|
|
8
9
|
export { default as DataHourMC } from './DataHourMC.js';
|
|
9
10
|
export { default as ExAbsCurrentMC } from './ExAbsCurrentMC.js';
|
|
10
|
-
export { default as ExAbsArchiveDaysMC } from './ExAbsArchiveDaysMC.js';
|
|
11
|
-
export { default as ExAbsArchiveHoursMC } from './ExAbsArchiveHoursMC.js';
|
|
12
11
|
export { default as ExAbsDayMC } from './ExAbsDayMC.js';
|
|
13
12
|
export { default as ExAbsHourMC } from './ExAbsHourMC.js';
|
|
14
|
-
export { default as
|
|
15
|
-
export { default as
|
|
16
|
-
export { default as
|
|
17
|
-
export { default as
|
|
18
|
-
export { default as
|
|
19
|
-
export { default as
|
|
13
|
+
export { default as GetArchiveDaysMCResponse } from './GetArchiveDaysMCResponse.js';
|
|
14
|
+
export { default as GetArchiveEventsResponse } from './GetArchiveEventsResponse.js';
|
|
15
|
+
export { default as GetArchiveHoursMCResponse } from './GetArchiveHoursMCResponse.js';
|
|
16
|
+
export { default as GetExAbsArchiveDaysMCResponse } from './GetExAbsArchiveDaysMCResponse.js';
|
|
17
|
+
export { default as GetExAbsArchiveHoursMCResponse } from './GetExAbsArchiveHoursMCResponse.js';
|
|
18
|
+
export { default as GetLmicInfoResponse } from './GetLmicInfoResponse.js';
|
|
19
|
+
export { default as GetParameterResponse } from './GetParameterResponse.js';
|
|
20
20
|
export { default as LastEvent } from './LastEvent.js';
|
|
21
21
|
export { default as NewEvent } from './NewEvent.js';
|
|
22
|
-
export { default as
|
|
23
|
-
export { default as
|
|
24
|
-
export { default as
|
|
22
|
+
export { default as SetTime2000Response } from './SetTime2000Response.js';
|
|
23
|
+
export { default as SoftRestartResponse } from './SoftRestartResponse.js';
|
|
24
|
+
export { default as Status } from './Status.js';
|
|
25
25
|
export { default as Time2000 } from './Time2000.js';
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/uplink/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/uplink/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAC,OAAO,IAAI,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAC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
|
/**
|
|
2
2
|
* Device parameters. Used in SetParameter/GetParameter.
|
|
3
3
|
*/
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
*/
|
|
4
|
+
/** interval of data sending from device */
|
|
5
|
+
export declare const DATA_SENDING_INTERVAL = 1;
|
|
6
|
+
/** the parameter defines the hour of the day by which the daily consumption is calculated */
|
|
7
|
+
export declare const DAY_CHECKOUT_HOUR = 4;
|
|
8
|
+
/** type of device data sending */
|
|
9
|
+
export declare const OUTPUT_DATA_TYPE = 5;
|
|
10
|
+
/** type of priority data delivery, with confirmation or not */
|
|
11
|
+
export declare const DELIVERY_TYPE_OF_PRIORITY_DATA = 8;
|
|
12
|
+
/** device activation method */
|
|
13
|
+
export declare const ACTIVATION_METHOD = 9;
|
|
14
|
+
/** device battery depassivation information */
|
|
15
|
+
export declare const BATTERY_DEPASSIVATION_INFO = 10;
|
|
16
|
+
/** device battery minimum required battery load time per day to prevent passivation */
|
|
17
|
+
export declare const BATTERY_MINIMAL_LOAD_TIME = 11;
|
|
18
|
+
/** setup parameters for RX2 window config */
|
|
19
|
+
export declare const RX2_CONFIG = 18;
|
|
20
|
+
/** setup initial data for device, pulse counter, pulse coefficient, meter value */
|
|
7
21
|
export declare const INITIAL_DATA = 23;
|
|
8
|
-
/**
|
|
9
|
-
* Status of device data sending, absolute value or pulse counter
|
|
10
|
-
*/
|
|
22
|
+
/** status of device data sending, absolute value or pulse counter */
|
|
11
23
|
export declare const ABSOLUTE_DATA_STATUS = 24;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
*/
|
|
24
|
+
/** device serial number */
|
|
25
|
+
export declare const SERIAL_NUMBER = 25;
|
|
26
|
+
/** device geolocation */
|
|
27
|
+
export declare const GEOLOCATION = 26;
|
|
28
|
+
/** interval in seconds when device send EXTRA FRAME */
|
|
29
|
+
export declare const EXTRA_FRAME_INTERVAL = 28;
|
|
30
|
+
/** same as INITIAL_DATA for a specific channel */
|
|
15
31
|
export declare const INITIAL_DATA_MULTI_CHANNEL = 29;
|
|
16
|
-
/**
|
|
17
|
-
* Status of device data sending, absolute value or pulse counter for a specific channel
|
|
18
|
-
*/
|
|
32
|
+
/** status of device data sending, absolute value or pulse counter for a specific channel */
|
|
19
33
|
export declare const ABSOLUTE_DATA_STATUS_MULTI_CHANNEL = 30;
|
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Device parameters. Used in SetParameter/GetParameter.
|
|
3
3
|
*/
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
*/
|
|
4
|
+
/** interval of data sending from device */
|
|
5
|
+
export const DATA_SENDING_INTERVAL = 1;
|
|
6
|
+
/** the parameter defines the hour of the day by which the daily consumption is calculated */
|
|
7
|
+
export const DAY_CHECKOUT_HOUR = 4;
|
|
8
|
+
/** type of device data sending */
|
|
9
|
+
export const OUTPUT_DATA_TYPE = 5;
|
|
10
|
+
/** type of priority data delivery, with confirmation or not */
|
|
11
|
+
export const DELIVERY_TYPE_OF_PRIORITY_DATA = 8;
|
|
12
|
+
/** device activation method */
|
|
13
|
+
export const ACTIVATION_METHOD = 9;
|
|
14
|
+
/** device battery depassivation information */
|
|
15
|
+
export const BATTERY_DEPASSIVATION_INFO = 10;
|
|
16
|
+
/** device battery minimum required battery load time per day to prevent passivation */
|
|
17
|
+
export const BATTERY_MINIMAL_LOAD_TIME = 11;
|
|
18
|
+
/** setup parameters for RX2 window config */
|
|
19
|
+
export const RX2_CONFIG = 18;
|
|
20
|
+
/** setup initial data for device, pulse counter, pulse coefficient, meter value */
|
|
7
21
|
export const INITIAL_DATA = 23;
|
|
8
|
-
/**
|
|
9
|
-
* Status of device data sending, absolute value or pulse counter
|
|
10
|
-
*/
|
|
22
|
+
/** status of device data sending, absolute value or pulse counter */
|
|
11
23
|
export const ABSOLUTE_DATA_STATUS = 24;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
-
*/
|
|
24
|
+
/** device serial number */
|
|
25
|
+
export const SERIAL_NUMBER = 25;
|
|
26
|
+
/** device geolocation */
|
|
27
|
+
export const GEOLOCATION = 26;
|
|
28
|
+
/** interval in seconds when device send EXTRA FRAME */
|
|
29
|
+
export const EXTRA_FRAME_INTERVAL = 28;
|
|
30
|
+
/** same as INITIAL_DATA for a specific channel */
|
|
15
31
|
export const INITIAL_DATA_MULTI_CHANNEL = 29;
|
|
16
|
-
/**
|
|
17
|
-
* Status of device data sending, absolute value or pulse counter for a specific channel
|
|
18
|
-
*/
|
|
32
|
+
/** status of device data sending, absolute value or pulse counter for a specific channel */
|
|
19
33
|
export const ABSOLUTE_DATA_STATUS_MULTI_CHANNEL = 30;
|
|
20
34
|
//# sourceMappingURL=deviceParameters.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceParameters.js","sourceRoot":"","sources":["../../src/constants/deviceParameters.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH
|
|
1
|
+
{"version":3,"file":"deviceParameters.js","sourceRoot":"","sources":["../../src/constants/deviceParameters.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,2CAA2C;AAC3C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEvC,6FAA6F;AAC7F,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAEnC,kCAAkC;AAClC,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAElC,+DAA+D;AAC/D,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC;AAEhD,+BAA+B;AAC/B,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAEnC,+CAA+C;AAC/C,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAE7C,uFAAuF;AACvF,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAE5C,6CAA6C;AAC7C,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,CAAC;AAE7B,mFAAmF;AACnF,MAAM,CAAC,MAAM,YAAY,GAAG,EAAE,CAAC;AAE/B,qEAAqE;AACrE,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC,2BAA2B;AAC3B,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAC;AAEhC,yBAAyB;AACzB,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AAE9B,uDAAuD;AACvD,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC,kDAAkD;AAClD,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAE7C,4FAA4F;AAC5F,MAAM,CAAC,MAAM,kCAAkC,GAAG,EAAE,CAAC"}
|