jooby-codec 3.11.0 → 3.13.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/Command.d.ts +32 -0
- package/dist/Command.js +31 -0
- package/dist/Command.js.map +1 -0
- package/dist/analog/Command.d.ts +3 -25
- package/dist/analog/Command.js +3 -20
- package/dist/analog/Command.js.map +1 -1
- package/dist/analog/CommandBinaryBuffer.d.ts +113 -5
- package/dist/analog/CommandBinaryBuffer.js +596 -6
- package/dist/analog/CommandBinaryBuffer.js.map +1 -1
- package/dist/analog/UnknownCommand.d.ts +2 -3
- package/dist/analog/UnknownCommand.js +3 -4
- package/dist/analog/UnknownCommand.js.map +1 -1
- package/dist/analog/commands/DataSegmentBase.d.ts +2 -3
- package/dist/analog/commands/DataSegmentBase.js +3 -4
- package/dist/analog/commands/DataSegmentBase.js.map +1 -1
- package/dist/analog/commands/downlink/GetArchiveHoursMCEx.d.ts +20 -0
- package/dist/analog/commands/downlink/GetArchiveHoursMCEx.js +51 -0
- package/dist/analog/commands/downlink/GetArchiveHoursMCEx.js.map +1 -0
- package/dist/analog/commands/downlink/SetParameter.js +191 -0
- package/dist/analog/commands/downlink/SetParameter.js.map +1 -1
- package/dist/analog/commands/downlink/index.d.ts +1 -0
- package/dist/analog/commands/downlink/index.js +1 -0
- package/dist/analog/commands/downlink/index.js.map +1 -1
- package/dist/analog/commands/uplink/GetArchiveHoursMCExResponse.d.ts +21 -0
- package/dist/analog/commands/uplink/GetArchiveHoursMCExResponse.js +55 -0
- package/dist/analog/commands/uplink/GetArchiveHoursMCExResponse.js.map +1 -0
- package/dist/analog/commands/uplink/GetParameterResponse.js +179 -3
- package/dist/analog/commands/uplink/GetParameterResponse.js.map +1 -1
- package/dist/analog/commands/uplink/HourMCEx.d.ts +22 -0
- package/dist/analog/commands/uplink/HourMCEx.js +45 -0
- package/dist/analog/commands/uplink/HourMCEx.js.map +1 -0
- package/dist/analog/commands/uplink/Status.js +1 -0
- package/dist/analog/commands/uplink/Status.js.map +1 -1
- package/dist/analog/commands/uplink/index.d.ts +2 -0
- package/dist/analog/commands/uplink/index.js +2 -0
- package/dist/analog/commands/uplink/index.js.map +1 -1
- package/dist/analog/constants/commandRelations.d.ts +2 -2
- package/dist/analog/constants/commandRelations.js +1 -0
- package/dist/analog/constants/commandRelations.js.map +1 -1
- package/dist/analog/constants/deviceParameters.d.ts +17 -0
- package/dist/analog/constants/deviceParameters.js +17 -0
- package/dist/analog/constants/deviceParameters.js.map +1 -1
- package/dist/analog/constants/hardwareTypes.d.ts +1 -0
- package/dist/analog/constants/hardwareTypes.js +1 -0
- package/dist/analog/constants/hardwareTypes.js.map +1 -1
- package/dist/analog/splitBytesToDataSegments.js +4 -1
- package/dist/analog/splitBytesToDataSegments.js.map +1 -1
- package/dist/mtx/Command.d.ts +10 -26
- package/dist/mtx/Command.js +7 -28
- package/dist/mtx/Command.js.map +1 -1
- package/dist/mtx/CommandBinaryBuffer.d.ts +61 -29
- package/dist/mtx/CommandBinaryBuffer.js +165 -71
- package/dist/mtx/CommandBinaryBuffer.js.map +1 -1
- package/dist/mtx/UnknownCommand.d.ts +2 -3
- package/dist/mtx/UnknownCommand.js +3 -4
- package/dist/mtx/UnknownCommand.js.map +1 -1
- package/dist/mtx/commands/downlink/GetCurrentValues.d.ts +13 -0
- package/dist/mtx/commands/downlink/GetCurrentValues.js +31 -0
- package/dist/mtx/commands/downlink/GetCurrentValues.js.map +1 -0
- package/dist/mtx/commands/downlink/GetEnergyCurrent.d.ts +18 -0
- package/dist/mtx/commands/downlink/GetEnergyCurrent.js +49 -0
- package/dist/mtx/commands/downlink/GetEnergyCurrent.js.map +1 -0
- package/dist/mtx/commands/downlink/GetEnergyDay.d.ts +20 -0
- package/dist/mtx/commands/downlink/GetEnergyDay.js +67 -0
- package/dist/mtx/commands/downlink/GetEnergyDay.js.map +1 -0
- package/dist/mtx/commands/downlink/GetEnergyDayPrevious.d.ts +13 -0
- package/dist/mtx/commands/downlink/GetEnergyDayPrevious.js +31 -0
- package/dist/mtx/commands/downlink/GetEnergyDayPrevious.js.map +1 -0
- package/dist/mtx/commands/downlink/GetExtendedCurrentValues.d.ts +13 -0
- package/dist/mtx/commands/downlink/GetExtendedCurrentValues.js +31 -0
- package/dist/mtx/commands/downlink/GetExtendedCurrentValues.js.map +1 -0
- package/dist/mtx/commands/downlink/GetHalfHours.d.ts +15 -0
- package/dist/mtx/commands/downlink/GetHalfHours.js +44 -0
- package/dist/mtx/commands/downlink/GetHalfHours.js.map +1 -0
- package/dist/mtx/commands/downlink/GetRatePlanInfo.js +3 -3
- package/dist/mtx/commands/downlink/GetRatePlanInfo.js.map +1 -1
- package/dist/mtx/commands/downlink/SetCorrectDateTime.d.ts +1 -1
- package/dist/mtx/commands/downlink/SetCorrectDateTime.js +2 -2
- package/dist/mtx/commands/downlink/SetCorrectDateTime.js.map +1 -1
- package/dist/mtx/commands/downlink/SetDateTime.js +7 -7
- package/dist/mtx/commands/downlink/SetDateTime.js.map +1 -1
- package/dist/mtx/commands/downlink/index.d.ts +6 -0
- package/dist/mtx/commands/downlink/index.js +6 -0
- package/dist/mtx/commands/downlink/index.js.map +1 -1
- package/dist/mtx/commands/uplink/GetBuildVersionResponse.d.ts +2 -4
- package/dist/mtx/commands/uplink/GetBuildVersionResponse.js +13 -9
- package/dist/mtx/commands/uplink/GetBuildVersionResponse.js.map +1 -1
- package/dist/mtx/commands/uplink/GetCurrentValuesResponse.d.ts +27 -0
- package/dist/mtx/commands/uplink/GetCurrentValuesResponse.js +88 -0
- package/dist/mtx/commands/uplink/GetCurrentValuesResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/GetDateTimeResponse.js +1 -1
- package/dist/mtx/commands/uplink/GetDateTimeResponse.js.map +1 -1
- package/dist/mtx/commands/uplink/GetEnergyCurrentResponse.d.ts +16 -0
- package/dist/mtx/commands/uplink/GetEnergyCurrentResponse.js +83 -0
- package/dist/mtx/commands/uplink/GetEnergyCurrentResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/GetEnergyDayPreviousResponse.d.ts +21 -0
- package/dist/mtx/commands/uplink/GetEnergyDayPreviousResponse.js +74 -0
- package/dist/mtx/commands/uplink/GetEnergyDayPreviousResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/GetEnergyDayResponse.d.ts +20 -0
- package/dist/mtx/commands/uplink/GetEnergyDayResponse.js +95 -0
- package/dist/mtx/commands/uplink/GetEnergyDayResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/GetExtendedCurrentValuesResponse.d.ts +20 -0
- package/dist/mtx/commands/uplink/GetExtendedCurrentValuesResponse.js +58 -0
- package/dist/mtx/commands/uplink/GetExtendedCurrentValuesResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/GetHalfHoursResponse.d.ts +21 -0
- package/dist/mtx/commands/uplink/GetHalfHoursResponse.js +261 -0
- package/dist/mtx/commands/uplink/GetHalfHoursResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/GetRatePlanInfoResponse.js +3 -3
- package/dist/mtx/commands/uplink/GetRatePlanInfoResponse.js.map +1 -1
- package/dist/mtx/commands/uplink/SetCorrectDateTimeResponse.d.ts +1 -1
- package/dist/mtx/commands/uplink/SetCorrectDateTimeResponse.js +2 -2
- package/dist/mtx/commands/uplink/SetCorrectDateTimeResponse.js.map +1 -1
- package/dist/mtx/commands/uplink/SetDateTimeResponse.d.ts +1 -1
- package/dist/mtx/commands/uplink/SetDateTimeResponse.js +2 -2
- package/dist/mtx/commands/uplink/SetDateTimeResponse.js.map +1 -1
- package/dist/mtx/commands/uplink/index.d.ts +6 -0
- package/dist/mtx/commands/uplink/index.js +6 -0
- package/dist/mtx/commands/uplink/index.js.map +1 -1
- package/dist/mtx/constants/commandRelations.d.ts +2 -2
- package/dist/mtx/constants/commandRelations.js +2 -0
- package/dist/mtx/constants/commandRelations.js.map +1 -1
- package/dist/mtx/constants/screenIds.d.ts +29 -22
- package/dist/mtx/constants/screenIds.js +29 -22
- package/dist/mtx/constants/screenIds.js.map +1 -1
- package/dist/mtx/constants/screenSets.js +29 -21
- package/dist/mtx/constants/screenSets.js.map +1 -1
- package/dist/mtx/message.d.ts +4 -3
- package/dist/mtx/message.js +8 -6
- package/dist/mtx/message.js.map +1 -1
- package/dist/mtxLora/CommandBinaryBuffer.d.ts +3 -6
- package/dist/mtxLora/CommandBinaryBuffer.js +18 -18
- package/dist/mtxLora/CommandBinaryBuffer.js.map +1 -1
- package/dist/mtxLora/commands/downlink/GetHalfhoursEnergies.d.ts +3 -2
- package/dist/mtxLora/commands/downlink/GetHalfhoursEnergies.js +3 -3
- package/dist/mtxLora/commands/downlink/GetHalfhoursEnergies.js.map +1 -1
- package/dist/mtxLora/commands/uplink/GetDayEnergies.d.ts +4 -2
- package/dist/mtxLora/commands/uplink/GetDayEnergies.js +42 -5
- package/dist/mtxLora/commands/uplink/GetDayEnergies.js.map +1 -1
- package/dist/mtxLora/commands/uplink/GetDayMaxPower.d.ts +4 -2
- package/dist/mtxLora/commands/uplink/GetDayMaxPower.js +40 -3
- package/dist/mtxLora/commands/uplink/GetDayMaxPower.js.map +1 -1
- package/dist/mtxLora/commands/uplink/GetHalfhoursEnergies.d.ts +5 -3
- package/dist/mtxLora/commands/uplink/GetHalfhoursEnergies.js +43 -6
- package/dist/mtxLora/commands/uplink/GetHalfhoursEnergies.js.map +1 -1
- package/dist/mtxLora/message.d.ts +5 -27
- package/dist/mtxLora/message.js +5 -110
- package/dist/mtxLora/message.js.map +1 -1
- package/dist/obis-observer/Command.d.ts +3 -25
- package/dist/obis-observer/Command.js +3 -26
- package/dist/obis-observer/Command.js.map +1 -1
- package/dist/obis-observer/UnknownCommand.d.ts +2 -3
- package/dist/obis-observer/UnknownCommand.js +3 -4
- package/dist/obis-observer/UnknownCommand.js.map +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/utils/bytesConversion.d.ts +6 -1
- package/dist/utils/bytesConversion.js +10 -3
- package/dist/utils/bytesConversion.js.map +1 -1
- package/dist/utils/permutations.d.ts +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import { DOWNLINK } from '../../../constants/directions.js';
|
|
3
|
+
import { READ_ONLY } from '../../constants/accessLevels.js';
|
|
4
|
+
const COMMAND_ID = 0x0d;
|
|
5
|
+
const COMMAND_SIZE = 0;
|
|
6
|
+
const examples = [
|
|
7
|
+
{
|
|
8
|
+
name: 'simple request',
|
|
9
|
+
hex: { header: '0d 00', body: '' }
|
|
10
|
+
}
|
|
11
|
+
];
|
|
12
|
+
class GetCurrentValues extends Command {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this.size = COMMAND_SIZE;
|
|
16
|
+
}
|
|
17
|
+
static fromBytes() {
|
|
18
|
+
return new GetCurrentValues();
|
|
19
|
+
}
|
|
20
|
+
toBytes() {
|
|
21
|
+
return new Uint8Array([COMMAND_ID, this.size]);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
GetCurrentValues.id = COMMAND_ID;
|
|
25
|
+
GetCurrentValues.directionType = DOWNLINK;
|
|
26
|
+
GetCurrentValues.examples = examples;
|
|
27
|
+
GetCurrentValues.hasParameters = false;
|
|
28
|
+
GetCurrentValues.accessLevel = READ_ONLY;
|
|
29
|
+
GetCurrentValues.maxSize = COMMAND_SIZE;
|
|
30
|
+
export default GetCurrentValues;
|
|
31
|
+
//# sourceMappingURL=GetCurrentValues.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetCurrentValues.js","sourceRoot":"","sources":["../../../../src/mtx/commands/downlink/GetCurrentValues.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,QAAQ,EAAC,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAC,SAAS,EAAC,MAAM,iCAAiC,CAAC;AAM1D,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,gBAAgB;QACtB,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAC;KACnC;CACJ,CAAC;AAqBF,MAAM,gBAAiB,SAAQ,OAAO;IAClC;QACI,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAiBD,MAAM,CAAC,SAAS;QACZ,OAAO,IAAI,gBAAgB,EAAE,CAAC;IAClC,CAAC;IAGD,OAAO;QACH,OAAO,IAAI,UAAU,CAAC,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACnD,CAAC;;AArBe,mBAAE,GAAG,UAAU,CAAC;AAEhB,8BAAa,GAAG,QAAQ,CAAC;AAEzB,yBAAQ,GAAG,QAAQ,CAAC;AAEpB,8BAAa,GAAG,KAAK,CAAC;AAEtB,4BAAW,GAAG,SAAS,CAAC;AAExB,wBAAO,GAAG,YAAY,CAAC;AAe3C,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { TEnergyType } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface IGetEnergyCurrentParameters {
|
|
4
|
+
energyType?: TEnergyType;
|
|
5
|
+
}
|
|
6
|
+
declare class GetEnergyCurrent extends Command {
|
|
7
|
+
parameters: IGetEnergyCurrentParameters;
|
|
8
|
+
constructor(parameters?: IGetEnergyCurrentParameters);
|
|
9
|
+
static readonly id = 15;
|
|
10
|
+
static readonly directionType = 1;
|
|
11
|
+
static readonly examples: TCommandExampleList;
|
|
12
|
+
static readonly hasParameters = false;
|
|
13
|
+
static readonly accessLevel = 3;
|
|
14
|
+
static readonly maxSize = 1;
|
|
15
|
+
static fromBytes(data: Uint8Array): GetEnergyCurrent;
|
|
16
|
+
toBytes(): Uint8Array;
|
|
17
|
+
}
|
|
18
|
+
export default GetEnergyCurrent;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import { DOWNLINK } from '../../../constants/directions.js';
|
|
3
|
+
import { READ_ONLY } from '../../constants/accessLevels.js';
|
|
4
|
+
const COMMAND_ID = 0x0f;
|
|
5
|
+
const MIN_COMMAND_SIZE = 0;
|
|
6
|
+
const MAX_COMMAND_SIZE = 1;
|
|
7
|
+
const examples = [
|
|
8
|
+
{
|
|
9
|
+
name: 'simple request',
|
|
10
|
+
parameters: {},
|
|
11
|
+
hex: { header: '0f 00', body: '' }
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: 'get A+ energy',
|
|
15
|
+
parameters: {
|
|
16
|
+
energyType: 1
|
|
17
|
+
},
|
|
18
|
+
hex: { header: '0f 01', body: '01' }
|
|
19
|
+
}
|
|
20
|
+
];
|
|
21
|
+
class GetEnergyCurrent extends Command {
|
|
22
|
+
constructor(parameters = {}) {
|
|
23
|
+
super();
|
|
24
|
+
this.parameters = parameters;
|
|
25
|
+
this.size = parameters?.energyType ? MAX_COMMAND_SIZE : MIN_COMMAND_SIZE;
|
|
26
|
+
}
|
|
27
|
+
static fromBytes(data) {
|
|
28
|
+
if (data?.byteLength === MAX_COMMAND_SIZE) {
|
|
29
|
+
const energyType = data[0];
|
|
30
|
+
return new GetEnergyCurrent({ energyType });
|
|
31
|
+
}
|
|
32
|
+
return new GetEnergyCurrent();
|
|
33
|
+
}
|
|
34
|
+
toBytes() {
|
|
35
|
+
const bytes = [COMMAND_ID, this.size];
|
|
36
|
+
if (this.parameters?.energyType) {
|
|
37
|
+
bytes.push(this.parameters.energyType);
|
|
38
|
+
}
|
|
39
|
+
return new Uint8Array(bytes);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
GetEnergyCurrent.id = COMMAND_ID;
|
|
43
|
+
GetEnergyCurrent.directionType = DOWNLINK;
|
|
44
|
+
GetEnergyCurrent.examples = examples;
|
|
45
|
+
GetEnergyCurrent.hasParameters = false;
|
|
46
|
+
GetEnergyCurrent.accessLevel = READ_ONLY;
|
|
47
|
+
GetEnergyCurrent.maxSize = MAX_COMMAND_SIZE;
|
|
48
|
+
export default GetEnergyCurrent;
|
|
49
|
+
//# sourceMappingURL=GetEnergyCurrent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetEnergyCurrent.js","sourceRoot":"","sources":["../../../../src/mtx/commands/downlink/GetEnergyCurrent.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAE9D,OAAO,EAAC,QAAQ,EAAC,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAC,SAAS,EAAC,MAAM,iCAAiC,CAAC;AAW1D,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAE3B,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,gBAAgB;QACtB,UAAU,EAAE,EAAE;QACd,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAC;KACnC;IACD;QACI,IAAI,EAAE,eAAe;QACrB,UAAU,EAAE;YACR,UAAU,EAAE,CAAC;SAChB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAC;KACrC;CACJ,CAAC;AAsBF,MAAM,gBAAiB,SAAQ,OAAO;IAClC,YAAqB,aAA0C,EAAE;QAC7D,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAkC;QAG7D,IAAI,CAAC,IAAI,GAAG,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC;IAC7E,CAAC;IAiBD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,IAAK,IAAI,EAAE,UAAU,KAAK,gBAAgB,EAAG,CAAC;YAC1C,MAAM,UAAU,GAAG,IAAI,CAAC,CAAC,CAAgB,CAAC;YAE1C,OAAO,IAAI,gBAAgB,CAAC,EAAC,UAAU,EAAC,CAAC,CAAC;QAC9C,CAAC;QAED,OAAO,IAAI,gBAAgB,EAAE,CAAC;IAClC,CAAC;IAGD,OAAO;QACH,MAAM,KAAK,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAEtC,IAAK,IAAI,CAAC,UAAU,EAAE,UAAU,EAAG,CAAC;YAChC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAC3C,CAAC;QAED,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;;AAjCe,mBAAE,GAAG,UAAU,CAAC;AAEhB,8BAAa,GAAG,QAAQ,CAAC;AAEzB,yBAAQ,GAAG,QAAQ,CAAC;AAEpB,8BAAa,GAAG,KAAK,CAAC;AAEtB,4BAAW,GAAG,SAAS,CAAC;AAExB,wBAAO,GAAG,gBAAgB,CAAC;AA2B/C,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { TEnergyType } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { IDate } from '../../../types.js';
|
|
4
|
+
interface IGetEnergyDayParameters {
|
|
5
|
+
date: IDate;
|
|
6
|
+
energyType?: TEnergyType;
|
|
7
|
+
}
|
|
8
|
+
declare class GetEnergyDay extends Command {
|
|
9
|
+
parameters: IGetEnergyDayParameters;
|
|
10
|
+
constructor(parameters: IGetEnergyDayParameters);
|
|
11
|
+
static readonly id = 22;
|
|
12
|
+
static readonly directionType = 1;
|
|
13
|
+
static readonly examples: TCommandExampleList;
|
|
14
|
+
static readonly hasParameters = true;
|
|
15
|
+
static readonly accessLevel = 3;
|
|
16
|
+
static readonly maxSize = 4;
|
|
17
|
+
static fromBytes(data: Uint8Array): GetEnergyDay;
|
|
18
|
+
toBytes(): Uint8Array;
|
|
19
|
+
}
|
|
20
|
+
export default GetEnergyDay;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import Command, { COMMAND_HEADER_SIZE } from '../../Command.js';
|
|
2
|
+
import CommandBinaryBuffer from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { DOWNLINK } from '../../../constants/directions.js';
|
|
4
|
+
import { READ_ONLY } from '../../constants/accessLevels.js';
|
|
5
|
+
const COMMAND_ID = 0x16;
|
|
6
|
+
const MIN_COMMAND_SIZE = 3;
|
|
7
|
+
const MAX_COMMAND_SIZE = 4;
|
|
8
|
+
const examples = [
|
|
9
|
+
{
|
|
10
|
+
name: 'request day values for 2024.03.22 00:00:00 GMT',
|
|
11
|
+
parameters: {
|
|
12
|
+
date: {
|
|
13
|
+
year: 24,
|
|
14
|
+
month: 3,
|
|
15
|
+
date: 22
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
hex: { header: '16 03', body: '18 03 16' }
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'request day values for 2024.03.22 00:00:00 GMT',
|
|
22
|
+
parameters: {
|
|
23
|
+
date: {
|
|
24
|
+
year: 24,
|
|
25
|
+
month: 3,
|
|
26
|
+
date: 22
|
|
27
|
+
},
|
|
28
|
+
energyType: 1
|
|
29
|
+
},
|
|
30
|
+
hex: { header: '16 04', body: '18 03 16 01' }
|
|
31
|
+
}
|
|
32
|
+
];
|
|
33
|
+
class GetEnergyDay extends Command {
|
|
34
|
+
constructor(parameters) {
|
|
35
|
+
super();
|
|
36
|
+
this.parameters = parameters;
|
|
37
|
+
this.size = parameters.energyType ? MAX_COMMAND_SIZE : MIN_COMMAND_SIZE;
|
|
38
|
+
}
|
|
39
|
+
static fromBytes(data) {
|
|
40
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
41
|
+
if (data.byteLength === MAX_COMMAND_SIZE) {
|
|
42
|
+
const date = buffer.getDate();
|
|
43
|
+
const energyType = buffer.getUint8();
|
|
44
|
+
return new GetEnergyDay({ date, energyType });
|
|
45
|
+
}
|
|
46
|
+
return new GetEnergyDay({ date: buffer.getDate() });
|
|
47
|
+
}
|
|
48
|
+
toBytes() {
|
|
49
|
+
const { size, parameters } = this;
|
|
50
|
+
const buffer = new CommandBinaryBuffer(COMMAND_HEADER_SIZE + size);
|
|
51
|
+
buffer.setUint8(COMMAND_ID);
|
|
52
|
+
buffer.setUint8(size);
|
|
53
|
+
buffer.setDate(parameters.date);
|
|
54
|
+
if (parameters.energyType) {
|
|
55
|
+
buffer.setUint8(parameters.energyType);
|
|
56
|
+
}
|
|
57
|
+
return buffer.toUint8Array();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
GetEnergyDay.id = COMMAND_ID;
|
|
61
|
+
GetEnergyDay.directionType = DOWNLINK;
|
|
62
|
+
GetEnergyDay.examples = examples;
|
|
63
|
+
GetEnergyDay.hasParameters = true;
|
|
64
|
+
GetEnergyDay.accessLevel = READ_ONLY;
|
|
65
|
+
GetEnergyDay.maxSize = MAX_COMMAND_SIZE;
|
|
66
|
+
export default GetEnergyDay;
|
|
67
|
+
//# sourceMappingURL=GetEnergyDay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetEnergyDay.js","sourceRoot":"","sources":["../../../../src/mtx/commands/downlink/GetEnergyDay.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAsB,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AACnF,OAAO,mBAAkC,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAC,QAAQ,EAAC,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAC,SAAS,EAAC,MAAM,iCAAiC,CAAC;AAa1D,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,MAAM,gBAAgB,GA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QACH,MAAM,EAAC,IAAI,EAAE,UAAU,EAAC,GAAG,IAAI,CAAC;QAChC,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;QAGnE,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC5B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAGtB,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QAEhC,IAAK,UAAU,CAAC,UAAU,EAAG,CAAC;YAC1B,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAC3C,CAAC;QAED,OAAO,MAAM,CAAC,YAAY,EAAE,CAAC;IACjC,CAAC;;AA5Ce,eAAE,GAAG,UAAU,CAAC;AAEhB,0BAAa,GAAG,QAAQ,CAAC;AAEzB,qBAAQ,GAAG,QAAQ,CAAC;AAEpB,0BAAa,GAAG,IAAI,CAAC;AAErB,wBAAW,GAAG,SAAS,CAAC;AAExB,oBAAO,GAAG,gBAAgB,CAAC;AAsC/C,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
declare class GetEnergyDayPrevious extends Command {
|
|
3
|
+
constructor();
|
|
4
|
+
static readonly id = 3;
|
|
5
|
+
static readonly directionType = 1;
|
|
6
|
+
static readonly examples: TCommandExampleList;
|
|
7
|
+
static readonly hasParameters = false;
|
|
8
|
+
static readonly accessLevel = 3;
|
|
9
|
+
static readonly maxSize = 0;
|
|
10
|
+
static fromBytes(): GetEnergyDayPrevious;
|
|
11
|
+
toBytes(): Uint8Array;
|
|
12
|
+
}
|
|
13
|
+
export default GetEnergyDayPrevious;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import { DOWNLINK } from '../../../constants/directions.js';
|
|
3
|
+
import { READ_ONLY } from '../../constants/accessLevels.js';
|
|
4
|
+
const COMMAND_ID = 0x03;
|
|
5
|
+
const COMMAND_SIZE = 0;
|
|
6
|
+
const examples = [
|
|
7
|
+
{
|
|
8
|
+
name: 'simple request',
|
|
9
|
+
hex: { header: '03 00', body: '' }
|
|
10
|
+
}
|
|
11
|
+
];
|
|
12
|
+
class GetEnergyDayPrevious extends Command {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this.size = COMMAND_SIZE;
|
|
16
|
+
}
|
|
17
|
+
static fromBytes() {
|
|
18
|
+
return new GetEnergyDayPrevious();
|
|
19
|
+
}
|
|
20
|
+
toBytes() {
|
|
21
|
+
return new Uint8Array([COMMAND_ID, this.size]);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
GetEnergyDayPrevious.id = COMMAND_ID;
|
|
25
|
+
GetEnergyDayPrevious.directionType = DOWNLINK;
|
|
26
|
+
GetEnergyDayPrevious.examples = examples;
|
|
27
|
+
GetEnergyDayPrevious.hasParameters = false;
|
|
28
|
+
GetEnergyDayPrevious.accessLevel = READ_ONLY;
|
|
29
|
+
GetEnergyDayPrevious.maxSize = COMMAND_SIZE;
|
|
30
|
+
export default GetEnergyDayPrevious;
|
|
31
|
+
//# sourceMappingURL=GetEnergyDayPrevious.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetEnergyDayPrevious.js","sourceRoot":"","sources":["../../../../src/mtx/commands/downlink/GetEnergyDayPrevious.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,QAAQ,EAAC,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAC,SAAS,EAAC,MAAM,iCAAiC,CAAC;AAM1D,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,gBAAgB;QACtB,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAC;KACnC;CACJ,CAAC;AAqBF,MAAM,oBAAqB,SAAQ,OAAO;IACtC;QACI,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAiBD,MAAM,CAAC,SAAS;QACZ,OAAO,IAAI,oBAAoB,EAAE,CAAC;IACtC,CAAC;IAGD,OAAO;QACH,OAAO,IAAI,UAAU,CAAC,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACnD,CAAC;;AArBe,uBAAE,GAAG,UAAU,CAAC;AAEhB,kCAAa,GAAG,QAAQ,CAAC;AAEzB,6BAAQ,GAAG,QAAQ,CAAC;AAEpB,kCAAa,GAAG,KAAK,CAAC;AAEtB,gCAAW,GAAG,SAAS,CAAC;AAExB,4BAAO,GAAG,YAAY,CAAC;AAe3C,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
declare class GetExtendedCurrentValues extends Command {
|
|
3
|
+
constructor();
|
|
4
|
+
static readonly id = 58;
|
|
5
|
+
static readonly directionType = 1;
|
|
6
|
+
static readonly examples: TCommandExampleList;
|
|
7
|
+
static readonly hasParameters = false;
|
|
8
|
+
static readonly accessLevel = 3;
|
|
9
|
+
static readonly maxSize = 0;
|
|
10
|
+
static fromBytes(): GetExtendedCurrentValues;
|
|
11
|
+
toBytes(): Uint8Array;
|
|
12
|
+
}
|
|
13
|
+
export default GetExtendedCurrentValues;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import { DOWNLINK } from '../../../constants/directions.js';
|
|
3
|
+
import { READ_ONLY } from '../../constants/accessLevels.js';
|
|
4
|
+
const COMMAND_ID = 0x3a;
|
|
5
|
+
const COMMAND_SIZE = 0;
|
|
6
|
+
const examples = [
|
|
7
|
+
{
|
|
8
|
+
name: 'simple request',
|
|
9
|
+
hex: { header: '3a 00', body: '' }
|
|
10
|
+
}
|
|
11
|
+
];
|
|
12
|
+
class GetExtendedCurrentValues extends Command {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this.size = COMMAND_SIZE;
|
|
16
|
+
}
|
|
17
|
+
static fromBytes() {
|
|
18
|
+
return new GetExtendedCurrentValues();
|
|
19
|
+
}
|
|
20
|
+
toBytes() {
|
|
21
|
+
return new Uint8Array([COMMAND_ID, this.size]);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
GetExtendedCurrentValues.id = COMMAND_ID;
|
|
25
|
+
GetExtendedCurrentValues.directionType = DOWNLINK;
|
|
26
|
+
GetExtendedCurrentValues.examples = examples;
|
|
27
|
+
GetExtendedCurrentValues.hasParameters = false;
|
|
28
|
+
GetExtendedCurrentValues.accessLevel = READ_ONLY;
|
|
29
|
+
GetExtendedCurrentValues.maxSize = COMMAND_SIZE;
|
|
30
|
+
export default GetExtendedCurrentValues;
|
|
31
|
+
//# sourceMappingURL=GetExtendedCurrentValues.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetExtendedCurrentValues.js","sourceRoot":"","sources":["../../../../src/mtx/commands/downlink/GetExtendedCurrentValues.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,QAAQ,EAAC,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAC,SAAS,EAAC,MAAM,iCAAiC,CAAC;AAM1D,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,gBAAgB;QACtB,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAC;KACnC;CACJ,CAAC;AAqBF,MAAM,wBAAyB,SAAQ,OAAO;IAC1C;QACI,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAiBD,MAAM,CAAC,SAAS;QACZ,OAAO,IAAI,wBAAwB,EAAE,CAAC;IAC1C,CAAC;IAGD,OAAO;QACH,OAAO,IAAI,UAAU,CAAC,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACnD,CAAC;;AArBe,2BAAE,GAAG,UAAU,CAAC;AAEhB,sCAAa,GAAG,QAAQ,CAAC;AAEzB,iCAAQ,GAAG,QAAQ,CAAC;AAEpB,sCAAa,GAAG,KAAK,CAAC;AAEtB,oCAAW,GAAG,SAAS,CAAC;AAExB,gCAAO,GAAG,YAAY,CAAC;AAe3C,eAAe,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { IDate } from '../../../types.js';
|
|
3
|
+
declare class GetHalfHours extends Command {
|
|
4
|
+
parameters: IDate;
|
|
5
|
+
constructor(parameters: IDate);
|
|
6
|
+
static readonly id = 21;
|
|
7
|
+
static readonly directionType = 1;
|
|
8
|
+
static readonly examples: TCommandExampleList;
|
|
9
|
+
static readonly hasParameters = true;
|
|
10
|
+
static readonly accessLevel = 3;
|
|
11
|
+
static readonly maxSize = 3;
|
|
12
|
+
static fromBytes(data: Uint8Array): GetHalfHours;
|
|
13
|
+
toBytes(): Uint8Array;
|
|
14
|
+
}
|
|
15
|
+
export default GetHalfHours;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import Command, { COMMAND_HEADER_SIZE } from '../../Command.js';
|
|
2
|
+
import CommandBinaryBuffer from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { DOWNLINK } from '../../../constants/directions.js';
|
|
4
|
+
import { READ_ONLY } from '../../constants/accessLevels.js';
|
|
5
|
+
const COMMAND_ID = 0x15;
|
|
6
|
+
const COMMAND_SIZE = 3;
|
|
7
|
+
const examples = [
|
|
8
|
+
{
|
|
9
|
+
name: 'request half hour data for 2024.03.22 00:00:00 GMT',
|
|
10
|
+
parameters: {
|
|
11
|
+
year: 24,
|
|
12
|
+
month: 3,
|
|
13
|
+
date: 22
|
|
14
|
+
},
|
|
15
|
+
hex: { header: '15 03', body: '18 03 16' }
|
|
16
|
+
}
|
|
17
|
+
];
|
|
18
|
+
class GetHalfHours extends Command {
|
|
19
|
+
constructor(parameters) {
|
|
20
|
+
super();
|
|
21
|
+
this.parameters = parameters;
|
|
22
|
+
this.size = COMMAND_SIZE;
|
|
23
|
+
}
|
|
24
|
+
static fromBytes(data) {
|
|
25
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
26
|
+
return new GetHalfHours(buffer.getDate());
|
|
27
|
+
}
|
|
28
|
+
toBytes() {
|
|
29
|
+
const { size, parameters } = this;
|
|
30
|
+
const buffer = new CommandBinaryBuffer(COMMAND_HEADER_SIZE + size);
|
|
31
|
+
buffer.setUint8(COMMAND_ID);
|
|
32
|
+
buffer.setUint8(size);
|
|
33
|
+
buffer.setDate(parameters);
|
|
34
|
+
return buffer.toUint8Array();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
GetHalfHours.id = COMMAND_ID;
|
|
38
|
+
GetHalfHours.directionType = DOWNLINK;
|
|
39
|
+
GetHalfHours.examples = examples;
|
|
40
|
+
GetHalfHours.hasParameters = true;
|
|
41
|
+
GetHalfHours.accessLevel = READ_ONLY;
|
|
42
|
+
GetHalfHours.maxSize = COMMAND_SIZE;
|
|
43
|
+
export default GetHalfHours;
|
|
44
|
+
//# sourceMappingURL=GetHalfHours.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetHalfHours.js","sourceRoot":"","sources":["../../../../src/mtx/commands/downlink/GetHalfHours.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAsB,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AACnF,OAAO,mBAAmB,MAAM,8BA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AAEpB,0BAAa,GAAG,IAAI,CAAC;AAErB,wBAAW,GAAG,SAAS,CAAC;AAExB,oBAAO,GAAG,YAAY,CAAC;AA2B3C,eAAe,YAAY,CAAC"}
|
|
@@ -5,11 +5,11 @@ const COMMAND_ID = 0x2c;
|
|
|
5
5
|
const COMMAND_SIZE = 1;
|
|
6
6
|
const examples = [
|
|
7
7
|
{
|
|
8
|
-
name: '
|
|
8
|
+
name: 'request for table A-',
|
|
9
9
|
parameters: {
|
|
10
|
-
tariffTable:
|
|
10
|
+
tariffTable: 1
|
|
11
11
|
},
|
|
12
|
-
hex: { header: '2c 01', body: '
|
|
12
|
+
hex: { header: '2c 01', body: '01' }
|
|
13
13
|
}
|
|
14
14
|
];
|
|
15
15
|
class GetRatePlanInfo extends Command {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GetRatePlanInfo.js","sourceRoot":"","sources":["../../../../src/mtx/commands/downlink/GetRatePlanInfo.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,QAAQ,EAAC,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAC,SAAS,EAAC,MAAM,iCAAiC,CAAC;AAgB1D,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"GetRatePlanInfo.js","sourceRoot":"","sources":["../../../../src/mtx/commands/downlink/GetRatePlanInfo.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,QAAQ,EAAC,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAC,SAAS,EAAC,MAAM,iCAAiC,CAAC;AAgB1D,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,sBAAsB;QAC5B,UAAU,EAAE;YACR,WAAW,EAAE,CAAC;SACjB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAC;KACrC;CACJ,CAAC;AAwBF,MAAM,eAAgB,SAAQ,OAAO;IACjC,YAAqB,UAAsC;QACvD,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAA4B;QAGvD,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAiBD,MAAM,CAAC,SAAS,CAAG,CAAC,WAAW,CAAa;QACxC,OAAO,IAAI,eAAe,CAAC,EAAC,WAAW,EAAC,CAAC,CAAC;IAC9C,CAAC;IAGD,OAAO;QACH,OAAO,IAAI,UAAU,CAAC;YAClB,UAAU;YACV,IAAI,CAAC,IAAI;YACT,IAAI,CAAC,UAAU,CAAC,WAAW;SAC9B,CAAC,CAAC;IACP,CAAC;;AAzBe,kBAAE,GAAG,UAAU,CAAC;AAEhB,6BAAa,GAAG,QAAQ,CAAC;AAEzB,wBAAQ,GAAG,QAAQ,CAAC;AAEpB,6BAAa,GAAG,IAAI,CAAC;AAErB,2BAAW,GAAG,SAAS,CAAC;AAExB,uBAAO,GAAG,YAAY,CAAC;AAmB3C,eAAe,eAAe,CAAC"}
|
|
@@ -10,7 +10,7 @@ declare class SetCorrectDateTime extends Command {
|
|
|
10
10
|
static readonly directionType = 1;
|
|
11
11
|
static readonly examples: TCommandExampleList;
|
|
12
12
|
static readonly hasParameters = true;
|
|
13
|
-
static readonly accessLevel =
|
|
13
|
+
static readonly accessLevel = 3;
|
|
14
14
|
static readonly maxSize = 2;
|
|
15
15
|
static fromBytes(data: Uint8Array): SetCorrectDateTime;
|
|
16
16
|
toBytes(): Uint8Array;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Command, { COMMAND_HEADER_SIZE } from '../../Command.js';
|
|
2
2
|
import CommandBinaryBuffer from '../../CommandBinaryBuffer.js';
|
|
3
3
|
import { DOWNLINK } from '../../../constants/directions.js';
|
|
4
|
-
import {
|
|
4
|
+
import { READ_ONLY } from '../../constants/accessLevels.js';
|
|
5
5
|
const COMMAND_ID = 0x5c;
|
|
6
6
|
const COMMAND_SIZE = 2;
|
|
7
7
|
const examples = [
|
|
@@ -45,7 +45,7 @@ SetCorrectDateTime.id = COMMAND_ID;
|
|
|
45
45
|
SetCorrectDateTime.directionType = DOWNLINK;
|
|
46
46
|
SetCorrectDateTime.examples = examples;
|
|
47
47
|
SetCorrectDateTime.hasParameters = true;
|
|
48
|
-
SetCorrectDateTime.accessLevel =
|
|
48
|
+
SetCorrectDateTime.accessLevel = READ_ONLY;
|
|
49
49
|
SetCorrectDateTime.maxSize = COMMAND_SIZE;
|
|
50
50
|
export default SetCorrectDateTime;
|
|
51
51
|
//# sourceMappingURL=SetCorrectDateTime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SetCorrectDateTime.js","sourceRoot":"","sources":["../../../../src/mtx/commands/downlink/SetCorrectDateTime.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAsB,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AACnF,OAAO,mBAAmB,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAC,QAAQ,EAAC,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"SetCorrectDateTime.js","sourceRoot":"","sources":["../../../../src/mtx/commands/downlink/SetCorrectDateTime.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAsB,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AACnF,OAAO,mBAAmB,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAC,QAAQ,EAAC,MAAM,kCAAkC,CAAC;AAC1D,OAAO,EAAC,SAAS,EAAC,MAAM,iCAAiC,CAAC;AAe1D,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,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,gCAAa,GAAG,IAAI,CAAC;AAErB,8BAAW,GAAG,SAAS,CAAC;AAExB,0BAAO,GAAG,YAAY,CAAC;AA6B3C,eAAe,kBAAkB,CAAC"}
|
|
@@ -6,18 +6,18 @@ const COMMAND_ID = 0x08;
|
|
|
6
6
|
const COMMAND_SIZE = 8;
|
|
7
7
|
const examples = [
|
|
8
8
|
{
|
|
9
|
-
name: 'time
|
|
9
|
+
name: 'time: 2024.02.19 18:31:55',
|
|
10
10
|
parameters: {
|
|
11
11
|
isSummerTime: false,
|
|
12
|
-
seconds:
|
|
13
|
-
minutes:
|
|
12
|
+
seconds: 55,
|
|
13
|
+
minutes: 31,
|
|
14
14
|
hours: 18,
|
|
15
15
|
day: 2,
|
|
16
|
-
date:
|
|
17
|
-
month:
|
|
18
|
-
year:
|
|
16
|
+
date: 19,
|
|
17
|
+
month: 2,
|
|
18
|
+
year: 24
|
|
19
19
|
},
|
|
20
|
-
hex: { header: '08 08', body: '00
|
|
20
|
+
hex: { header: '08 08', body: '00 37 1f 12 02 13 02 18' }
|
|
21
21
|
}
|
|
22
22
|
];
|
|
23
23
|
class SetDateTime extends Command {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SetDateTime.js","sourceRoot":"","sources":["../../../../src/mtx/commands/downlink/SetDateTime.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAsB,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AACnF,OAAO,mBAAmB,MAAM,8BAA8B,CAAC;AAE/D,OAAO,EAAC,SAAS,EAAC,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAC,MAAM,EAAC,MAAM,kCAAkC,CAAC;AAMxD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"SetDateTime.js","sourceRoot":"","sources":["../../../../src/mtx/commands/downlink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3B,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAEpC,OAAO,MAAM,CAAC,YAAY,EAAE,CAAC;IACjC,CAAC;;AAhCe,cAAE,GAAG,UAAU,CAAC;AAEhB,yBAAa,GAAG,MAAM,CAAC;AAEvB,oBAAQ,GAAG,QAAQ,CAAC;AAEpB,yBAAa,GAAG,IAAI,CAAC;AAErB,uBAAW,GAAG,SAAS,CAAC;AAExB,mBAAO,GAAG,YAAY,CAAC;AA0B3C,eAAe,WAAW,CAAC"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
export { default as ActivateRatePlan } from './ActivateRatePlan.js';
|
|
2
2
|
export { default as GetBuildVersion } from './GetBuildVersion.js';
|
|
3
3
|
export { default as GetCorrectTime } from './GetCorrectTime.js';
|
|
4
|
+
export { default as GetCurrentValues } from './GetCurrentValues.js';
|
|
4
5
|
export { default as GetDateTime } from './GetDateTime.js';
|
|
5
6
|
export { default as GetDayProfile } from './GetDayProfile.js';
|
|
6
7
|
export { default as GetDeviceId } from './GetDeviceId.js';
|
|
7
8
|
export { default as GetDeviceType } from './GetDeviceType.js';
|
|
8
9
|
export { default as GetDisplayParam } from './GetDisplayParam.js';
|
|
10
|
+
export { default as GetEnergyCurrent } from './GetEnergyCurrent.js';
|
|
11
|
+
export { default as GetEnergyDayPrevious } from './GetEnergyDayPrevious.js';
|
|
12
|
+
export { default as GetEnergyDay } from './GetEnergyDay.js';
|
|
13
|
+
export { default as GetExtendedCurrentValues } from './GetExtendedCurrentValues.js';
|
|
14
|
+
export { default as GetHalfHours } from './GetHalfHours.js';
|
|
9
15
|
export { default as GetOpParams } from './GetOpParams.js';
|
|
10
16
|
export { default as GetRatePlanInfo } from './GetRatePlanInfo.js';
|
|
11
17
|
export { default as GetSaldo } from './GetSaldo.js';
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
export { default as ActivateRatePlan } from './ActivateRatePlan.js';
|
|
2
2
|
export { default as GetBuildVersion } from './GetBuildVersion.js';
|
|
3
3
|
export { default as GetCorrectTime } from './GetCorrectTime.js';
|
|
4
|
+
export { default as GetCurrentValues } from './GetCurrentValues.js';
|
|
4
5
|
export { default as GetDateTime } from './GetDateTime.js';
|
|
5
6
|
export { default as GetDayProfile } from './GetDayProfile.js';
|
|
6
7
|
export { default as GetDeviceId } from './GetDeviceId.js';
|
|
7
8
|
export { default as GetDeviceType } from './GetDeviceType.js';
|
|
8
9
|
export { default as GetDisplayParam } from './GetDisplayParam.js';
|
|
10
|
+
export { default as GetEnergyCurrent } from './GetEnergyCurrent.js';
|
|
11
|
+
export { default as GetEnergyDayPrevious } from './GetEnergyDayPrevious.js';
|
|
12
|
+
export { default as GetEnergyDay } from './GetEnergyDay.js';
|
|
13
|
+
export { default as GetExtendedCurrentValues } from './GetExtendedCurrentValues.js';
|
|
14
|
+
export { default as GetHalfHours } from './GetHalfHours.js';
|
|
9
15
|
export { default as GetOpParams } from './GetOpParams.js';
|
|
10
16
|
export { default as GetRatePlanInfo } from './GetRatePlanInfo.js';
|
|
11
17
|
export { default as GetSaldo } from './GetSaldo.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mtx/commands/downlink/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,oBAAoB,CA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,oBAAoB,CAAC;AAC5D,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
-
import {
|
|
2
|
+
import { IDate } from '../../../types.js';
|
|
3
3
|
interface IGetBuildVersionResponseParameters {
|
|
4
|
-
date:
|
|
5
|
-
month: TMonth;
|
|
6
|
-
year: TYear2000;
|
|
4
|
+
date: IDate;
|
|
7
5
|
version: string;
|
|
8
6
|
}
|
|
9
7
|
declare class GetBuildVersionResponse extends Command {
|
|
@@ -7,9 +7,11 @@ const examples = [
|
|
|
7
7
|
{
|
|
8
8
|
name: '2021.09.16/0.0.9',
|
|
9
9
|
parameters: {
|
|
10
|
-
date:
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
date: {
|
|
11
|
+
date: 16,
|
|
12
|
+
month: 9,
|
|
13
|
+
year: 21
|
|
14
|
+
},
|
|
13
15
|
version: '0.0.9'
|
|
14
16
|
},
|
|
15
17
|
hex: { header: '70 06', body: '10 09 15 00 00 09' }
|
|
@@ -24,9 +26,11 @@ class GetBuildVersionResponse extends Command {
|
|
|
24
26
|
static fromBytes(data) {
|
|
25
27
|
const [date, month, year, n3, n2, n1] = data;
|
|
26
28
|
return new GetBuildVersionResponse({
|
|
27
|
-
date
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
date: {
|
|
30
|
+
date,
|
|
31
|
+
month,
|
|
32
|
+
year
|
|
33
|
+
},
|
|
30
34
|
version: `${n3}.${n2}.${n1}`
|
|
31
35
|
});
|
|
32
36
|
}
|
|
@@ -36,9 +40,9 @@ class GetBuildVersionResponse extends Command {
|
|
|
36
40
|
return new Uint8Array([
|
|
37
41
|
COMMAND_ID,
|
|
38
42
|
size,
|
|
39
|
-
parameters.date,
|
|
40
|
-
parameters.month,
|
|
41
|
-
parameters.year,
|
|
43
|
+
parameters.date.date,
|
|
44
|
+
parameters.date.month,
|
|
45
|
+
parameters.date.year,
|
|
42
46
|
...version
|
|
43
47
|
]);
|
|
44
48
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GetBuildVersionResponse.js","sourceRoot":"","sources":["../../../../src/mtx/commands/uplink/GetBuildVersionResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAC,MAAM,EAAC,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"GetBuildVersionResponse.js","sourceRoot":"","sources":["../../../../src/mtx/commands/uplink/GetBuildVersionResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAC,MAAM,EAAC,MAAM,kCAAkC,CAAC;AAiBxD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,kBAAkB;QACxB,UAAU,EAAE;YACR,IAAI,EAAE;gBACF,IAAI,EAAE,EAAE;gBACR,KAAK,EAAE,CAAC;gBACR,IAAI,EAAE,EAAE;aACX;YACD,OAAO,EAAE,OAAO;SACnB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAC;KACpD;CACJ,CAAC;AA6BF,MAAM,uBAAwB,SAAQ,OAAO;IACzC,YAAqB,UAA8C;QAC/D,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAoC;QAG/D,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAiBD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC;QAE7C,OAAO,IAAI,uBAAuB,CAAC;YAC/B,IAAI,EAAE;gBACF,IAAI;gBACJ,KAAK;gBACL,IAAI;aACP;YACD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;SAC/B,CAAC,CAAC;IACP,CAAC;IAGD,OAAO;QACH,MAAM,EAAC,IAAI,EAAE,UAAU,EAAC,GAAG,IAAI,CAAC;QAChC,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;QAE9E,OAAO,IAAI,UAAU,CAAC;YAClB,UAAU;YACV,IAAI;YACJ,UAAU,CAAC,IAAI,CAAC,IAAI;YACpB,UAAU,CAAC,IAAI,CAAC,KAAK;YACrB,UAAU,CAAC,IAAI,CAAC,IAAI;YACpB,GAAG,OAAO;SACb,CAAC,CAAC;IACP,CAAC;;AAxCe,0BAAE,GAAG,UAAU,CAAC;AAEhB,qCAAa,GAAG,MAAM,CAAC;AAEvB,gCAAQ,GAAG,QAAQ,CAAC;AAEpB,qCAAa,GAAG,IAAI,CAAC;AAErB,mCAAW,GAAG,SAAS,CAAC;AAExB,+BAAO,GAAG,YAAY,CAAC;AAkC3C,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import Command, { TCommandExampleList, IDlmsJsonOptions } from '../../Command.js';
|
|
2
|
+
import { TInt32, TInt16 } from '../../../types.js';
|
|
3
|
+
interface IGetCurrentValuesResponseParameters {
|
|
4
|
+
powerA: TInt32;
|
|
5
|
+
iaRms: TInt32;
|
|
6
|
+
vavbRms: TInt32;
|
|
7
|
+
varA: TInt32;
|
|
8
|
+
pfA: TInt16;
|
|
9
|
+
ibRms: TInt32;
|
|
10
|
+
powerB: TInt32;
|
|
11
|
+
varB: TInt32;
|
|
12
|
+
pfB: TInt16;
|
|
13
|
+
}
|
|
14
|
+
declare class GetCurrentValuesResponse extends Command {
|
|
15
|
+
parameters: IGetCurrentValuesResponseParameters;
|
|
16
|
+
constructor(parameters: IGetCurrentValuesResponseParameters);
|
|
17
|
+
static readonly id = 13;
|
|
18
|
+
static readonly directionType = 2;
|
|
19
|
+
static readonly examples: TCommandExampleList;
|
|
20
|
+
static readonly hasParameters = true;
|
|
21
|
+
static readonly accessLevel = 3;
|
|
22
|
+
static readonly maxSize = 32;
|
|
23
|
+
static fromBytes(data: Uint8Array): GetCurrentValuesResponse;
|
|
24
|
+
toBytes(): Uint8Array;
|
|
25
|
+
toJson({ dlms }?: IDlmsJsonOptions): string;
|
|
26
|
+
}
|
|
27
|
+
export default GetCurrentValuesResponse;
|