jooby-codec 1.9.0 → 1.10.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/CommandBinaryBuffer.js +5 -5
- package/dist/CommandBinaryBuffer.js.map +1 -1
- package/dist/commands/downlink/GetArchiveDaysMC.d.ts +5 -8
- package/dist/commands/downlink/GetArchiveDaysMC.js +13 -2
- package/dist/commands/downlink/GetArchiveDaysMC.js.map +1 -1
- package/dist/commands/downlink/GetArchiveHoursMC.d.ts +7 -6
- package/dist/commands/downlink/GetArchiveHoursMC.js +13 -2
- package/dist/commands/downlink/GetArchiveHoursMC.js.map +1 -1
- package/dist/commands/downlink/GetExAbsArchiveDaysMC.d.ts +6 -8
- package/dist/commands/downlink/GetExAbsArchiveDaysMC.js +14 -2
- package/dist/commands/downlink/GetExAbsArchiveDaysMC.js.map +1 -1
- package/dist/commands/downlink/GetExAbsArchiveHoursMC.d.ts +4 -7
- package/dist/commands/downlink/GetExAbsArchiveHoursMC.js +12 -1
- package/dist/commands/downlink/GetExAbsArchiveHoursMC.js.map +1 -1
- package/dist/commands/uplink/CurrentMC.d.ts +0 -1
- package/dist/commands/uplink/CurrentMC.js +9 -10
- package/dist/commands/uplink/CurrentMC.js.map +1 -1
- package/dist/commands/uplink/{DataDayMC.d.ts → DayMC.d.ts} +14 -14
- package/dist/commands/uplink/{DataDayMC.js → DayMC.js} +16 -16
- package/dist/commands/uplink/DayMC.js.map +1 -0
- package/dist/commands/uplink/ExAbsCurrentMC.d.ts +1 -3
- package/dist/commands/uplink/ExAbsCurrentMC.js +3 -5
- package/dist/commands/uplink/ExAbsCurrentMC.js.map +1 -1
- package/dist/commands/uplink/ExAbsDayMC.d.ts +2 -4
- package/dist/commands/uplink/ExAbsDayMC.js +3 -5
- package/dist/commands/uplink/ExAbsDayMC.js.map +1 -1
- package/dist/commands/uplink/ExAbsHourMC.d.ts +1 -1
- package/dist/commands/uplink/ExAbsHourMC.js +2 -2
- package/dist/commands/uplink/GetArchiveDaysMCResponse.d.ts +1 -1
- package/dist/commands/uplink/GetArchiveDaysMCResponse.js +3 -3
- package/dist/commands/uplink/GetArchiveHoursMCResponse.d.ts +3 -11
- package/dist/commands/uplink/GetArchiveHoursMCResponse.js +6 -6
- package/dist/commands/uplink/GetArchiveHoursMCResponse.js.map +1 -1
- package/dist/commands/uplink/GetExAbsArchiveDaysMCResponse.d.ts +1 -1
- package/dist/commands/uplink/GetExAbsArchiveDaysMCResponse.js +3 -3
- package/dist/commands/uplink/GetExAbsArchiveDaysMCResponse.js.map +1 -1
- package/dist/commands/uplink/GetExAbsArchiveHoursMCResponse.js +1 -1
- package/dist/commands/uplink/{DataHourMC.d.ts → HourMC.d.ts} +13 -13
- package/dist/commands/uplink/{DataHourMC.js → HourMC.js} +19 -19
- package/dist/commands/uplink/HourMC.js.map +1 -0
- package/dist/commands/uplink/NewEvent.js +6 -4
- package/dist/commands/uplink/NewEvent.js.map +1 -1
- package/dist/commands/uplink/index.d.ts +2 -2
- package/dist/commands/uplink/index.js +2 -2
- package/dist/commands/uplink/index.js.map +1 -1
- package/package.json +1 -1
- package/readme.md +2 -2
- package/dist/commands/uplink/DataDayMC.js.map +0 -1
- package/dist/commands/uplink/DataHourMC.js.map +0 -1
|
@@ -2,9 +2,9 @@ import { TCommandExampleList } from '../../Command.js';
|
|
|
2
2
|
import { TTime2000 } from '../../utils/time.js';
|
|
3
3
|
import CurrentMC, { ICurrentMCParameters } from './CurrentMC.js';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* DayMC command parameters.
|
|
6
6
|
*/
|
|
7
|
-
interface
|
|
7
|
+
interface IDayMCParameters extends ICurrentMCParameters {
|
|
8
8
|
startTime: TTime2000;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
@@ -12,36 +12,36 @@ interface IDataDayMCParameters extends ICurrentMCParameters {
|
|
|
12
12
|
*
|
|
13
13
|
* @example create command instance from command body hex dump
|
|
14
14
|
* ```js
|
|
15
|
-
* import
|
|
15
|
+
* import DayMC from 'jooby-codec/commands/uplink/DayMC';
|
|
16
16
|
*
|
|
17
17
|
* const commandBody = new Uint8Array([
|
|
18
|
-
* 0x2f, 0x97,
|
|
18
|
+
* 0x2f, 0x97, 0x55, 0x0c, 0x83, 0x01, 0x08, 0x0a
|
|
19
19
|
* ]);
|
|
20
|
-
* const command =
|
|
20
|
+
* const command = DayMC.fromBytes(commandBody);
|
|
21
21
|
*
|
|
22
22
|
* console.log(command.parameters);
|
|
23
23
|
* // output:
|
|
24
24
|
* {
|
|
25
25
|
* startTime: 756604800,
|
|
26
|
-
* channelList: [
|
|
26
|
+
* channelList: [,
|
|
27
|
+
* {value: 12, index: 1}
|
|
27
28
|
* {value: 131, index: 3},
|
|
28
29
|
* {value: 8, index: 5},
|
|
29
|
-
* {value: 10, index: 7}
|
|
30
|
-
* {value: 12, index: 1}
|
|
30
|
+
* {value: 10, index: 7}
|
|
31
31
|
* ]
|
|
32
32
|
* }
|
|
33
33
|
* ```
|
|
34
34
|
*
|
|
35
|
-
* [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/
|
|
35
|
+
* [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/uplink/DayMC.md)
|
|
36
36
|
*/
|
|
37
|
-
declare class
|
|
38
|
-
parameters:
|
|
39
|
-
constructor(parameters:
|
|
37
|
+
declare class DayMC extends CurrentMC {
|
|
38
|
+
parameters: IDayMCParameters;
|
|
39
|
+
constructor(parameters: IDayMCParameters);
|
|
40
40
|
static readonly id = 22;
|
|
41
41
|
static readonly directionType = 2;
|
|
42
42
|
static readonly examples: TCommandExampleList;
|
|
43
43
|
static readonly hasParameters = true;
|
|
44
|
-
static fromBytes(data: Uint8Array):
|
|
44
|
+
static fromBytes(data: Uint8Array): DayMC;
|
|
45
45
|
toBytes(): Uint8Array;
|
|
46
46
|
}
|
|
47
|
-
export default
|
|
47
|
+
export default DayMC;
|
|
@@ -20,7 +20,7 @@ const examples = [
|
|
|
20
20
|
{ index: 1, value: 12 }
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
|
-
hex: { header: '16
|
|
23
|
+
hex: { header: '16 08', body: '2f 97 55 0c 83 01 08 0a' }
|
|
24
24
|
}
|
|
25
25
|
];
|
|
26
26
|
/**
|
|
@@ -28,29 +28,29 @@ const examples = [
|
|
|
28
28
|
*
|
|
29
29
|
* @example create command instance from command body hex dump
|
|
30
30
|
* ```js
|
|
31
|
-
* import
|
|
31
|
+
* import DayMC from 'jooby-codec/commands/uplink/DayMC';
|
|
32
32
|
*
|
|
33
33
|
* const commandBody = new Uint8Array([
|
|
34
|
-
* 0x2f, 0x97,
|
|
34
|
+
* 0x2f, 0x97, 0x55, 0x0c, 0x83, 0x01, 0x08, 0x0a
|
|
35
35
|
* ]);
|
|
36
|
-
* const command =
|
|
36
|
+
* const command = DayMC.fromBytes(commandBody);
|
|
37
37
|
*
|
|
38
38
|
* console.log(command.parameters);
|
|
39
39
|
* // output:
|
|
40
40
|
* {
|
|
41
41
|
* startTime: 756604800,
|
|
42
|
-
* channelList: [
|
|
42
|
+
* channelList: [,
|
|
43
|
+
* {value: 12, index: 1}
|
|
43
44
|
* {value: 131, index: 3},
|
|
44
45
|
* {value: 8, index: 5},
|
|
45
|
-
* {value: 10, index: 7}
|
|
46
|
-
* {value: 12, index: 1}
|
|
46
|
+
* {value: 10, index: 7}
|
|
47
47
|
* ]
|
|
48
48
|
* }
|
|
49
49
|
* ```
|
|
50
50
|
*
|
|
51
|
-
* [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/
|
|
51
|
+
* [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/uplink/DayMC.md)
|
|
52
52
|
*/
|
|
53
|
-
class
|
|
53
|
+
class DayMC extends CurrentMC {
|
|
54
54
|
constructor(parameters) {
|
|
55
55
|
super(parameters);
|
|
56
56
|
this.parameters = parameters;
|
|
@@ -66,7 +66,7 @@ class DataDayMC extends CurrentMC {
|
|
|
66
66
|
index: channelIndex
|
|
67
67
|
}));
|
|
68
68
|
parameters.startTime = getSecondsFromDate(date);
|
|
69
|
-
return new
|
|
69
|
+
return new DayMC(parameters);
|
|
70
70
|
}
|
|
71
71
|
// returns full message - header with body
|
|
72
72
|
toBytes() {
|
|
@@ -78,9 +78,9 @@ class DataDayMC extends CurrentMC {
|
|
|
78
78
|
return Command.toBytes(COMMAND_ID, buffer.getBytesToOffset());
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
export default
|
|
86
|
-
//# sourceMappingURL=
|
|
81
|
+
DayMC.id = COMMAND_ID;
|
|
82
|
+
DayMC.directionType = UPLINK;
|
|
83
|
+
DayMC.examples = examples;
|
|
84
|
+
DayMC.hasParameters = true;
|
|
85
|
+
export default DayMC;
|
|
86
|
+
//# sourceMappingURL=DayMC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DayMC.js","sourceRoot":"","sources":["../../../src/commands/uplink/DayMC.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAE5D,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAoC,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAC,kBAAkB,EAAY,MAAM,qBAAqB,CAAC;AAClE,OAAO,SAAiC,MAAM,gBAAgB,CAAC;AAC/D,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAWrD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,qDAAqD;AACrD,cAAc;AACd,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAEjC,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,uCAAuC;QAC7C,UAAU,EAAE;YACR,SAAS,EAAE,SAAS;YACpB,WAAW,EAAE;gBACT,EAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,EAAC;gBACtB,EAAC,KAAK,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AM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC1B,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAChC,WAAW,CAAC,OAAO,CAAC,CAAC,EAAC,KAAK,EAAC,EAAE,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;QAEjE,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAClE,CAAC;;AApCe,QAAE,GAAG,UAAU,CAAC;AAEhB,mBAAa,GAAG,MAAM,CAAC;AAEvB,cAAQ,GAAG,QAAQ,CAAC;AAEpB,mBAAa,GAAG,IAAI,CAAC;AAkCzC,eAAe,KAAK,CAAC"}
|
|
@@ -10,9 +10,7 @@ interface IExAbsCurrentMCParameters {
|
|
|
10
10
|
* ```js
|
|
11
11
|
* import ExAbsCurrentMC from 'jooby-codec/commands/uplink/ExAbsCurrentMC';
|
|
12
12
|
*
|
|
13
|
-
* const commandBody = new Uint8Array([
|
|
14
|
-
* 0x1f, 0x0f, 0x04, 0x08, 0x64, 0xd6, 0x02
|
|
15
|
-
* ]);
|
|
13
|
+
* const commandBody = new Uint8Array([0x04, 0x64, 0xd6, 0x02']);
|
|
16
14
|
* const command = ExAbsCurrentMC.fromBytes(commandBody);
|
|
17
15
|
*
|
|
18
16
|
* console.log(command.parameters);
|
|
@@ -7,7 +7,7 @@ const COMMAND_ID = 0x0f1f;
|
|
|
7
7
|
const COMMAND_BODY_MAX_SIZE = 87;
|
|
8
8
|
const examples = [
|
|
9
9
|
{
|
|
10
|
-
name: 'absolute current
|
|
10
|
+
name: 'absolute current value from 3 channel',
|
|
11
11
|
parameters: {
|
|
12
12
|
channelList: [
|
|
13
13
|
{
|
|
@@ -19,7 +19,7 @@ const examples = [
|
|
|
19
19
|
},
|
|
20
20
|
hex: {
|
|
21
21
|
header: '1f 0f 04',
|
|
22
|
-
body: '
|
|
22
|
+
body: '04 64 d6 02'
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
];
|
|
@@ -30,9 +30,7 @@ const examples = [
|
|
|
30
30
|
* ```js
|
|
31
31
|
* import ExAbsCurrentMC from 'jooby-codec/commands/uplink/ExAbsCurrentMC';
|
|
32
32
|
*
|
|
33
|
-
* const commandBody = new Uint8Array([
|
|
34
|
-
* 0x1f, 0x0f, 0x04, 0x08, 0x64, 0xd6, 0x02
|
|
35
|
-
* ]);
|
|
33
|
+
* const commandBody = new Uint8Array([0x04, 0x64, 0xd6, 0x02']);
|
|
36
34
|
* const command = ExAbsCurrentMC.fromBytes(commandBody);
|
|
37
35
|
*
|
|
38
36
|
* console.log(command.parameters);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExAbsCurrentMC.js","sourceRoot":"","sources":["../../../src/commands/uplink/ExAbsCurrentMC.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAA4C,MAAM,8BAA8B,CAAC;AACxF,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAOrD,MAAM,UAAU,GAAG,MAAM,CAAC;AAE1B,2CAA2C;AAC3C,kDAAkD;AAClD,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAEjC,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"ExAbsCurrentMC.js","sourceRoot":"","sources":["../../../src/commands/uplink/ExAbsCurrentMC.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAA4C,MAAM,8BAA8B,CAAC;AACxF,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAOrD,MAAM,UAAU,GAAG,MAAM,CAAC;AAE1B,2CAA2C;AAC3C,kDAAkD;AAClD,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAEjC,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,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,CAAC;AAsBzC,eAAe,cAAc,CAAC"}
|
|
@@ -13,9 +13,7 @@ interface IExAbsDayMCParameters {
|
|
|
13
13
|
* ```js
|
|
14
14
|
* import ExAbsDayMC from 'jooby-codec/commands/uplink/ExAbsDayMC';
|
|
15
15
|
*
|
|
16
|
-
* const commandBody = new Uint8Array([
|
|
17
|
-
* 0x1f, 0x0b, 0x06, 0x2e, 0x6a, 0x01, 0x64, 0xd6, 0x02
|
|
18
|
-
* ]);
|
|
16
|
+
* const commandBody = new Uint8Array([0x2e, 0x6a, 0x01, 0x64, 0xd6, 0x02']);
|
|
19
17
|
* const command = ExAbsDayMC.fromBytes(commandBody);
|
|
20
18
|
*
|
|
21
19
|
* console.log(command.parameters);
|
|
@@ -25,7 +23,7 @@ interface IExAbsDayMCParameters {
|
|
|
25
23
|
* channelList: [
|
|
26
24
|
* {
|
|
27
25
|
* pulseCoefficient: 100,
|
|
28
|
-
* index:
|
|
26
|
+
* index: 1,
|
|
29
27
|
* value: 342
|
|
30
28
|
* }
|
|
31
29
|
* ]
|
|
@@ -15,7 +15,7 @@ const examples = [
|
|
|
15
15
|
channelList: [
|
|
16
16
|
{
|
|
17
17
|
pulseCoefficient: 100,
|
|
18
|
-
index:
|
|
18
|
+
index: 1,
|
|
19
19
|
value: 342
|
|
20
20
|
}
|
|
21
21
|
]
|
|
@@ -33,9 +33,7 @@ const examples = [
|
|
|
33
33
|
* ```js
|
|
34
34
|
* import ExAbsDayMC from 'jooby-codec/commands/uplink/ExAbsDayMC';
|
|
35
35
|
*
|
|
36
|
-
* const commandBody = new Uint8Array([
|
|
37
|
-
* 0x1f, 0x0b, 0x06, 0x2e, 0x6a, 0x01, 0x64, 0xd6, 0x02
|
|
38
|
-
* ]);
|
|
36
|
+
* const commandBody = new Uint8Array([0x2e, 0x6a, 0x01, 0x64, 0xd6, 0x02']);
|
|
39
37
|
* const command = ExAbsDayMC.fromBytes(commandBody);
|
|
40
38
|
*
|
|
41
39
|
* console.log(command.parameters);
|
|
@@ -45,7 +43,7 @@ const examples = [
|
|
|
45
43
|
* channelList: [
|
|
46
44
|
* {
|
|
47
45
|
* pulseCoefficient: 100,
|
|
48
|
-
* index:
|
|
46
|
+
* index: 1,
|
|
49
47
|
* value: 342
|
|
50
48
|
* }
|
|
51
49
|
* ]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExAbsDayMC.js","sourceRoot":"","sources":["../../../src/commands/uplink/ExAbsDayMC.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,mBAA4C,MAAM,8BAA8B,CAAC;AACxF,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAC,kBAAkB,EAAY,MAAM,qBAAqB,CAAC;AASlE,MAAM,UAAU,GAAG,MAAM,CAAC;AAE1B,0DAA0D;AAC1D,8DAA8D;AAC9D,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAEjC,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,gDAAgD;QACtD,UAAU,EAAE;YACR,SAAS,EAAE,SAAS;YACpB,WAAW,EAAE;gBACT;oBACI,gBAAgB,EAAE,GAAG;oBACrB,KAAK,EAAE,CAAC;oBACR,KAAK,EAAE,GAAG;iBACb;aACJ;SACJ;QACD,GAAG,EAAE;YACD,MAAM,EAAE,UAAU;YAClB,IAAI,EAAE,mBAAmB;SAC5B;KACJ;CACJ,CAAC;AAGF
|
|
1
|
+
{"version":3,"file":"ExAbsDayMC.js","sourceRoot":"","sources":["../../../src/commands/uplink/ExAbsDayMC.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,mBAA4C,MAAM,8BAA8B,CAAC;AACxF,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AACrD,OAA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,CAAC,CAAC;QAElD,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAClE,CAAC;;AA3BM,aAAE,GAAG,UAAU,CAAC;AAEP,wBAAa,GAAG,MAAM,CAAC;AAEvB,mBAAQ,GAAG,QAAQ,CAAC;AAEpB,wBAAa,GAAG,IAAI,CAAC;AAyBzC,eAAe,UAAU,CAAC"}
|
|
@@ -16,7 +16,7 @@ const examples = [
|
|
|
16
16
|
channelList: [
|
|
17
17
|
{
|
|
18
18
|
pulseCoefficient: 100,
|
|
19
|
-
index:
|
|
19
|
+
index: 1,
|
|
20
20
|
value: 342457,
|
|
21
21
|
diff: [128]
|
|
22
22
|
}
|
|
@@ -45,7 +45,7 @@ const examples = [
|
|
|
45
45
|
* channelList: [
|
|
46
46
|
* {
|
|
47
47
|
* pulseCoefficient: 100,
|
|
48
|
-
* index:
|
|
48
|
+
* index: 1,
|
|
49
49
|
* value: 342457,
|
|
50
50
|
* diff: [128]
|
|
51
51
|
* }
|
|
@@ -8,13 +8,13 @@ const COMMAND_ID = 0x1b;
|
|
|
8
8
|
const COMMAND_BODY_MAX_SIZE = 5104;
|
|
9
9
|
const examples = [
|
|
10
10
|
{
|
|
11
|
-
name: 'get day values from 2001.03.10 12:00:00 GMT for
|
|
11
|
+
name: 'get day values from 2001.03.10 12:00:00 GMT for 1 channel',
|
|
12
12
|
parameters: {
|
|
13
13
|
startTime: 2678227200,
|
|
14
14
|
days: 2,
|
|
15
15
|
channelList: [
|
|
16
16
|
{
|
|
17
|
-
index:
|
|
17
|
+
index: 1,
|
|
18
18
|
dayList: [234, 332]
|
|
19
19
|
}
|
|
20
20
|
]
|
|
@@ -41,7 +41,7 @@ const examples = [
|
|
|
41
41
|
* days: 2,
|
|
42
42
|
* channelList: [
|
|
43
43
|
* {
|
|
44
|
-
* index:
|
|
44
|
+
* index: 1,
|
|
45
45
|
* dayList: [234, 332]
|
|
46
46
|
* }
|
|
47
47
|
* ]
|
|
@@ -3,14 +3,6 @@ import { IChannelHours } from '../../CommandBinaryBuffer.js';
|
|
|
3
3
|
import { TTime2000 } from '../../utils/time.js';
|
|
4
4
|
/**
|
|
5
5
|
* GetArchiveHoursMCResponse command parameters
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* // archive hours values from 001-03-10T12:00:00.000Z with 1-hour diff
|
|
9
|
-
* {
|
|
10
|
-
* channelList: [{value: 101, index: 0, diff: [1]}],
|
|
11
|
-
* startTime: 756648000,
|
|
12
|
-
* hours: 1
|
|
13
|
-
* }
|
|
14
6
|
*/
|
|
15
7
|
interface IGetArchiveHoursMCResponseParameters {
|
|
16
8
|
channelList: Array<IChannelHours>;
|
|
@@ -35,10 +27,10 @@ interface IGetArchiveHoursMCResponseParameters {
|
|
|
35
27
|
* startTime: 756648000,
|
|
36
28
|
* hours: 1,
|
|
37
29
|
* channelList: [
|
|
38
|
-
* {index:
|
|
39
|
-
* {index: 1, value: 8, diff: [10]},
|
|
30
|
+
* {index: 1, value: 131, diff: [10]},
|
|
40
31
|
* {index: 2, value: 8, diff: [10]},
|
|
41
|
-
* {index: 3, value:
|
|
32
|
+
* {index: 3, value: 8, diff: [10]},
|
|
33
|
+
* {index: 4, value: 12, diff: [10]}
|
|
42
34
|
* ]
|
|
43
35
|
* }
|
|
44
36
|
* ```
|
|
@@ -13,10 +13,10 @@ const examples = [
|
|
|
13
13
|
startTime: 756648000,
|
|
14
14
|
hours: 1,
|
|
15
15
|
channelList: [
|
|
16
|
-
{ index:
|
|
17
|
-
{ index: 1, value: 8, diff: [10] },
|
|
16
|
+
{ index: 1, value: 131, diff: [10] },
|
|
18
17
|
{ index: 2, value: 8, diff: [10] },
|
|
19
|
-
{ index: 3, value:
|
|
18
|
+
{ index: 3, value: 8, diff: [10] },
|
|
19
|
+
{ index: 4, value: 12, diff: [10] }
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
hex: { header: '1a 0d', body: '2f 97 0c 0f 83 01 0a 08 0a 08 0a 0c 0a' }
|
|
@@ -40,10 +40,10 @@ const examples = [
|
|
|
40
40
|
* startTime: 756648000,
|
|
41
41
|
* hours: 1,
|
|
42
42
|
* channelList: [
|
|
43
|
-
* {index:
|
|
44
|
-
* {index: 1, value: 8, diff: [10]},
|
|
43
|
+
* {index: 1, value: 131, diff: [10]},
|
|
45
44
|
* {index: 2, value: 8, diff: [10]},
|
|
46
|
-
* {index: 3, value:
|
|
45
|
+
* {index: 3, value: 8, diff: [10]},
|
|
46
|
+
* {index: 4, value: 12, diff: [10]}
|
|
47
47
|
* ]
|
|
48
48
|
* }
|
|
49
49
|
* ```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GetArchiveHoursMCResponse.js","sourceRoot":"","sources":["../../../src/commands/uplink/GetArchiveHoursMCResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAoC,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"GetArchiveHoursMCResponse.js","sourceRoot":"","sources":["../../../src/commands/uplink/GetArchiveHoursMCResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAAoC,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAcrD,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,0EAA0E;AAC1E,mCAAmC;AACnC,0FAA0F;AAC1F,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAElC,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,uCAAuC;QAC7C,UAAU,EAAE;YACR,SAAS,EAAE,SAAS;YACpB,KAAK,EAAE,CAAC;YACR,WAAW,EAAE;gBACT,EAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,GAAG,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C,CAAC;QAEpE,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAClE,CAAC;;AAxBe,4BAAE,GAAG,UAAU,CAAC;AAEhB,uCAAa,GAAG,MAAM,CAAC;AAEvB,kCAAQ,GAAG,QAAQ,CAAC;AAEpB,uCAAa,GAAG,IAAI,CAAC;AAsBzC,eAAe,yBAAyB,CAAC"}
|
|
@@ -14,7 +14,7 @@ interface IGetExAbsArchiveDaysMCResponseParameters {
|
|
|
14
14
|
* import GetExAbsArchiveDaysMCResponse from 'jooby-codec/commands/uplink/GetExAbsArchiveDaysMCResponse';
|
|
15
15
|
*
|
|
16
16
|
* const commandBody = new Uint8Array([
|
|
17
|
-
* 0x2e, 0x6a,
|
|
17
|
+
* 0x2e, 0x6a, 0x08, 0x02, 0x94, 0x2b, 0xaa, 0x2c
|
|
18
18
|
* ]);
|
|
19
19
|
* const command = GetExAbsArchiveDaysMCResponse.fromBytes(commandBody);
|
|
20
20
|
*
|
|
@@ -8,7 +8,7 @@ const COMMAND_ID = 0x0d1f;
|
|
|
8
8
|
const COMMAND_BODY_MAX_SIZE = 6124;
|
|
9
9
|
const examples = [
|
|
10
10
|
{
|
|
11
|
-
name: '
|
|
11
|
+
name: 'archive days values at 4 channel from 2023.03.10 00:00:00 GMT',
|
|
12
12
|
parameters: {
|
|
13
13
|
startTime: 731721600,
|
|
14
14
|
days: 2,
|
|
@@ -19,7 +19,7 @@ const examples = [
|
|
|
19
19
|
}
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
|
-
hex: { header: '1f 0d 08', body: '2e 6a
|
|
22
|
+
hex: { header: '1f 0d 08', body: '2e 6a 08 02 94 2b aa 2c' }
|
|
23
23
|
}
|
|
24
24
|
];
|
|
25
25
|
/**
|
|
@@ -30,7 +30,7 @@ const examples = [
|
|
|
30
30
|
* import GetExAbsArchiveDaysMCResponse from 'jooby-codec/commands/uplink/GetExAbsArchiveDaysMCResponse';
|
|
31
31
|
*
|
|
32
32
|
* const commandBody = new Uint8Array([
|
|
33
|
-
* 0x2e, 0x6a,
|
|
33
|
+
* 0x2e, 0x6a, 0x08, 0x02, 0x94, 0x2b, 0xaa, 0x2c
|
|
34
34
|
* ]);
|
|
35
35
|
* const command = GetExAbsArchiveDaysMCResponse.fromBytes(commandBody);
|
|
36
36
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GetExAbsArchiveDaysMCResponse.js","sourceRoot":"","sources":["../../../src/commands/uplink/GetExAbsArchiveDaysMCResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAA0C,MAAM,8BAA8B,CAAC;AACtF,OAAO,EAAC,kBAAkB,EAAY,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAUrD,MAAM,UAAU,GAAG,MAAM,CAAC;AAE1B,sFAAsF;AACtF,0FAA0F;AAC1F,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAEnC,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE
|
|
1
|
+
{"version":3,"file":"GetExAbsArchiveDaysMCResponse.js","sourceRoot":"","sources":["../../../src/commands/uplink/GetExAbsArchiveDaysMCResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,mBAA0C,MAAM,8BAA8B,CAAC;AACtF,OAAO,EAAC,kBAAkB,EAAY,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAUrD,MAAM,UAAU,GAAG,MAAM,CAAC;AAE1B,sFAAsF;AACtF,0FAA0F;AAC1F,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAEnC,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,+DAA+D;QACrE,UAAU,EAAE;YACR,SAAS,EAAE,SAAS;YACp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3C;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,6BAA6B,CAAC,EAAC,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,kBAAkB,CAAC,IAAI,CAAC,EAAC,CAAC,CAAC;IACvG,CAAC;IAED,0CAA0C;IAC1C,OAAO;QACH,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,qBAAqB,CAAC,CAAC;QAC9D,MAAM,EAAC,WAAW,EAAE,SAAS,EAAE,IAAI,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QAEvD,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAC1B,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAChC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEtB,WAAW,CAAC,OAAO,CAAC,CAAC,EAAC,OAAO,EAAC,EAAE,EAAE;YAC9B,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7D,CAAC,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAClE,CAAC;;AA/CM,gCAAE,GAAG,UAAU,CAAC;AAEP,2CAAa,GAAG,MAAM,CAAC;AAEvB,sCAAQ,GAAG,QAAQ,CAAC;AAEpB,2CAAa,GAAG,IAAI,CAAC;AA6CzC,eAAe,6BAA6B,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { TCommandExampleList } from '../../Command.js';
|
|
|
2
2
|
import CurrentMC from './CurrentMC.js';
|
|
3
3
|
import { TTime2000 } from '../../utils/time.js';
|
|
4
4
|
import { IChannelHours } from '../../CommandBinaryBuffer.js';
|
|
5
|
-
interface
|
|
5
|
+
interface IHourMCParameters {
|
|
6
6
|
channelList: Array<IChannelHours>;
|
|
7
7
|
startTime: TTime2000;
|
|
8
8
|
hours: number;
|
|
@@ -12,12 +12,12 @@ interface IDataHourMCParameters {
|
|
|
12
12
|
*
|
|
13
13
|
* @example create command instance from command body hex dump
|
|
14
14
|
* ```js
|
|
15
|
-
* import
|
|
15
|
+
* import HourMC from 'jooby-codec/commands/uplink/HourMC';
|
|
16
16
|
*
|
|
17
17
|
* const commandBody = new Uint8Array([
|
|
18
18
|
* 0x2f, 0x97, 0x0c, 0x0f, 0x83, 0x01, 0x0a, 0xc0, 0x06, 0x0c, 0x26, 0x08, 0xea, 0x01, 0x0b
|
|
19
19
|
* ]);
|
|
20
|
-
* const command =
|
|
20
|
+
* const command = HourMC.fromBytes(commandBody);
|
|
21
21
|
*
|
|
22
22
|
* console.log(command.parameters);
|
|
23
23
|
* // output:
|
|
@@ -25,24 +25,24 @@ interface IDataHourMCParameters {
|
|
|
25
25
|
* startTime: 756648000,
|
|
26
26
|
* hours: 1,
|
|
27
27
|
* channelList: [
|
|
28
|
-
* {value: 131, index:
|
|
29
|
-
* {value: 832, index:
|
|
30
|
-
* {value: 38, index:
|
|
31
|
-
* {value: 234, index:
|
|
28
|
+
* {value: 131, index: 1, diff: [10]},
|
|
29
|
+
* {value: 832, index: 2, diff: [12]},
|
|
30
|
+
* {value: 38, index: 3, diff: [8]},
|
|
31
|
+
* {value: 234, index: 4, diff: [11]}
|
|
32
32
|
* ]
|
|
33
33
|
* }
|
|
34
34
|
* ```
|
|
35
35
|
*
|
|
36
|
-
* [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/
|
|
36
|
+
* [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/uplink/HourMC.md)
|
|
37
37
|
*/
|
|
38
|
-
declare class
|
|
39
|
-
parameters:
|
|
40
|
-
constructor(parameters:
|
|
38
|
+
declare class HourMC extends CurrentMC {
|
|
39
|
+
parameters: IHourMCParameters;
|
|
40
|
+
constructor(parameters: IHourMCParameters);
|
|
41
41
|
static readonly id = 23;
|
|
42
42
|
static readonly directionType = 2;
|
|
43
43
|
static readonly examples: TCommandExampleList;
|
|
44
44
|
static readonly hasParameters = true;
|
|
45
|
-
static fromBytes(data: Uint8Array):
|
|
45
|
+
static fromBytes(data: Uint8Array): HourMC;
|
|
46
46
|
toBytes(): Uint8Array;
|
|
47
47
|
}
|
|
48
|
-
export default
|
|
48
|
+
export default HourMC;
|
|
@@ -15,10 +15,10 @@ const examples = [
|
|
|
15
15
|
startTime: 756648000,
|
|
16
16
|
hours: 1,
|
|
17
17
|
channelList: [
|
|
18
|
-
{ index:
|
|
19
|
-
{ index:
|
|
20
|
-
{ index:
|
|
21
|
-
{ index:
|
|
18
|
+
{ index: 1, value: 131, diff: [10] },
|
|
19
|
+
{ index: 2, value: 832, diff: [12] },
|
|
20
|
+
{ index: 3, value: 38, diff: [8] },
|
|
21
|
+
{ index: 4, value: 234, diff: [11] }
|
|
22
22
|
]
|
|
23
23
|
},
|
|
24
24
|
hex: { header: '17 0f', body: '2f 97 0c 0f 83 01 0a c0 06 0c 26 08 ea 01 0b' }
|
|
@@ -29,12 +29,12 @@ const examples = [
|
|
|
29
29
|
*
|
|
30
30
|
* @example create command instance from command body hex dump
|
|
31
31
|
* ```js
|
|
32
|
-
* import
|
|
32
|
+
* import HourMC from 'jooby-codec/commands/uplink/HourMC';
|
|
33
33
|
*
|
|
34
34
|
* const commandBody = new Uint8Array([
|
|
35
35
|
* 0x2f, 0x97, 0x0c, 0x0f, 0x83, 0x01, 0x0a, 0xc0, 0x06, 0x0c, 0x26, 0x08, 0xea, 0x01, 0x0b
|
|
36
36
|
* ]);
|
|
37
|
-
* const command =
|
|
37
|
+
* const command = HourMC.fromBytes(commandBody);
|
|
38
38
|
*
|
|
39
39
|
* console.log(command.parameters);
|
|
40
40
|
* // output:
|
|
@@ -42,17 +42,17 @@ const examples = [
|
|
|
42
42
|
* startTime: 756648000,
|
|
43
43
|
* hours: 1,
|
|
44
44
|
* channelList: [
|
|
45
|
-
* {value: 131, index:
|
|
46
|
-
* {value: 832, index:
|
|
47
|
-
* {value: 38, index:
|
|
48
|
-
* {value: 234, index:
|
|
45
|
+
* {value: 131, index: 1, diff: [10]},
|
|
46
|
+
* {value: 832, index: 2, diff: [12]},
|
|
47
|
+
* {value: 38, index: 3, diff: [8]},
|
|
48
|
+
* {value: 234, index: 4, diff: [11]}
|
|
49
49
|
* ]
|
|
50
50
|
* }
|
|
51
51
|
* ```
|
|
52
52
|
*
|
|
53
|
-
* [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/
|
|
53
|
+
* [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/uplink/HourMC.md)
|
|
54
54
|
*/
|
|
55
|
-
class
|
|
55
|
+
class HourMC extends CurrentMC {
|
|
56
56
|
constructor(parameters) {
|
|
57
57
|
super(parameters);
|
|
58
58
|
this.parameters = parameters;
|
|
@@ -75,7 +75,7 @@ class DataHourMC extends CurrentMC {
|
|
|
75
75
|
}
|
|
76
76
|
channelList.push({ value, index: channelIndex, diff });
|
|
77
77
|
});
|
|
78
|
-
return new
|
|
78
|
+
return new HourMC({ channelList, hours, startTime: getSecondsFromDate(date) });
|
|
79
79
|
}
|
|
80
80
|
// returns full message - header with body
|
|
81
81
|
toBytes() {
|
|
@@ -93,9 +93,9 @@ class DataHourMC extends CurrentMC {
|
|
|
93
93
|
return Command.toBytes(COMMAND_ID, buffer.getBytesToOffset());
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
export default
|
|
101
|
-
//# sourceMappingURL=
|
|
96
|
+
HourMC.id = COMMAND_ID;
|
|
97
|
+
HourMC.directionType = UPLINK;
|
|
98
|
+
HourMC.examples = examples;
|
|
99
|
+
HourMC.hasParameters = true;
|
|
100
|
+
export default HourMC;
|
|
101
|
+
//# sourceMappingURL=HourMC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HourMC.js","sourceRoot":"","sources":["../../../src/commands/uplink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;QAEhC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACrB,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC7B,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAEhC,KAAM,MAAM,EAAC,KAAK,EAAE,IAAI,EAAC,IAAI,WAAW,EAAG;YACvC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;YAC/B,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;SACjE;QAED,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAClE,CAAC;;AAtDe,SAAE,GAAG,UAAU,CAAC;AAEhB,oBAAa,GAAG,MAAM,CAAC;AAEvB,eAAQ,GAAG,QAAQ,CAAC;AAEpB,oBAAa,GAAG,IAAI,CAAC;AAoDzC,eAAe,MAAM,CAAC"}
|
|
@@ -42,7 +42,7 @@ const examples = [
|
|
|
42
42
|
parameters: {
|
|
43
43
|
id: events.CONNECT,
|
|
44
44
|
sequenceNumber: 2,
|
|
45
|
-
data: { channel:
|
|
45
|
+
data: { channel: 1, value: 131 }
|
|
46
46
|
},
|
|
47
47
|
hex: { header: '15 05', body: '0c 02 00 83 01' }
|
|
48
48
|
},
|
|
@@ -51,7 +51,7 @@ const examples = [
|
|
|
51
51
|
parameters: {
|
|
52
52
|
id: events.DISCONNECT,
|
|
53
53
|
sequenceNumber: 2,
|
|
54
|
-
data: { channel:
|
|
54
|
+
data: { channel: 1, value: 131 }
|
|
55
55
|
},
|
|
56
56
|
hex: { header: '15 05', body: '0d 02 00 83 01' }
|
|
57
57
|
},
|
|
@@ -152,7 +152,8 @@ class NewEvent extends Command {
|
|
|
152
152
|
break;
|
|
153
153
|
case events.CONNECT:
|
|
154
154
|
case events.DISCONNECT:
|
|
155
|
-
|
|
155
|
+
// 0 logical channel - 1 real channel
|
|
156
|
+
eventData = { channel: buffer.getUint8() + 1, value: buffer.getExtendedValue() };
|
|
156
157
|
break;
|
|
157
158
|
case events.MTX:
|
|
158
159
|
eventData = { status: buffer.getEventStatus(hardwareTypes.MTXLORA) };
|
|
@@ -196,7 +197,8 @@ class NewEvent extends Command {
|
|
|
196
197
|
case events.CONNECT:
|
|
197
198
|
case events.DISCONNECT:
|
|
198
199
|
eventData = data;
|
|
199
|
-
|
|
200
|
+
// 1 real channel - 0 logical channel
|
|
201
|
+
buffer.setUint8(eventData.channel - 1);
|
|
200
202
|
buffer.setExtendedValue(eventData.value);
|
|
201
203
|
break;
|
|
202
204
|
case events.MTX:
|