jooby-codec 1.2.0 → 1.4.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.d.ts +9 -13
- package/dist/CommandBinaryBuffer.js +27 -22
- package/dist/CommandBinaryBuffer.js.map +1 -1
- package/dist/commands/downlink/CorrectTime2000.d.ts +3 -3
- package/dist/commands/downlink/CorrectTime2000.js +4 -4
- package/dist/commands/downlink/CorrectTime2000.js.map +1 -1
- package/dist/commands/downlink/ExAbsArchiveDaysMC.d.ts +47 -0
- package/dist/commands/downlink/ExAbsArchiveDaysMC.js +65 -0
- package/dist/commands/downlink/ExAbsArchiveDaysMC.js.map +1 -0
- package/dist/commands/downlink/ExAbsArchiveHoursMC.d.ts +47 -0
- package/dist/commands/downlink/ExAbsArchiveHoursMC.js +67 -0
- package/dist/commands/downlink/ExAbsArchiveHoursMC.js.map +1 -0
- package/dist/commands/downlink/GetArchiveDaysMC.d.ts +47 -0
- package/dist/commands/downlink/GetArchiveDaysMC.js +64 -0
- package/dist/commands/downlink/GetArchiveDaysMC.js.map +1 -0
- package/dist/commands/downlink/GetArchiveHoursMC.d.ts +47 -0
- package/dist/commands/downlink/{GetArchiveHoursMul.js → GetArchiveHoursMC.js} +20 -20
- package/dist/commands/downlink/GetArchiveHoursMC.js.map +1 -0
- package/dist/commands/downlink/SetParameter.d.ts +73 -0
- package/dist/commands/downlink/SetParameter.js +136 -0
- package/dist/commands/downlink/SetParameter.js.map +1 -0
- package/dist/commands/downlink/SetTime2000.d.ts +3 -3
- package/dist/commands/downlink/SetTime2000.js +4 -4
- package/dist/commands/downlink/SetTime2000.js.map +1 -1
- package/dist/commands/downlink/index.d.ts +5 -1
- package/dist/commands/downlink/index.js +5 -1
- package/dist/commands/downlink/index.js.map +1 -1
- package/dist/commands/uplink/DataDayMC.d.ts +20 -0
- package/dist/commands/uplink/{DataDayMul.js → DataDayMC.js} +15 -15
- package/dist/commands/uplink/DataDayMC.js.map +1 -0
- package/dist/commands/uplink/{DataHourMul.d.ts → DataHourMC.d.ts} +3 -3
- package/dist/commands/uplink/{DataHourMul.js → DataHourMC.js} +24 -24
- package/dist/commands/uplink/DataHourMC.js.map +1 -0
- package/dist/commands/uplink/ExAbsArchiveDaysMC.d.ts +46 -0
- package/dist/commands/uplink/ExAbsArchiveDaysMC.js +72 -0
- package/dist/commands/uplink/ExAbsArchiveDaysMC.js.map +1 -0
- package/dist/commands/uplink/ExAbsArchiveHoursMC.d.ts +11 -0
- package/dist/commands/uplink/ExAbsArchiveHoursMC.js +93 -0
- package/dist/commands/uplink/ExAbsArchiveHoursMC.js.map +1 -0
- package/dist/commands/uplink/{ExAbsDayMul.d.ts → ExAbsDayMC.d.ts} +3 -3
- package/dist/commands/uplink/{ExAbsDayMul.js → ExAbsDayMC.js} +18 -18
- package/dist/commands/uplink/ExAbsDayMC.js.map +1 -0
- package/dist/commands/uplink/{ExAbsHourMul.d.ts → ExAbsHourMC.d.ts} +3 -3
- package/dist/commands/uplink/{ExAbsHourMul.js → ExAbsHourMC.js} +24 -24
- package/dist/commands/uplink/ExAbsHourMC.js.map +1 -0
- package/dist/commands/uplink/GetArchiveDaysMC.d.ts +73 -0
- package/dist/commands/uplink/GetArchiveDaysMC.js +97 -0
- package/dist/commands/uplink/GetArchiveDaysMC.js.map +1 -0
- package/dist/commands/uplink/GetArchiveHoursMC.d.ts +28 -0
- package/dist/commands/uplink/{GetArchiveHoursMul.js → GetArchiveHoursMC.js} +20 -20
- package/dist/commands/uplink/GetArchiveHoursMC.js.map +1 -0
- package/dist/commands/uplink/GetCurrentMC.d.ts +24 -0
- package/dist/commands/uplink/GetCurrentMC.js +36 -0
- package/dist/commands/uplink/GetCurrentMC.js.map +1 -0
- package/dist/commands/uplink/NewEvent.d.ts +2 -2
- package/dist/commands/uplink/NewEvent.js +5 -5
- package/dist/commands/uplink/NewEvent.js.map +1 -1
- package/dist/commands/uplink/Time2000.d.ts +3 -3
- package/dist/commands/uplink/Time2000.js +4 -4
- package/dist/commands/uplink/Time2000.js.map +1 -1
- package/dist/commands/uplink/index.d.ts +9 -6
- package/dist/commands/uplink/index.js +9 -6
- package/dist/commands/uplink/index.js.map +1 -1
- package/dist/constants/deviceParameters.d.ts +15 -0
- package/dist/constants/deviceParameters.js +16 -0
- package/dist/constants/deviceParameters.js.map +1 -0
- package/dist/utils/bitSet.d.ts +2 -2
- package/dist/utils/bitSet.js +2 -3
- package/dist/utils/bitSet.js.map +1 -1
- package/dist/utils/time.d.ts +2 -2
- package/dist/utils/time.js +2 -2
- package/dist/utils/time.js.map +1 -1
- package/package.json +1 -1
- package/readme.md +3 -3
- package/dist/commands/downlink/GetArchiveHoursMul.d.ts +0 -47
- package/dist/commands/downlink/GetArchiveHoursMul.js.map +0 -1
- package/dist/commands/uplink/DataDayMul.d.ts +0 -20
- package/dist/commands/uplink/DataDayMul.js.map +0 -1
- package/dist/commands/uplink/DataHourMul.js.map +0 -1
- package/dist/commands/uplink/ExAbsDayMul.js.map +0 -1
- package/dist/commands/uplink/ExAbsHourMul.js.map +0 -1
- package/dist/commands/uplink/GetArchiveHoursMul.d.ts +0 -28
- package/dist/commands/uplink/GetArchiveHoursMul.js.map +0 -1
- package/dist/commands/uplink/GetCurrentMul.d.ts +0 -24
- package/dist/commands/uplink/GetCurrentMul.js +0 -36
- package/dist/commands/uplink/GetCurrentMul.js.map +0 -1
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import BinaryBuffer from './BinaryBuffer.js';
|
|
2
|
-
/**
|
|
3
|
-
* Time from UTC 2000-01-01 00:00:00 in seconds.
|
|
4
|
-
*/
|
|
5
|
-
export type Seconds = number;
|
|
6
2
|
export interface IBatteryVoltage {
|
|
7
3
|
/**
|
|
8
4
|
* battery voltage value at low consumption, in mV;
|
|
@@ -18,12 +14,12 @@ export interface IBatteryVoltage {
|
|
|
18
14
|
high: number | undefined;
|
|
19
15
|
}
|
|
20
16
|
/**
|
|
21
|
-
*
|
|
17
|
+
* Channel value hour diff
|
|
22
18
|
*/
|
|
23
19
|
export interface IHourDiff {
|
|
24
20
|
value: number;
|
|
25
21
|
hour: number;
|
|
26
|
-
|
|
22
|
+
seconds: number;
|
|
27
23
|
date: Date;
|
|
28
24
|
}
|
|
29
25
|
export interface IChannel {
|
|
@@ -40,9 +36,9 @@ export interface IChannel {
|
|
|
40
36
|
*/
|
|
41
37
|
diff: Array<IHourDiff>;
|
|
42
38
|
/**
|
|
43
|
-
*
|
|
39
|
+
* time
|
|
44
40
|
*/
|
|
45
|
-
|
|
41
|
+
seconds: number | undefined;
|
|
46
42
|
/**
|
|
47
43
|
* Normal date in UTC.
|
|
48
44
|
*/
|
|
@@ -57,14 +53,14 @@ declare class CommandBinaryBuffer extends BinaryBuffer {
|
|
|
57
53
|
/**
|
|
58
54
|
* Get array of channel indexes.
|
|
59
55
|
*
|
|
60
|
-
* @param short - get 4
|
|
56
|
+
* @param short - get 4 channelList or more
|
|
61
57
|
*/
|
|
62
58
|
getChannels(short: boolean): Array<number>;
|
|
63
59
|
/**
|
|
64
60
|
* Set array of channel indexes.
|
|
65
61
|
*
|
|
66
62
|
*/
|
|
67
|
-
setChannels(
|
|
63
|
+
setChannels(channelList: Array<any>): void;
|
|
68
64
|
/**
|
|
69
65
|
* Retrieve device time from byte array.
|
|
70
66
|
*
|
|
@@ -95,10 +91,10 @@ declare class CommandBinaryBuffer extends BinaryBuffer {
|
|
|
95
91
|
getBatterVoltage(): IBatteryVoltage;
|
|
96
92
|
setBatterVoltage(batteryVoltage: IBatteryVoltage): void;
|
|
97
93
|
getChannelsValuesWithHourDiff(): {
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
hours: number;
|
|
95
|
+
channelList: Array<IChannel>;
|
|
100
96
|
date: Date;
|
|
101
97
|
};
|
|
102
|
-
setChannelsValuesWithHourDiff(
|
|
98
|
+
setChannelsValuesWithHourDiff(hours: number, date: Date, channelList: Array<IChannel>): void;
|
|
103
99
|
}
|
|
104
100
|
export default CommandBinaryBuffer;
|
|
@@ -45,10 +45,10 @@ class CommandBinaryBuffer extends BinaryBuffer {
|
|
|
45
45
|
/**
|
|
46
46
|
* Get array of channel indexes.
|
|
47
47
|
*
|
|
48
|
-
* @param short - get 4
|
|
48
|
+
* @param short - get 4 channelList or more
|
|
49
49
|
*/
|
|
50
50
|
getChannels(short) {
|
|
51
|
-
const
|
|
51
|
+
const channelList = [];
|
|
52
52
|
let extended = 1;
|
|
53
53
|
let channelIndex = 0;
|
|
54
54
|
const MASK = short ? CHANNELS_SHORT_MASK : CHANNELS_FULL_MASK;
|
|
@@ -57,24 +57,24 @@ class CommandBinaryBuffer extends BinaryBuffer {
|
|
|
57
57
|
extended = byte & 0x80;
|
|
58
58
|
for (let index = 0; index < MASK.length; index++) {
|
|
59
59
|
if (byte & MASK[index]) {
|
|
60
|
-
|
|
60
|
+
channelList.push((channelIndex * 7) + index);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
++channelIndex;
|
|
64
64
|
}
|
|
65
|
-
return
|
|
65
|
+
return channelList.sort((a, b) => a - b);
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
68
68
|
* Set array of channel indexes.
|
|
69
69
|
*
|
|
70
70
|
*/
|
|
71
71
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
72
|
-
setChannels(
|
|
72
|
+
setChannels(channelList) {
|
|
73
73
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-return
|
|
74
|
-
const maxChannel = Math.max(...
|
|
74
|
+
const maxChannel = Math.max(...channelList.map(({ index }) => index));
|
|
75
75
|
const size = (Math.ceil(maxChannel / 7) + (maxChannel % 7)) ? 1 : 0;
|
|
76
76
|
const data = Array(size).fill(0x80);
|
|
77
|
-
|
|
77
|
+
channelList.forEach((_, channelIndex) => {
|
|
78
78
|
data[Math.floor(channelIndex / 7)] |= CHANNELS_FULL_MASK[channelIndex % 7];
|
|
79
79
|
});
|
|
80
80
|
data[data.length - 1] &= 0x7f;
|
|
@@ -174,39 +174,44 @@ class CommandBinaryBuffer extends BinaryBuffer {
|
|
|
174
174
|
}
|
|
175
175
|
getChannelsValuesWithHourDiff() {
|
|
176
176
|
const date = this.getDate();
|
|
177
|
-
const { hour, hours } = this.getHours();
|
|
177
|
+
const { hour, hours: hourAmount } = this.getHours();
|
|
178
178
|
const channelArray = this.getChannels(true);
|
|
179
179
|
const maxChannel = Math.max.apply(null, channelArray);
|
|
180
|
-
const
|
|
181
|
-
let
|
|
180
|
+
const channelList = [];
|
|
181
|
+
let hours = hourAmount;
|
|
182
182
|
let value;
|
|
183
183
|
date.setUTCHours(hour);
|
|
184
184
|
const counterDate = new Date(date);
|
|
185
185
|
// TODO: add link to doc
|
|
186
|
-
if (
|
|
187
|
-
|
|
186
|
+
if (hours === 0) {
|
|
187
|
+
hours = 1;
|
|
188
188
|
}
|
|
189
189
|
for (let channelIndex = 0; channelIndex <= maxChannel; ++channelIndex) {
|
|
190
|
+
const diff = [];
|
|
190
191
|
// decode hour value for channel
|
|
191
192
|
value = this.getExtendedValue();
|
|
192
193
|
counterDate.setTime(date.getTime());
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
194
|
+
channelList.push({
|
|
195
|
+
value,
|
|
196
|
+
diff,
|
|
197
|
+
index: channelIndex,
|
|
198
|
+
seconds: getSecondsFromDate(counterDate),
|
|
199
|
+
date: new Date(counterDate)
|
|
200
|
+
});
|
|
201
|
+
for (let diffHour = 0; diffHour < hours; ++diffHour) {
|
|
197
202
|
value = this.getExtendedValue();
|
|
198
203
|
counterDate.setUTCHours(counterDate.getUTCHours() + diffHour);
|
|
199
|
-
diff.push({ value, hour: diffHour, date: new Date(counterDate),
|
|
204
|
+
diff.push({ value, hour: diffHour, date: new Date(counterDate), seconds: getSecondsFromDate(counterDate) });
|
|
200
205
|
}
|
|
201
206
|
}
|
|
202
|
-
return {
|
|
207
|
+
return { channelList, date, hours };
|
|
203
208
|
}
|
|
204
|
-
setChannelsValuesWithHourDiff(
|
|
209
|
+
setChannelsValuesWithHourDiff(hours, date, channelList) {
|
|
205
210
|
const hour = date.getUTCHours();
|
|
206
211
|
this.setDate(date);
|
|
207
|
-
this.setHours(hour,
|
|
208
|
-
this.setChannels(
|
|
209
|
-
|
|
212
|
+
this.setHours(hour, hours);
|
|
213
|
+
this.setChannels(channelList);
|
|
214
|
+
channelList.forEach(({ value, diff }) => {
|
|
210
215
|
this.setExtendedValue(value);
|
|
211
216
|
diff.forEach(({ value: diffValue }) => this.setExtendedValue(diffValue));
|
|
212
217
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandBinaryBuffer.js","sourceRoot":"","sources":["../src/CommandBinaryBuffer.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAC,kBAAkB,EAAE,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"CommandBinaryBuffer.js","sourceRoot":"","sources":["../src/CommandBinaryBuffer.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAC,kBAAkB,EAAE,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AA0DvE,MAAM,YAAY,GAAG,IAAI,CAAC;AAC1B,MAAM,cAAc,GAAG,CAAC,CAAC;AACzB,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACtE,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACrD,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAGpC;;GAEG;AACH,MAAM,mBAAoB,SAAQ,YAAY;IA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E9D,IAAI,CAAC,IAAI,CAAC,EAAC,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,kBAAkB,CAAC,WAAW,CAAC,EAAC,CAAC,CAAC;aAC7G;SACJ;QAED,OAAO,EAAC,WAAW,EAAE,IAAI,EAAE,KAAK,EAAC,CAAC;IACtC,CAAC;IAED,6BAA6B,CAAG,KAAa,EAAE,IAAU,EAAE,WAA4B;QACnF,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAEhC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACnB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC3B,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAE9B,WAAW,CAAC,OAAO,CAAC,CAAC,EAAC,KAAK,EAAE,IAAI,EAAC,EAAE,EAAE;YAClC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;YAE7B,IAAI,CAAC,OAAO,CAAC,CAAC,EAAC,KAAK,EAAE,SAAS,EAAC,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;QAC3E,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAGD,eAAe,mBAAmB,CAAC"}
|
|
@@ -9,7 +9,7 @@ import Command from '../../Command.js';
|
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* // 120 seconds to the past
|
|
12
|
-
* {sequenceNumber: 45,
|
|
12
|
+
* {sequenceNumber: 45, seconds: -120}
|
|
13
13
|
*/
|
|
14
14
|
interface IDownlinkCorrectTime2000Parameters {
|
|
15
15
|
/** unique time manipulation operation number */
|
|
@@ -18,7 +18,7 @@ interface IDownlinkCorrectTime2000Parameters {
|
|
|
18
18
|
* seconds
|
|
19
19
|
* range: [-127..+127]
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
seconds: number;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Downlink command.
|
|
@@ -28,7 +28,7 @@ interface IDownlinkCorrectTime2000Parameters {
|
|
|
28
28
|
* import CorrectTime2000 from 'jooby-codec/commands/downlink/CorrectTime2000';
|
|
29
29
|
*
|
|
30
30
|
* // 120 seconds to the past
|
|
31
|
-
* const parameters = {sequenceNumber: 45,
|
|
31
|
+
* const parameters = {sequenceNumber: 45, seconds: -120};
|
|
32
32
|
* const command = new CorrectTime2000(parameters);
|
|
33
33
|
*
|
|
34
34
|
* // output command binary in hex representation
|
|
@@ -17,7 +17,7 @@ const COMMAND_BODY_SIZE = 2;
|
|
|
17
17
|
* import CorrectTime2000 from 'jooby-codec/commands/downlink/CorrectTime2000';
|
|
18
18
|
*
|
|
19
19
|
* // 120 seconds to the past
|
|
20
|
-
* const parameters = {sequenceNumber: 45,
|
|
20
|
+
* const parameters = {sequenceNumber: 45, seconds: -120};
|
|
21
21
|
* const command = new CorrectTime2000(parameters);
|
|
22
22
|
*
|
|
23
23
|
* // output command binary in hex representation
|
|
@@ -39,7 +39,7 @@ class CorrectTime2000 extends Command {
|
|
|
39
39
|
const buffer = new BinaryBuffer(data, false);
|
|
40
40
|
const parameters = {
|
|
41
41
|
sequenceNumber: buffer.getUint8(),
|
|
42
|
-
|
|
42
|
+
seconds: buffer.getInt8()
|
|
43
43
|
};
|
|
44
44
|
if (!buffer.isEmpty) {
|
|
45
45
|
throw new Error(`${this.getName()}. BinaryBuffer is not empty.`);
|
|
@@ -48,10 +48,10 @@ class CorrectTime2000 extends Command {
|
|
|
48
48
|
}
|
|
49
49
|
// returns full message - header with body
|
|
50
50
|
toBytes() {
|
|
51
|
-
const { sequenceNumber,
|
|
51
|
+
const { sequenceNumber, seconds } = this.parameters;
|
|
52
52
|
const buffer = new BinaryBuffer(COMMAND_BODY_SIZE, false);
|
|
53
53
|
buffer.setUint8(sequenceNumber);
|
|
54
|
-
buffer.setInt8(
|
|
54
|
+
buffer.setInt8(seconds);
|
|
55
55
|
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
56
56
|
}
|
|
57
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CorrectTime2000.js","sourceRoot":"","sources":["../../../src/commands/downlink/CorrectTime2000.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,OAAO,MAAM,kBAAkB,CAAC;AACvC,OAAO,YAAY,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAC,QAAQ,EAAC,MAAM,mCAAmC,CAAC;AAG3D,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAC1C,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAqB5B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,eAAgB,SAAQ,OAAO;IACjC,YAAqB,UAA8C;QAC/D,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAoC;IAEnE,CAAC;IAQD,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,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAC7C,MAAM,UAAU,GAAG;YACf,cAAc,EAAE,MAAM,CAAC,QAAQ,EAAE;YACjC,
|
|
1
|
+
{"version":3,"file":"CorrectTime2000.js","sourceRoot":"","sources":["../../../src/commands/downlink/CorrectTime2000.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,OAAO,MAAM,kBAAkB,CAAC;AACvC,OAAO,YAAY,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAC,QAAQ,EAAC,MAAM,mCAAm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C9D,CAAC;;AAlCe,kBAAE,GAAG,UAAU,CAAC;AAEhB,6BAAa,GAAG,QAAQ,CAAC;AAEzB,qBAAK,GAAG,aAAa,CAAC;AAkC1C,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [[include:commands/downlink/ExAbsArchiveDaysMC.md]]
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
import Command from '../../Command.js';
|
|
7
|
+
/**
|
|
8
|
+
* ExAbsArchiveDaysMC command parameters
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* // request for 1 days archive values from channel #1 from 2023-12-24T00:00:00.000Z or 756691200 seconds since 2000 year
|
|
12
|
+
* {channelList: [0], days: 1, seconds: 756691200}
|
|
13
|
+
*/
|
|
14
|
+
interface IDownlinkExAbsArchiveDaysMCParameters {
|
|
15
|
+
/** amount of days to retrieve */
|
|
16
|
+
days: number;
|
|
17
|
+
/** time */
|
|
18
|
+
seconds: number;
|
|
19
|
+
/** array of channelList indexes */
|
|
20
|
+
channelList: Array<number>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Downlink command
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```js
|
|
27
|
+
* import ExAbsArchiveDaysMC from 'jooby-codec/commands/downlink/ExAbsArchiveDaysMC';
|
|
28
|
+
*
|
|
29
|
+
* const parameters = {channelList: [0], days: 1, seconds: 756691200};
|
|
30
|
+
* const command = new ExAbsArchiveDaysMC(parameters);
|
|
31
|
+
*
|
|
32
|
+
* // output command binary in hex representation
|
|
33
|
+
* console.log(command.toHex());
|
|
34
|
+
* // 1f 0c 04 2f 98 01 01
|
|
35
|
+
* ```
|
|
36
|
+
* [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/ExAbsArchiveDaysMC.md#request)
|
|
37
|
+
*/
|
|
38
|
+
declare class ExAbsArchiveDaysMC extends Command {
|
|
39
|
+
parameters: IDownlinkExAbsArchiveDaysMCParameters;
|
|
40
|
+
constructor(parameters: IDownlinkExAbsArchiveDaysMCParameters);
|
|
41
|
+
static readonly id = 3359;
|
|
42
|
+
static readonly directionType = 1;
|
|
43
|
+
static readonly title = "EX_ABS_ARCHIVE_DAYS_MUL";
|
|
44
|
+
static fromBytes(data: Uint8Array): ExAbsArchiveDaysMC;
|
|
45
|
+
toBytes(): Uint8Array;
|
|
46
|
+
}
|
|
47
|
+
export default ExAbsArchiveDaysMC;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [[include:commands/downlink/ExAbsArchiveDaysMC.md]]
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
import Command from '../../Command.js';
|
|
7
|
+
import CommandBinaryBuffer from '../../CommandBinaryBuffer.js';
|
|
8
|
+
import { DOWNLINK } from '../../constants/directionTypes.js';
|
|
9
|
+
import { getSecondsFromDate, getDateFromSeconds } from '../../utils/time.js';
|
|
10
|
+
// TODO: rework extended headers detection
|
|
11
|
+
const COMMAND_ID = 0x0d1f;
|
|
12
|
+
const COMMAND_TITLE = 'EX_ABS_ARCHIVE_DAYS_MUL';
|
|
13
|
+
const COMMAND_BODY_SIZE = 4;
|
|
14
|
+
/**
|
|
15
|
+
* Downlink command
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```js
|
|
19
|
+
* import ExAbsArchiveDaysMC from 'jooby-codec/commands/downlink/ExAbsArchiveDaysMC';
|
|
20
|
+
*
|
|
21
|
+
* const parameters = {channelList: [0], days: 1, seconds: 756691200};
|
|
22
|
+
* const command = new ExAbsArchiveDaysMC(parameters);
|
|
23
|
+
*
|
|
24
|
+
* // output command binary in hex representation
|
|
25
|
+
* console.log(command.toHex());
|
|
26
|
+
* // 1f 0c 04 2f 98 01 01
|
|
27
|
+
* ```
|
|
28
|
+
* [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/ExAbsArchiveDaysMC.md#request)
|
|
29
|
+
*/
|
|
30
|
+
class ExAbsArchiveDaysMC extends Command {
|
|
31
|
+
constructor(parameters) {
|
|
32
|
+
super();
|
|
33
|
+
this.parameters = parameters;
|
|
34
|
+
this.parameters.channelList = this.parameters.channelList.sort((a, b) => a - b);
|
|
35
|
+
}
|
|
36
|
+
// data - only body (without header)
|
|
37
|
+
static fromBytes(data) {
|
|
38
|
+
if (data.byteLength !== COMMAND_BODY_SIZE) {
|
|
39
|
+
throw new Error(`${this.getName()}. Wrong buffer size: ${data.byteLength}.`);
|
|
40
|
+
}
|
|
41
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
42
|
+
const date = buffer.getDate();
|
|
43
|
+
const channelList = buffer.getChannels(true);
|
|
44
|
+
const days = buffer.getUint8();
|
|
45
|
+
if (!buffer.isEmpty) {
|
|
46
|
+
throw new Error(`${this.getName()}. BinaryBuffer is not empty.`);
|
|
47
|
+
}
|
|
48
|
+
return new ExAbsArchiveDaysMC({ channelList, days, seconds: getSecondsFromDate(date) });
|
|
49
|
+
}
|
|
50
|
+
// returns full message - header with body
|
|
51
|
+
toBytes() {
|
|
52
|
+
const { channelList, days, seconds } = this.parameters;
|
|
53
|
+
const buffer = new CommandBinaryBuffer(COMMAND_BODY_SIZE);
|
|
54
|
+
const date = getDateFromSeconds(seconds);
|
|
55
|
+
buffer.setDate(date);
|
|
56
|
+
buffer.setChannels(channelList);
|
|
57
|
+
buffer.setUint8(days);
|
|
58
|
+
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
ExAbsArchiveDaysMC.id = COMMAND_ID;
|
|
62
|
+
ExAbsArchiveDaysMC.directionType = DOWNLINK;
|
|
63
|
+
ExAbsArchiveDaysMC.title = COMMAND_TITLE;
|
|
64
|
+
export default ExAbsArchiveDaysMC;
|
|
65
|
+
//# sourceMappingURL=ExAbsArchiveDaysMC.js.map
|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AAQ,EAAE,CAAC;QAE/B,IAAK,CAAC,MAAM,CAAC,OAAO,EAAG;YACnB,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,8BAA8B,CAAC,CAAC;SACpE;QAED,OAAO,IAAI,kBAAkB,CAAC,EAAC,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,kBAAkB,CAAC,IAAI,CAAC,EAAC,CAAC,CAAC;IAC1F,CAAC;IAED,0CAA0C;IAC1C,OAAO;QACH,MAAM,EAAC,WAAW,EAAE,IAAI,EAAE,OAAO,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QACrD,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;QAE1D,MAAM,IAAI,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;QAEzC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACrB,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAChC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEtB,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AArCe,qBAAE,GAAG,UAAU,CAAC;AAEhB,gCAAa,GAAG,QAAQ,CAAC;AAEzB,wBAAK,GAAG,aAAa,CAAC;AAqC1C,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [[include:commands/downlink/ExAbsArchiveHoursMC.md]]
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
import Command from '../../Command.js';
|
|
7
|
+
/**
|
|
8
|
+
* ExAbsArchiveHoursMC command parameters
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* // request for 2 hours archive values from channel #1 from 2023-12-23T12:00:00.000Z or 756648000 seconds since 2000 year
|
|
12
|
+
* {channelList: [0], hours: 2, seconds: 756648000}
|
|
13
|
+
*/
|
|
14
|
+
interface IDownlinkExAbsArchiveHoursMCParameters {
|
|
15
|
+
/** amount of hours to retrieve */
|
|
16
|
+
hours: number;
|
|
17
|
+
/** time */
|
|
18
|
+
seconds: number;
|
|
19
|
+
/** array of channelList indexes */
|
|
20
|
+
channelList: Array<number>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Downlink command
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```js
|
|
27
|
+
* import ExAbsArchiveHoursMC from 'jooby-codec/commands/downlink/ExAbsArchiveHoursMC';
|
|
28
|
+
*
|
|
29
|
+
* const parameters = {channelList: [0], hours: 0, seconds: 756648000};
|
|
30
|
+
* const command = new ExAbsArchiveHoursMC(parameters);
|
|
31
|
+
*
|
|
32
|
+
* // output command binary in hex representation
|
|
33
|
+
* console.log(command.toHex());
|
|
34
|
+
* // 1f 0c 04 2f 97 0c 01
|
|
35
|
+
* ```
|
|
36
|
+
* [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/ExAbsArchiveHoursMC.md#request)
|
|
37
|
+
*/
|
|
38
|
+
declare class ExAbsArchiveHoursMC extends Command {
|
|
39
|
+
parameters: IDownlinkExAbsArchiveHoursMCParameters;
|
|
40
|
+
constructor(parameters: IDownlinkExAbsArchiveHoursMCParameters);
|
|
41
|
+
static readonly id = 3103;
|
|
42
|
+
static readonly directionType = 1;
|
|
43
|
+
static readonly title = "EX_ABS_ARCHIVE_HOUR_MUL";
|
|
44
|
+
static fromBytes(data: Uint8Array): ExAbsArchiveHoursMC;
|
|
45
|
+
toBytes(): Uint8Array;
|
|
46
|
+
}
|
|
47
|
+
export default ExAbsArchiveHoursMC;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [[include:commands/downlink/ExAbsArchiveHoursMC.md]]
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
import Command from '../../Command.js';
|
|
7
|
+
import CommandBinaryBuffer from '../../CommandBinaryBuffer.js';
|
|
8
|
+
import { DOWNLINK } from '../../constants/directionTypes.js';
|
|
9
|
+
import { getSecondsFromDate, getDateFromSeconds } from '../../utils/time.js';
|
|
10
|
+
// TODO: rework extended headers detection
|
|
11
|
+
const COMMAND_ID = 0x0c1f;
|
|
12
|
+
const COMMAND_TITLE = 'EX_ABS_ARCHIVE_HOUR_MUL';
|
|
13
|
+
const COMMAND_BODY_SIZE = 4;
|
|
14
|
+
/**
|
|
15
|
+
* Downlink command
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```js
|
|
19
|
+
* import ExAbsArchiveHoursMC from 'jooby-codec/commands/downlink/ExAbsArchiveHoursMC';
|
|
20
|
+
*
|
|
21
|
+
* const parameters = {channelList: [0], hours: 0, seconds: 756648000};
|
|
22
|
+
* const command = new ExAbsArchiveHoursMC(parameters);
|
|
23
|
+
*
|
|
24
|
+
* // output command binary in hex representation
|
|
25
|
+
* console.log(command.toHex());
|
|
26
|
+
* // 1f 0c 04 2f 97 0c 01
|
|
27
|
+
* ```
|
|
28
|
+
* [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/ExAbsArchiveHoursMC.md#request)
|
|
29
|
+
*/
|
|
30
|
+
class ExAbsArchiveHoursMC extends Command {
|
|
31
|
+
constructor(parameters) {
|
|
32
|
+
super();
|
|
33
|
+
this.parameters = parameters;
|
|
34
|
+
this.parameters.channelList = this.parameters.channelList.sort((a, b) => a - b);
|
|
35
|
+
}
|
|
36
|
+
// data - only body (without header)
|
|
37
|
+
static fromBytes(data) {
|
|
38
|
+
if (data.byteLength !== COMMAND_BODY_SIZE) {
|
|
39
|
+
throw new Error(`${this.getName()}. Wrong buffer size: ${data.byteLength}.`);
|
|
40
|
+
}
|
|
41
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
42
|
+
const date = buffer.getDate();
|
|
43
|
+
const { hour, hours } = buffer.getHours();
|
|
44
|
+
const channelList = buffer.getChannels(true);
|
|
45
|
+
date.setUTCHours(hour);
|
|
46
|
+
if (!buffer.isEmpty) {
|
|
47
|
+
throw new Error(`${this.getName()}. BinaryBuffer is not empty.`);
|
|
48
|
+
}
|
|
49
|
+
return new ExAbsArchiveHoursMC({ channelList, hours, seconds: getSecondsFromDate(date) });
|
|
50
|
+
}
|
|
51
|
+
// returns full message - header with body
|
|
52
|
+
toBytes() {
|
|
53
|
+
const { channelList, hours, seconds } = this.parameters;
|
|
54
|
+
const buffer = new CommandBinaryBuffer(COMMAND_BODY_SIZE);
|
|
55
|
+
const date = getDateFromSeconds(seconds);
|
|
56
|
+
const hour = date.getUTCHours();
|
|
57
|
+
buffer.setDate(date);
|
|
58
|
+
buffer.setHours(hour, hours);
|
|
59
|
+
buffer.setChannels(channelList);
|
|
60
|
+
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
ExAbsArchiveHoursMC.id = COMMAND_ID;
|
|
64
|
+
ExAbsArchiveHoursMC.directionType = DOWNLINK;
|
|
65
|
+
ExAbsArchiveHoursMC.title = COMMAND_TITLE;
|
|
66
|
+
export default ExAbsArchiveHoursMC;
|
|
67
|
+
//# sourceMappingURL=ExAbsArchiveHoursMC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExAbsArchiveHoursMC.js","sourceRoot":"","sources":["../../../src/commands/downlink/ExAbsArchiveHoursMC.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,OAAO,MAAM,kBAAkB,CAAC;AACvC,OAAO,mBAAmB,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAC,QAAQ,EAAC,MAAM,mCAAmC,CAAC;AAC3D,OAAO,EAAC,kBAAkB,EAAE,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AAsB3E,0CAA0C;AAC1C,MAAM,UAAU,GAAG,MAAM,CAAC;AA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KAAK,EAAE,OAAO,EAAC,GAAG,IAAI,CAAC,UAAU,CAAC;QACtD,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;QAE1D,MAAM,IAAI,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;QACzC,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;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,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC;IAC9D,CAAC;;AAxCe,sBAAE,GAAG,UAAU,CAAC;AAEhB,iCAAa,GAAG,QAAQ,CAAC;AAEzB,yBAAK,GAAG,aAAa,CAAC;AAwC1C,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [[include:commands/downlink/GetArchiveDaysMC.md]]
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
import Command from '../../Command.js';
|
|
7
|
+
/**
|
|
8
|
+
* GetArchiveDaysMC command parameters
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* // request for 1 days archive values from channel #1 from 2023-12-24T00:00:00.000Z or 756691200 seconds since 2000 year
|
|
12
|
+
* {channelList: [0], days: 1, seconds: 756691200}
|
|
13
|
+
*/
|
|
14
|
+
interface IDownlinkGetArchiveDaysMCParameters {
|
|
15
|
+
/** amount of days to retrieve */
|
|
16
|
+
days: number;
|
|
17
|
+
/** time */
|
|
18
|
+
seconds: number;
|
|
19
|
+
/** array of channelList indexes */
|
|
20
|
+
channelList: Array<number>;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Downlink command
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```js
|
|
27
|
+
* import GetArchiveDaysMC from 'jooby-codec/commands/downlink/GetArchiveDaysMC';
|
|
28
|
+
*
|
|
29
|
+
* const parameters = {channelList: [0], days: 1, seconds: 756691200};
|
|
30
|
+
* const command = new GetArchiveDaysMC(parameters);
|
|
31
|
+
*
|
|
32
|
+
* // output command binary in hex representation
|
|
33
|
+
* console.log(command.toHex());
|
|
34
|
+
* // 1b 04 2f 98 01 01
|
|
35
|
+
* ```
|
|
36
|
+
* [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/GetArchiveDaysMC.md#request)
|
|
37
|
+
*/
|
|
38
|
+
declare class GetArchiveDaysMC extends Command {
|
|
39
|
+
parameters: IDownlinkGetArchiveDaysMCParameters;
|
|
40
|
+
constructor(parameters: IDownlinkGetArchiveDaysMCParameters);
|
|
41
|
+
static readonly id = 27;
|
|
42
|
+
static readonly directionType = 1;
|
|
43
|
+
static readonly title = "GET_ARCHIVE_DAYS_MUL";
|
|
44
|
+
static fromBytes(data: Uint8Array): GetArchiveDaysMC;
|
|
45
|
+
toBytes(): Uint8Array;
|
|
46
|
+
}
|
|
47
|
+
export default GetArchiveDaysMC;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [[include:commands/downlink/GetArchiveDaysMC.md]]
|
|
3
|
+
*
|
|
4
|
+
* @packageDocumentation
|
|
5
|
+
*/
|
|
6
|
+
import Command from '../../Command.js';
|
|
7
|
+
import CommandBinaryBuffer from '../../CommandBinaryBuffer.js';
|
|
8
|
+
import { DOWNLINK } from '../../constants/directionTypes.js';
|
|
9
|
+
import { getSecondsFromDate, getDateFromSeconds } from '../../utils/time.js';
|
|
10
|
+
const COMMAND_ID = 0x1b;
|
|
11
|
+
const COMMAND_TITLE = 'GET_ARCHIVE_DAYS_MUL';
|
|
12
|
+
const COMMAND_BODY_SIZE = 4;
|
|
13
|
+
/**
|
|
14
|
+
* Downlink command
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```js
|
|
18
|
+
* import GetArchiveDaysMC from 'jooby-codec/commands/downlink/GetArchiveDaysMC';
|
|
19
|
+
*
|
|
20
|
+
* const parameters = {channelList: [0], days: 1, seconds: 756691200};
|
|
21
|
+
* const command = new GetArchiveDaysMC(parameters);
|
|
22
|
+
*
|
|
23
|
+
* // output command binary in hex representation
|
|
24
|
+
* console.log(command.toHex());
|
|
25
|
+
* // 1b 04 2f 98 01 01
|
|
26
|
+
* ```
|
|
27
|
+
* [Command format documentation](https://github.com/jooby-dev/jooby-docs/blob/main/docs/commands/GetArchiveDaysMC.md#request)
|
|
28
|
+
*/
|
|
29
|
+
class GetArchiveDaysMC extends Command {
|
|
30
|
+
constructor(parameters) {
|
|
31
|
+
super();
|
|
32
|
+
this.parameters = parameters;
|
|
33
|
+
this.parameters.channelList = this.parameters.channelList.sort((a, b) => a - b);
|
|
34
|
+
}
|
|
35
|
+
// data - only body (without header)
|
|
36
|
+
static fromBytes(data) {
|
|
37
|
+
if (data.byteLength !== COMMAND_BODY_SIZE) {
|
|
38
|
+
throw new Error(`${this.getName()}. Wrong buffer size: ${data.byteLength}.`);
|
|
39
|
+
}
|
|
40
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
41
|
+
const date = buffer.getDate();
|
|
42
|
+
const channelList = buffer.getChannels(true);
|
|
43
|
+
const days = buffer.getUint8();
|
|
44
|
+
if (!buffer.isEmpty) {
|
|
45
|
+
throw new Error(`${this.getName()}. BinaryBuffer is not empty.`);
|
|
46
|
+
}
|
|
47
|
+
return new GetArchiveDaysMC({ channelList, days, seconds: getSecondsFromDate(date) });
|
|
48
|
+
}
|
|
49
|
+
// returns full message - header with body
|
|
50
|
+
toBytes() {
|
|
51
|
+
const { channelList, days, seconds } = this.parameters;
|
|
52
|
+
const buffer = new CommandBinaryBuffer(COMMAND_BODY_SIZE);
|
|
53
|
+
const date = getDateFromSeconds(seconds);
|
|
54
|
+
buffer.setDate(date);
|
|
55
|
+
buffer.setChannels(channelList);
|
|
56
|
+
buffer.setUint8(days);
|
|
57
|
+
return Command.toBytes(COMMAND_ID, buffer.toUint8Array());
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
GetArchiveDaysMC.id = COMMAND_ID;
|
|
61
|
+
GetArchiveDaysMC.directionType = DOWNLINK;
|
|
62
|
+
GetArchiveDaysMC.title = COMMAND_TITLE;
|
|
63
|
+
export default GetArchiveDaysMC;
|
|
64
|
+
//# sourceMappingURL=GetArchiveDaysMC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetArchiveDaysMC.js","sourceRoot":"","sources":["../../../src/commands/downlink/GetArchiveDaysMC.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,OAAO,MAAM,kBAAkB,CAAC;AACvC,OAAO,mBAAmB,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAC,QAAQ,EAAC,MAAM,mCAAmC,CAAC;AAC3D,OAAO,EAAC,kBAAkB,EAAE,kBAAkB,EAAC,MAAM,qBAAqB,CAAC;AAsB3E,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,aAAa,GAAG,sBAAsB,CAAC;AAC7C,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAG5B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,gBAAiB,SAAQ,OAAO;IAClC,YAAqB,UAA+C;QAChE,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAqC;QAGhE,IAAI,CAAC,UAAU,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACpF,CAAC;IAQD,oCAAoC;IACpC,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,IAAK,IAAI,CAAC,UAAU,KAAK,iBAAiB,EAAG;YACzC,M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