jooby-codec 2.12.0 → 2.14.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/analog/Command.js +2 -4
- package/dist/analog/Command.js.map +1 -1
- package/dist/analog/CommandBinaryBuffer.d.ts +12 -0
- package/dist/analog/CommandBinaryBuffer.js +46 -0
- package/dist/analog/CommandBinaryBuffer.js.map +1 -1
- package/dist/analog/commands/downlink/GetParameter.d.ts +3 -5
- package/dist/analog/commands/downlink/GetParameter.js +28 -7
- package/dist/analog/commands/downlink/GetParameter.js.map +1 -1
- package/dist/analog/commands/uplink/SetParameterResponse.d.ts +16 -0
- package/dist/analog/commands/uplink/SetParameterResponse.js +49 -0
- package/dist/analog/commands/uplink/SetParameterResponse.js.map +1 -0
- package/dist/analog/commands/uplink/index.d.ts +1 -0
- package/dist/analog/commands/uplink/index.js +1 -0
- package/dist/analog/commands/uplink/index.js.map +1 -1
- package/dist/analog/message.d.ts +8 -0
- package/dist/analog/message.js +6 -12
- package/dist/analog/message.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/mtx/Command.d.ts +28 -0
- package/dist/mtx/Command.js +30 -0
- package/dist/mtx/Command.js.map +1 -0
- package/dist/mtx/CommandBinaryBuffer.d.ts +167 -0
- package/dist/mtx/CommandBinaryBuffer.js +332 -0
- package/dist/mtx/CommandBinaryBuffer.js.map +1 -0
- package/dist/mtx/UnknownCommand.d.ts +13 -0
- package/dist/mtx/UnknownCommand.js +17 -0
- package/dist/mtx/UnknownCommand.js.map +1 -0
- package/dist/mtx/commands/downlink/ActivateRatePlan.d.ts +18 -0
- package/dist/mtx/commands/downlink/ActivateRatePlan.js +55 -0
- package/dist/mtx/commands/downlink/ActivateRatePlan.js.map +1 -0
- package/dist/mtx/commands/downlink/GetDateTime.d.ts +12 -0
- package/dist/mtx/commands/downlink/GetDateTime.js +30 -0
- package/dist/mtx/commands/downlink/GetDateTime.js.map +1 -0
- package/dist/mtx/commands/downlink/GetDisplayParam.d.ts +16 -0
- package/dist/mtx/commands/downlink/GetDisplayParam.js +38 -0
- package/dist/mtx/commands/downlink/GetDisplayParam.js.map +1 -0
- package/dist/mtx/commands/downlink/GetOpParams.d.ts +12 -0
- package/dist/mtx/commands/downlink/GetOpParams.js +30 -0
- package/dist/mtx/commands/downlink/GetOpParams.js.map +1 -0
- package/dist/mtx/commands/downlink/GetRatePlanInfo.d.ts +16 -0
- package/dist/mtx/commands/downlink/GetRatePlanInfo.js +38 -0
- package/dist/mtx/commands/downlink/GetRatePlanInfo.js.map +1 -0
- package/dist/mtx/commands/downlink/SetDisplayParam.d.ts +17 -0
- package/dist/mtx/commands/downlink/SetDisplayParam.js +54 -0
- package/dist/mtx/commands/downlink/SetDisplayParam.js.map +1 -0
- package/dist/mtx/commands/downlink/SetOpParams.d.ts +14 -0
- package/dist/mtx/commands/downlink/SetOpParams.js +47 -0
- package/dist/mtx/commands/downlink/SetOpParams.js.map +1 -0
- package/dist/mtx/commands/downlink/TurnRelayOff.d.ts +12 -0
- package/dist/mtx/commands/downlink/TurnRelayOff.js +30 -0
- package/dist/mtx/commands/downlink/TurnRelayOff.js.map +1 -0
- package/dist/mtx/commands/downlink/TurnRelayOn.d.ts +12 -0
- package/dist/mtx/commands/downlink/TurnRelayOn.js +30 -0
- package/dist/mtx/commands/downlink/TurnRelayOn.js.map +1 -0
- package/dist/mtx/commands/downlink/index.d.ts +9 -0
- package/dist/mtx/commands/downlink/index.js +10 -0
- package/dist/mtx/commands/downlink/index.js.map +1 -0
- package/dist/mtx/commands/index.d.ts +2 -0
- package/dist/mtx/commands/index.js +3 -0
- package/dist/mtx/commands/index.js.map +1 -0
- package/dist/mtx/commands/uplink/ActivateRatePlanResponse.d.ts +12 -0
- package/dist/mtx/commands/uplink/ActivateRatePlanResponse.js +30 -0
- package/dist/mtx/commands/uplink/ActivateRatePlanResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/ErrorResponse.d.ts +17 -0
- package/dist/mtx/commands/uplink/ErrorResponse.js +47 -0
- package/dist/mtx/commands/uplink/ErrorResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/GetDateTimeResponse.d.ts +14 -0
- package/dist/mtx/commands/uplink/GetDateTimeResponse.js +47 -0
- package/dist/mtx/commands/uplink/GetDateTimeResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/GetDisplayParamResponse.d.ts +17 -0
- package/dist/mtx/commands/uplink/GetDisplayParamResponse.js +54 -0
- package/dist/mtx/commands/uplink/GetDisplayParamResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/GetOpParamsResponse.d.ts +14 -0
- package/dist/mtx/commands/uplink/GetOpParamsResponse.js +47 -0
- package/dist/mtx/commands/uplink/GetOpParamsResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/GetRatePlanInfoResponse.d.ts +19 -0
- package/dist/mtx/commands/uplink/GetRatePlanInfoResponse.js +70 -0
- package/dist/mtx/commands/uplink/GetRatePlanInfoResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/SetDisplayParamResponse.d.ts +12 -0
- package/dist/mtx/commands/uplink/SetDisplayParamResponse.js +30 -0
- package/dist/mtx/commands/uplink/SetDisplayParamResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/SetOpParamsResponse.d.ts +12 -0
- package/dist/mtx/commands/uplink/SetOpParamsResponse.js +30 -0
- package/dist/mtx/commands/uplink/SetOpParamsResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/TurnRelayOffResponse.d.ts +12 -0
- package/dist/mtx/commands/uplink/TurnRelayOffResponse.js +30 -0
- package/dist/mtx/commands/uplink/TurnRelayOffResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/TurnRelayOnResponse.d.ts +12 -0
- package/dist/mtx/commands/uplink/TurnRelayOnResponse.js +30 -0
- package/dist/mtx/commands/uplink/TurnRelayOnResponse.js.map +1 -0
- package/dist/mtx/commands/uplink/index.d.ts +10 -0
- package/dist/mtx/commands/uplink/index.js +11 -0
- package/dist/mtx/commands/uplink/index.js.map +1 -0
- package/dist/mtx/constants/accessLevels.d.ts +5 -0
- package/dist/mtx/constants/accessLevels.js +6 -0
- package/dist/mtx/constants/accessLevels.js.map +1 -0
- package/dist/mtx/constants/directions.d.ts +3 -0
- package/dist/mtx/constants/directions.js +4 -0
- package/dist/mtx/constants/directions.js.map +1 -0
- package/dist/mtx/constants/frameAttributes.d.ts +3 -0
- package/dist/mtx/constants/frameAttributes.js +4 -0
- package/dist/mtx/constants/frameAttributes.js.map +1 -0
- package/dist/mtx/constants/frameTypes.d.ts +13 -0
- package/dist/mtx/constants/frameTypes.js +14 -0
- package/dist/mtx/constants/frameTypes.js.map +1 -0
- package/dist/mtx/constants/index.d.ts +9 -0
- package/dist/mtx/constants/index.js +10 -0
- package/dist/mtx/constants/index.js.map +1 -0
- package/dist/mtx/constants/resultCodes.d.ts +25 -0
- package/dist/mtx/constants/resultCodes.js +26 -0
- package/dist/mtx/constants/resultCodes.js.map +1 -0
- package/dist/mtx/constants/resultNames.d.ts +2 -0
- package/dist/mtx/constants/resultNames.js +4 -0
- package/dist/mtx/constants/resultNames.js.map +1 -0
- package/dist/mtx/constants/screenIds.d.ts +22 -0
- package/dist/mtx/constants/screenIds.js +23 -0
- package/dist/mtx/constants/screenIds.js.map +1 -0
- package/dist/mtx/constants/screenNames.d.ts +2 -0
- package/dist/mtx/constants/screenNames.js +4 -0
- package/dist/mtx/constants/screenNames.js.map +1 -0
- package/dist/mtx/constants/screenSets.d.ts +2 -0
- package/dist/mtx/constants/screenSets.js +28 -0
- package/dist/mtx/constants/screenSets.js.map +1 -0
- package/dist/mtx/index.d.ts +3 -0
- package/dist/mtx/index.js +4 -0
- package/dist/mtx/index.js.map +1 -0
- package/dist/mtx/message.d.ts +50 -0
- package/dist/mtx/message.js +138 -0
- package/dist/mtx/message.js.map +1 -0
- package/dist/mtx/utils/crypto.d.ts +10 -0
- package/dist/mtx/utils/crypto.js +111 -0
- package/dist/mtx/utils/crypto.js.map +1 -0
- package/dist/obis-observer/Command.js +2 -4
- package/dist/obis-observer/Command.js.map +1 -1
- package/dist/obis-observer/commands/downlink/UpdateImageWrite.js +2 -4
- package/dist/obis-observer/commands/downlink/UpdateImageWrite.js.map +1 -1
- package/dist/obis-observer/message.d.ts +8 -0
- package/dist/obis-observer/message.js +5 -11
- package/dist/obis-observer/message.js.map +1 -1
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/mergeUint8Arrays.d.ts +2 -0
- package/dist/utils/mergeUint8Arrays.js +11 -0
- package/dist/utils/mergeUint8Arrays.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetDateTimeResponse.js","sourceRoot":"","sources":["../../../../src/mtx/commands/uplink/GetDateTimeResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAsB,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AACnF,OAAO,mBAAgC,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAC,SAAS,EAAC,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAGrD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,yCAAyC;QAC/C,UAAU,EAAE;YACR,OAAO,EAAE,EAAE;YACX,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,EAAE;YACT,GAAG,EAAE,CAAC;YACN,IAAI,EAAE,EAAE;YACR,KAAK,EAAE,CAAC;YACR,IAAI,EAAE,EAAE;YACR,YAAY,EAAE,KAAK;SACtB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,yBAAyB,EAAC;KAC1D;CACJ,CAAC;AA6BF,MAAM,mBAAoB,SAAQ,OAAO;IACrC,YAAqB,UAAqB;QACtC,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAW;QAGtC,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAeD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAE7C,OAAO,IAAI,mBAAmB,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;IACzD,CAAC;IAGD,OAAO;QACH,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,mBAAmB,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;QAGxE,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;QAC5B,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAG3B,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAEpC,OAAO,MAAM,CAAC,YAAY,EAAE,CAAC;IACjC,CAAC;;AA9Be,sBAAE,GAAG,UAAU,CAAC;AAEhB,iCAAa,GAAG,MAAM,CAAC;AAEvB,4BAAQ,GAAG,QAAQ,CAAC;AAEpB,iCAAa,GAAG,IAAI,CAAC;AAErB,+BAAW,GAAG,SAAS,CAAC;AA0B5C,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
interface IGetDisplayParamResponseParameters {
|
|
3
|
+
displayMode: number;
|
|
4
|
+
order: Array<number>;
|
|
5
|
+
}
|
|
6
|
+
declare class GetDisplayParamResponse extends Command {
|
|
7
|
+
parameters: IGetDisplayParamResponseParameters;
|
|
8
|
+
constructor(parameters: IGetDisplayParamResponseParameters);
|
|
9
|
+
static readonly id = 94;
|
|
10
|
+
static readonly directionType = 2;
|
|
11
|
+
static readonly examples: TCommandExampleList;
|
|
12
|
+
static readonly hasParameters = true;
|
|
13
|
+
static readonly accessLevel = 3;
|
|
14
|
+
static fromBytes(data: Uint8Array): GetDisplayParamResponse;
|
|
15
|
+
toBytes(): Uint8Array;
|
|
16
|
+
}
|
|
17
|
+
export default GetDisplayParamResponse;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import { READ_ONLY } from '../../constants/accessLevels.js';
|
|
3
|
+
import { UPLINK } from '../../constants/directions.js';
|
|
4
|
+
const COMMAND_ID = 0x5e;
|
|
5
|
+
const COMMAND_SIZE = 1;
|
|
6
|
+
const MAX_COMMAND_SIZE = 33;
|
|
7
|
+
const examples = [
|
|
8
|
+
{
|
|
9
|
+
name: 'mode with order',
|
|
10
|
+
parameters: {
|
|
11
|
+
displayMode: 8,
|
|
12
|
+
order: [4, 5, 6, 7]
|
|
13
|
+
},
|
|
14
|
+
hex: { header: '5e 05', body: '08 04 05 06 07' }
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: 'mode without order',
|
|
18
|
+
parameters: {
|
|
19
|
+
displayMode: 0
|
|
20
|
+
},
|
|
21
|
+
hex: { header: '5e 01', body: '00' }
|
|
22
|
+
}
|
|
23
|
+
];
|
|
24
|
+
class GetDisplayParamResponse extends Command {
|
|
25
|
+
constructor(parameters) {
|
|
26
|
+
super();
|
|
27
|
+
this.parameters = parameters;
|
|
28
|
+
parameters.order = parameters.order || [];
|
|
29
|
+
this.size = COMMAND_SIZE + parameters.order.length;
|
|
30
|
+
}
|
|
31
|
+
static fromBytes(data) {
|
|
32
|
+
if (!data || data.length < 1 || data.length > MAX_COMMAND_SIZE) {
|
|
33
|
+
throw new Error('Invalid GetDisplayParamResponse data size.');
|
|
34
|
+
}
|
|
35
|
+
const [displayMode, ...order] = data;
|
|
36
|
+
return new GetDisplayParamResponse({ displayMode, order });
|
|
37
|
+
}
|
|
38
|
+
toBytes() {
|
|
39
|
+
const { size, parameters } = this;
|
|
40
|
+
return new Uint8Array([
|
|
41
|
+
COMMAND_ID,
|
|
42
|
+
size,
|
|
43
|
+
parameters.displayMode,
|
|
44
|
+
...parameters.order
|
|
45
|
+
]);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
GetDisplayParamResponse.id = COMMAND_ID;
|
|
49
|
+
GetDisplayParamResponse.directionType = UPLINK;
|
|
50
|
+
GetDisplayParamResponse.examples = examples;
|
|
51
|
+
GetDisplayParamResponse.hasParameters = true;
|
|
52
|
+
GetDisplayParamResponse.accessLevel = READ_ONLY;
|
|
53
|
+
export default GetDisplayParamResponse;
|
|
54
|
+
//# sourceMappingURL=GetDisplayParamResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetDisplayParamResponse.js","sourceRoot":"","sources":["../../../../src/mtx/commands/uplink/GetDisplayParamResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AASrD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,CAAC,CAAC;AACvB,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAE5B,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,iBAAiB;QACvB,UAAU,EAAE;YACR,WAAW,EAAE,CAAC;YACd,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;SACtB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAC;KACjD;IACD;QACI,IAAI,EAAE,oBAAoB;QAC1B,UAAU,EAAE;YACR,WAAW,EAAE,CAAC;SACjB;QACD,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAC;KACrC;CACJ,CAAC;AAuBF,MAAM,uBAAwB,SAAQ,OAAO;IACzC,YAAqB,UAA8C;QAC/D,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAoC;QAI/D,UAAU,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,IAAI,EAAE,CAAC;QAE1C,IAAI,CAAC,IAAI,GAAG,YAAY,GAAG,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC;IACvD,CAAC;IAeD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,IAAK,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,gBAAgB,EAAG;YAC9D,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;SACjE;QAED,MAAM,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC;QAErC,OAAO,IAAI,uBAAuB,CAAC,EAAC,WAAW,EAAE,KAAK,EAAC,CAAC,CAAC;IAC7D,CAAC;IAGD,OAAO;QACH,MAAM,EAAC,IAAI,EAAE,UAAU,EAAC,GAAG,IAAI,CAAC;QAEhC,OAAO,IAAI,UAAU,CAAC;YAClB,UAAU;YACV,IAAI;YACJ,UAAU,CAAC,WAAW;YACtB,GAAG,UAAU,CAAC,KAAK;SACtB,CAAC,CAAC;IACP,CAAC;;AAhCe,0BAAE,GAAG,UAAU,CAAC;AAEhB,qCAAa,GAAG,MAAM,CAAC;AAEvB,gCAAQ,GAAG,QAAQ,CAAC;AAEpB,qCAAa,GAAG,IAAI,CAAC;AAErB,mCAAW,GAAG,SAAS,CAAC;AA4B5C,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { IOperatorParameters } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
declare class GetOpParamsResponse extends Command {
|
|
4
|
+
parameters: IOperatorParameters;
|
|
5
|
+
constructor(parameters: IOperatorParameters);
|
|
6
|
+
static readonly id = 30;
|
|
7
|
+
static readonly directionType = 2;
|
|
8
|
+
static readonly examples: TCommandExampleList;
|
|
9
|
+
static readonly hasParameters = true;
|
|
10
|
+
static readonly accessLevel = 3;
|
|
11
|
+
static fromBytes(data: Uint8Array): GetOpParamsResponse;
|
|
12
|
+
toBytes(): Uint8Array;
|
|
13
|
+
}
|
|
14
|
+
export default GetOpParamsResponse;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import Command, { COMMAND_HEADER_SIZE } from '../../Command.js';
|
|
2
|
+
import CommandBinaryBuffer, { OPERATOR_PARAMETERS_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { READ_ONLY } from '../../constants/accessLevels.js';
|
|
4
|
+
import { UPLINK } from '../../constants/directions.js';
|
|
5
|
+
const COMMAND_ID = 0x1e;
|
|
6
|
+
const COMMAND_SIZE = OPERATOR_PARAMETERS_SIZE;
|
|
7
|
+
const examples = [
|
|
8
|
+
{
|
|
9
|
+
name: 'get default operator parameters response',
|
|
10
|
+
parameters: CommandBinaryBuffer.getDefaultOperatorParameters(),
|
|
11
|
+
hex: {
|
|
12
|
+
header: '1e 4a',
|
|
13
|
+
body: `00 04 0b 28 00 02 61 60 00 01 d4 c0 00 00 7c 38 00 00 7c 38 00 00 7c 38 00
|
|
14
|
+
00 7c 38 00 1e 01 7f 07 80 00 31 84 00 00 03 03 00 00 00 f0 0f 05 05 00 01
|
|
15
|
+
00 05 05 37 2d 00 00 00 00 00 02 00 05 05 05 01 08 38 3f ff 05 05 00 18`
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
];
|
|
19
|
+
class GetOpParamsResponse extends Command {
|
|
20
|
+
constructor(parameters) {
|
|
21
|
+
super();
|
|
22
|
+
this.parameters = parameters;
|
|
23
|
+
this.size = COMMAND_SIZE;
|
|
24
|
+
}
|
|
25
|
+
static fromBytes(data) {
|
|
26
|
+
if (data.length < COMMAND_SIZE) {
|
|
27
|
+
throw new Error('Invalid SetOpParams data size.');
|
|
28
|
+
}
|
|
29
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
30
|
+
return new GetOpParamsResponse(buffer.getOperatorParameters());
|
|
31
|
+
}
|
|
32
|
+
toBytes() {
|
|
33
|
+
const { size, parameters } = this;
|
|
34
|
+
const buffer = new CommandBinaryBuffer(COMMAND_HEADER_SIZE + size);
|
|
35
|
+
buffer.setUint8(COMMAND_ID);
|
|
36
|
+
buffer.setUint8(size);
|
|
37
|
+
buffer.setOperatorParameters(parameters);
|
|
38
|
+
return buffer.toUint8Array();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
GetOpParamsResponse.id = COMMAND_ID;
|
|
42
|
+
GetOpParamsResponse.directionType = UPLINK;
|
|
43
|
+
GetOpParamsResponse.examples = examples;
|
|
44
|
+
GetOpParamsResponse.hasParameters = true;
|
|
45
|
+
GetOpParamsResponse.accessLevel = READ_ONLY;
|
|
46
|
+
export default GetOpParamsResponse;
|
|
47
|
+
//# sourceMappingURL=GetOpParamsResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetOpParamsResponse.js","sourceRoot":"","sources":["../../../../src/mtx/commands/uplink/GetOpParamsResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAsB,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AACnF,OAAO,mBAAmB,EAAE,EAAsB,wBAAwB,EAAC,MAAM,8BAA8B,CAAC;AAChH,OAAO,EAAC,SAAS,EAAC,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAGrD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,wBAAwB,CAAC;AAE9C,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,0CAA0C;QAChD,UAAU,EAAE,mBAAmB,CAAC,4BAA4B,EAAE;QAC9D,GAAG,EAAE;YACD,MAAM,EAAE,OAAO;YACf,IAAI,EAAE;;2FAEyE;SAClF;KACJ;CACJ,CAAC;AAyBF,MAAM,mBAAoB,SAAQ,OAAO;IACrC,YAAqB,UAA+B;QAChD,KAAK,EAAE,CAAC;QADS,eAAU,GAAV,UAAU,CAAqB;QAGhD,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAeD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,IAAK,IAAI,CAAC,MAAM,GAAG,YAAY,EAAG;YAC9B,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;SACrD;QAED,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAE7C,OAAO,IAAI,mBAAmB,CAAC,MAAM,CAAC,qBAAqB,EAAE,CAAC,CAAC;IACnE,CAAC;IAGD,OAAO;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,qBAAqB,CAAC,UAAU,CAAC,CAAC;QAEzC,OAAO,MAAM,CAAC,YAAY,EAAE,CAAC;IACjC,CAAC;;AAnCe,sBAAE,GAAG,UAAU,CAAC;AAEhB,iCAAa,GAAG,MAAM,CAAC;AAEvB,4BAAQ,GAAG,QAAQ,CAAC;AAEpB,iCAAa,GAAG,IAAI,CAAC;AAErB,+BAAW,GAAG,SAAS,CAAC;AA+B5C,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
import { ITariffPlan } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
interface IGetRatePlanInfoResponseParameters {
|
|
4
|
+
tariffTable: number;
|
|
5
|
+
activePlan: ITariffPlan;
|
|
6
|
+
passivePlan: ITariffPlan;
|
|
7
|
+
}
|
|
8
|
+
declare class GetRatePlanInfoResponse extends Command {
|
|
9
|
+
parameters: IGetRatePlanInfoResponseParameters;
|
|
10
|
+
constructor(parameters: IGetRatePlanInfoResponseParameters);
|
|
11
|
+
static readonly id = 44;
|
|
12
|
+
static readonly directionType = 2;
|
|
13
|
+
static readonly examples: TCommandExampleList;
|
|
14
|
+
static readonly hasParameters = true;
|
|
15
|
+
static readonly accessLevel = 3;
|
|
16
|
+
static fromBytes(data: Uint8Array): GetRatePlanInfoResponse;
|
|
17
|
+
toBytes(): Uint8Array;
|
|
18
|
+
}
|
|
19
|
+
export default GetRatePlanInfoResponse;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import Command, { COMMAND_HEADER_SIZE } from '../../Command.js';
|
|
2
|
+
import CommandBinaryBuffer, { TARIFF_PLAN_SIZE } from '../../CommandBinaryBuffer.js';
|
|
3
|
+
import { READ_ONLY } from '../../constants/accessLevels.js';
|
|
4
|
+
import { UPLINK } from '../../constants/directions.js';
|
|
5
|
+
const COMMAND_ID = 0x2c;
|
|
6
|
+
const COMMAND_SIZE = 1 + 2 * TARIFF_PLAN_SIZE;
|
|
7
|
+
const examples = [
|
|
8
|
+
{
|
|
9
|
+
name: 'rate plan info response',
|
|
10
|
+
parameters: {
|
|
11
|
+
tariffTable: 8,
|
|
12
|
+
activePlan: {
|
|
13
|
+
id: 1,
|
|
14
|
+
tariffSet: 2,
|
|
15
|
+
activateYear: 3,
|
|
16
|
+
activateMonth: 4,
|
|
17
|
+
activateDay: 5,
|
|
18
|
+
specialProfilesArraySize: 6,
|
|
19
|
+
seasonProfilesArraySize: 7,
|
|
20
|
+
dayProfilesArraySize: 8
|
|
21
|
+
},
|
|
22
|
+
passivePlan: {
|
|
23
|
+
id: 10,
|
|
24
|
+
tariffSet: 20,
|
|
25
|
+
activateYear: 30,
|
|
26
|
+
activateMonth: 40,
|
|
27
|
+
activateDay: 50,
|
|
28
|
+
specialProfilesArraySize: 60,
|
|
29
|
+
seasonProfilesArraySize: 70,
|
|
30
|
+
dayProfilesArraySize: 80
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
hex: {
|
|
34
|
+
header: '2c 17',
|
|
35
|
+
body: '08 00 00 00 01 02 03 04 05 06 07 08 00 00 00 0a 14 1e 28 32 3c 46 50'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
];
|
|
39
|
+
class GetRatePlanInfoResponse extends Command {
|
|
40
|
+
constructor(parameters) {
|
|
41
|
+
super();
|
|
42
|
+
this.parameters = parameters;
|
|
43
|
+
this.size = COMMAND_SIZE;
|
|
44
|
+
}
|
|
45
|
+
static fromBytes(data) {
|
|
46
|
+
const buffer = new CommandBinaryBuffer(data);
|
|
47
|
+
return new GetRatePlanInfoResponse({
|
|
48
|
+
tariffTable: buffer.getUint8(),
|
|
49
|
+
activePlan: buffer.getTariffPlan(),
|
|
50
|
+
passivePlan: buffer.getTariffPlan()
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
toBytes() {
|
|
54
|
+
const { size, parameters } = this;
|
|
55
|
+
const buffer = new CommandBinaryBuffer(COMMAND_HEADER_SIZE + size);
|
|
56
|
+
buffer.setUint8(COMMAND_ID);
|
|
57
|
+
buffer.setUint8(size);
|
|
58
|
+
buffer.setUint8(parameters.tariffTable);
|
|
59
|
+
buffer.setTariffPlan(parameters.activePlan);
|
|
60
|
+
buffer.setTariffPlan(parameters.passivePlan);
|
|
61
|
+
return buffer.toUint8Array();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
GetRatePlanInfoResponse.id = COMMAND_ID;
|
|
65
|
+
GetRatePlanInfoResponse.directionType = UPLINK;
|
|
66
|
+
GetRatePlanInfoResponse.examples = examples;
|
|
67
|
+
GetRatePlanInfoResponse.hasParameters = true;
|
|
68
|
+
GetRatePlanInfoResponse.accessLevel = READ_ONLY;
|
|
69
|
+
export default GetRatePlanInfoResponse;
|
|
70
|
+
//# sourceMappingURL=GetRatePlanInfoResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetRatePlanInfoResponse.js","sourceRoot":"","sources":["../../../../src/mtx/commands/uplink/GetRatePlanInfoResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,EAAE,EAAsB,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AACnF,OAAO,mBAAmB,EAAE,EAAc,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAChG,OAAO,EAAC,SAAS,EAAC,MAAM,iCAAiC,CAAC;AAC1D,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AAUrD,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC;AAE9C,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,yBAAyB;QAC/B,UAAU,EAAE;YACR,WAAW,EAAE,CAAC;YACd,UAAU,EAAE;gBACR,EAAE,EAAE,CAAC;gBACL,SAAS,EAAE,CAAC;gBACZ,YAAY,EAAE,CAAC;gBACf,aAAa,EAAE,CAAC;gBAChB,WAAW,EAAE,CAAC;gBACd,wBAAwB,EAAE,CAAC;gBAC3B,uBAAuB,EAAE,CAAC;gBAC1B,oBAAoB,EAAE,CAAC;aAC1B;YACD,WAAW,EAAE;gBACT,EAAE,EAAE,EAAE;gBACN,SAAS,EAAE,EAAE;gBACb,YAAY,EAAE,EAAE;gBAChB,aAAa,EAAE,EAAE;gBACjB,WAAW,EAAE,EAAE;gBACf,wBAAwB,EAAE,EAAE;gBAC5B,uBAAuB,EAAE,EAAE;gBAC3B,oBAAoB,EAAE,EAAE;aAC3B;SACJ;QACD,GAAG,EAAE;YACD,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,sEAAsE;SAC/E;KACJ;CACJ,CAAC;AA6CF,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;IAeD,MAAM,CAAC,SAAS,CAAG,IAAgB;QAC/B,MAAM,MAAM,GAAG,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;QAE7C,OAAO,IAAI,uBAAuB,CAAC;YAC/B,WAAW,EAAE,MAAM,CAAC,QAAQ,EAAE;YAC9B,UAAU,EAAE,MAAM,CAAC,aAAa,EAAE;YAClC,WAAW,EAAE,MAAM,CAAC,aAAa,EAAE;SACtC,CAAC,CAAC;IACP,CAAC;IAGD,OAAO;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,QAAQ,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QACxC,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAC5C,MAAM,CAAC,aAAa,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAE7C,OAAO,MAAM,CAAC,YAAY,EAAE,CAAC;IACjC,CAAC;;AArCe,0BAAE,GAAG,UAAU,CAAC;AAEhB,qCAAa,GAAG,MAAM,CAAC;AAEvB,gCAAQ,GAAG,QAAQ,CAAC;AAEpB,qCAAa,GAAG,IAAI,CAAC;AAErB,mCAAW,GAAG,SAAS,CAAC;AAiC5C,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
declare class SetDisplayParamResponse extends Command {
|
|
3
|
+
constructor();
|
|
4
|
+
static id: number;
|
|
5
|
+
static readonly directionType = 2;
|
|
6
|
+
static readonly examples: TCommandExampleList;
|
|
7
|
+
static readonly hasParameters = false;
|
|
8
|
+
static readonly accessLevel = 2;
|
|
9
|
+
static fromBytes(): SetDisplayParamResponse;
|
|
10
|
+
toBytes(): Uint8Array;
|
|
11
|
+
}
|
|
12
|
+
export default SetDisplayParamResponse;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import { UPLINK } from '../../constants/directions.js';
|
|
3
|
+
import { READ_WRITE } from '../../constants/accessLevels.js';
|
|
4
|
+
const COMMAND_ID = 0x5d;
|
|
5
|
+
const COMMAND_SIZE = 0;
|
|
6
|
+
const examples = [
|
|
7
|
+
{
|
|
8
|
+
name: 'simple response',
|
|
9
|
+
hex: { header: '5d 00', body: '' }
|
|
10
|
+
}
|
|
11
|
+
];
|
|
12
|
+
class SetDisplayParamResponse extends Command {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this.size = COMMAND_SIZE;
|
|
16
|
+
}
|
|
17
|
+
static fromBytes() {
|
|
18
|
+
return new SetDisplayParamResponse();
|
|
19
|
+
}
|
|
20
|
+
toBytes() {
|
|
21
|
+
return new Uint8Array([COMMAND_ID, this.size]);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
SetDisplayParamResponse.id = COMMAND_ID;
|
|
25
|
+
SetDisplayParamResponse.directionType = UPLINK;
|
|
26
|
+
SetDisplayParamResponse.examples = examples;
|
|
27
|
+
SetDisplayParamResponse.hasParameters = false;
|
|
28
|
+
SetDisplayParamResponse.accessLevel = READ_WRITE;
|
|
29
|
+
export default SetDisplayParamResponse;
|
|
30
|
+
//# sourceMappingURL=SetDisplayParamResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetDisplayParamResponse.js","sourceRoot":"","sources":["../../../../src/mtx/commands/uplink/SetDisplayParamResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAE9D,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAC,UAAU,EAAC,MAAM,iCAAiC,CAAC;AAG3D,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,iBAAiB;QACvB,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAC;KACnC;CACJ,CAAC;AAmBF,MAAM,uBAAwB,SAAQ,OAAO;IACzC;QACI,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAeD,MAAM,CAAC,SAAS;QACZ,OAAO,IAAI,uBAAuB,EAAE,CAAC;IACzC,CAAC;IAGD,OAAO;QACH,OAAO,IAAI,UAAU,CAAC,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACnD,CAAC;;AAnBM,0BAAE,GAAG,UAAU,CAAC;AAEP,qCAAa,GAAG,MAAM,CAAC;AAEvB,gCAAQ,GAAG,QAAQ,CAAC;AAEpB,qCAAa,GAAG,KAAK,CAAC;AAEtB,mCAAW,GAAG,UAAU,CAAC;AAe7C,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
declare class SetOpParamsResponse extends Command {
|
|
3
|
+
constructor();
|
|
4
|
+
static id: number;
|
|
5
|
+
static readonly directionType = 2;
|
|
6
|
+
static readonly examples: TCommandExampleList;
|
|
7
|
+
static readonly hasParameters = false;
|
|
8
|
+
static readonly accessLevel = 2;
|
|
9
|
+
static fromBytes(): SetOpParamsResponse;
|
|
10
|
+
toBytes(): Uint8Array;
|
|
11
|
+
}
|
|
12
|
+
export default SetOpParamsResponse;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import { UPLINK } from '../../constants/directions.js';
|
|
3
|
+
import { READ_WRITE } from '../../constants/accessLevels.js';
|
|
4
|
+
const COMMAND_ID = 0x1f;
|
|
5
|
+
const COMMAND_SIZE = 0;
|
|
6
|
+
const examples = [
|
|
7
|
+
{
|
|
8
|
+
name: 'simple response',
|
|
9
|
+
hex: { header: '1f 00', body: '' }
|
|
10
|
+
}
|
|
11
|
+
];
|
|
12
|
+
class SetOpParamsResponse extends Command {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this.size = COMMAND_SIZE;
|
|
16
|
+
}
|
|
17
|
+
static fromBytes() {
|
|
18
|
+
return new SetOpParamsResponse();
|
|
19
|
+
}
|
|
20
|
+
toBytes() {
|
|
21
|
+
return new Uint8Array([COMMAND_ID, this.size]);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
SetOpParamsResponse.id = COMMAND_ID;
|
|
25
|
+
SetOpParamsResponse.directionType = UPLINK;
|
|
26
|
+
SetOpParamsResponse.examples = examples;
|
|
27
|
+
SetOpParamsResponse.hasParameters = false;
|
|
28
|
+
SetOpParamsResponse.accessLevel = READ_WRITE;
|
|
29
|
+
export default SetOpParamsResponse;
|
|
30
|
+
//# sourceMappingURL=SetOpParamsResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SetOpParamsResponse.js","sourceRoot":"","sources":["../../../../src/mtx/commands/uplink/SetOpParamsResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAC,UAAU,EAAC,MAAM,iCAAiC,CAAC;AAG3D,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,iBAAiB;QACvB,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAC;KACnC;CACJ,CAAC;AAmBF,MAAM,mBAAoB,SAAQ,OAAO;IACrC;QACI,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAeD,MAAM,CAAC,SAAS;QACZ,OAAO,IAAI,mBAAmB,EAAE,CAAC;IACrC,CAAC;IAGD,OAAO;QACH,OAAO,IAAI,UAAU,CAAC,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACnD,CAAC;;AAnBM,sBAAE,GAAG,UAAU,CAAC;AAEP,iCAAa,GAAG,MAAM,CAAC;AAEvB,4BAAQ,GAAG,QAAQ,CAAC;AAEpB,iCAAa,GAAG,KAAK,CAAC;AAEtB,+BAAW,GAAG,UAAU,CAAC;AAe7C,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
declare class TurnRelayOffResponse extends Command {
|
|
3
|
+
constructor();
|
|
4
|
+
static id: number;
|
|
5
|
+
static readonly directionType = 2;
|
|
6
|
+
static readonly examples: TCommandExampleList;
|
|
7
|
+
static readonly hasParameters = false;
|
|
8
|
+
static readonly accessLevel = 2;
|
|
9
|
+
static fromBytes(): TurnRelayOffResponse;
|
|
10
|
+
toBytes(): Uint8Array;
|
|
11
|
+
}
|
|
12
|
+
export default TurnRelayOffResponse;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import { UPLINK } from '../../constants/directions.js';
|
|
3
|
+
import { READ_WRITE } from '../../constants/accessLevels.js';
|
|
4
|
+
const COMMAND_ID = 0x19;
|
|
5
|
+
const COMMAND_SIZE = 0;
|
|
6
|
+
const examples = [
|
|
7
|
+
{
|
|
8
|
+
name: 'simple response',
|
|
9
|
+
hex: { header: '19 00', body: '' }
|
|
10
|
+
}
|
|
11
|
+
];
|
|
12
|
+
class TurnRelayOffResponse extends Command {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this.size = COMMAND_SIZE;
|
|
16
|
+
}
|
|
17
|
+
static fromBytes() {
|
|
18
|
+
return new TurnRelayOffResponse();
|
|
19
|
+
}
|
|
20
|
+
toBytes() {
|
|
21
|
+
return new Uint8Array([COMMAND_ID, this.size]);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
TurnRelayOffResponse.id = COMMAND_ID;
|
|
25
|
+
TurnRelayOffResponse.directionType = UPLINK;
|
|
26
|
+
TurnRelayOffResponse.examples = examples;
|
|
27
|
+
TurnRelayOffResponse.hasParameters = false;
|
|
28
|
+
TurnRelayOffResponse.accessLevel = READ_WRITE;
|
|
29
|
+
export default TurnRelayOffResponse;
|
|
30
|
+
//# sourceMappingURL=TurnRelayOffResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TurnRelayOffResponse.js","sourceRoot":"","sources":["../../../../src/mtx/commands/uplink/TurnRelayOffResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAC,UAAU,EAAC,MAAM,iCAAiC,CAAC;AAG3D,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,iBAAiB;QACvB,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAC;KACnC;CACJ,CAAC;AAmBF,MAAM,oBAAqB,SAAQ,OAAO;IACtC;QACI,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAeD,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;;AAnBM,uBAAE,GAAG,UAAU,CAAC;AAEP,kCAAa,GAAG,MAAM,CAAC;AAEvB,6BAAQ,GAAG,QAAQ,CAAC;AAEpB,kCAAa,GAAG,KAAK,CAAC;AAEtB,gCAAW,GAAG,UAAU,CAAC;AAe7C,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import Command, { TCommandExampleList } from '../../Command.js';
|
|
2
|
+
declare class TurnRelayOnResponse extends Command {
|
|
3
|
+
constructor();
|
|
4
|
+
static id: number;
|
|
5
|
+
static readonly directionType = 2;
|
|
6
|
+
static readonly examples: TCommandExampleList;
|
|
7
|
+
static readonly hasParameters = false;
|
|
8
|
+
static readonly accessLevel = 2;
|
|
9
|
+
static fromBytes(): TurnRelayOnResponse;
|
|
10
|
+
toBytes(): Uint8Array;
|
|
11
|
+
}
|
|
12
|
+
export default TurnRelayOnResponse;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import Command from '../../Command.js';
|
|
2
|
+
import { UPLINK } from '../../constants/directions.js';
|
|
3
|
+
import { READ_WRITE } from '../../constants/accessLevels.js';
|
|
4
|
+
const COMMAND_ID = 0x18;
|
|
5
|
+
const COMMAND_SIZE = 0;
|
|
6
|
+
const examples = [
|
|
7
|
+
{
|
|
8
|
+
name: 'simple response',
|
|
9
|
+
hex: { header: '18 00', body: '' }
|
|
10
|
+
}
|
|
11
|
+
];
|
|
12
|
+
class TurnRelayOnResponse extends Command {
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this.size = COMMAND_SIZE;
|
|
16
|
+
}
|
|
17
|
+
static fromBytes() {
|
|
18
|
+
return new TurnRelayOnResponse();
|
|
19
|
+
}
|
|
20
|
+
toBytes() {
|
|
21
|
+
return new Uint8Array([COMMAND_ID, this.size]);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
TurnRelayOnResponse.id = COMMAND_ID;
|
|
25
|
+
TurnRelayOnResponse.directionType = UPLINK;
|
|
26
|
+
TurnRelayOnResponse.examples = examples;
|
|
27
|
+
TurnRelayOnResponse.hasParameters = false;
|
|
28
|
+
TurnRelayOnResponse.accessLevel = READ_WRITE;
|
|
29
|
+
export default TurnRelayOnResponse;
|
|
30
|
+
//# sourceMappingURL=TurnRelayOnResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TurnRelayOnResponse.js","sourceRoot":"","sources":["../../../../src/mtx/commands/uplink/TurnRelayOnResponse.ts"],"names":[],"mappings":"AAAA,OAAO,OAA8B,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAC,UAAU,EAAC,MAAM,iCAAiC,CAAC;AAG3D,MAAM,UAAU,GAAG,IAAI,CAAC;AACxB,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB,MAAM,QAAQ,GAAwB;IAClC;QACI,IAAI,EAAE,iBAAiB;QACvB,GAAG,EAAE,EAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAAC;KACnC;CACJ,CAAC;AAmBF,MAAM,mBAAoB,SAAQ,OAAO;IACrC;QACI,KAAK,EAAE,CAAC;QAER,IAAI,CAAC,IAAI,GAAG,YAAY,CAAC;IAC7B,CAAC;IAeD,MAAM,CAAC,SAAS;QACZ,OAAO,IAAI,mBAAmB,EAAE,CAAC;IACrC,CAAC;IAGD,OAAO;QACH,OAAO,IAAI,UAAU,CAAC,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACnD,CAAC;;AAnBM,sBAAE,GAAG,UAAU,CAAC;AAEP,iCAAa,GAAG,MAAM,CAAC;AAEvB,4BAAQ,GAAG,QAAQ,CAAC;AAEpB,iCAAa,GAAG,KAAK,CAAC;AAEtB,+BAAW,GAAG,UAAU,CAAC;AAe7C,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { default as ActivateRatePlanResponse } from './ActivateRatePlanResponse.js';
|
|
2
|
+
export { default as ErrorResponse } from './ErrorResponse.js';
|
|
3
|
+
export { default as GetDateTimeResponse } from './GetDateTimeResponse.js';
|
|
4
|
+
export { default as GetDisplayParamResponse } from './GetDisplayParamResponse.js';
|
|
5
|
+
export { default as GetOpParamsResponse } from './GetOpParamsResponse.js';
|
|
6
|
+
export { default as GetRatePlanInfoResponse } from './GetRatePlanInfoResponse.js';
|
|
7
|
+
export { default as SetDisplayParamResponse } from './SetDisplayParamResponse.js';
|
|
8
|
+
export { default as SetOpParamsResponse } from './SetOpParamsResponse.js';
|
|
9
|
+
export { default as TurnRelayOffResponse } from './TurnRelayOffResponse.js';
|
|
10
|
+
export { default as TurnRelayOnResponse } from './TurnRelayOnResponse.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as ActivateRatePlanResponse } from './ActivateRatePlanResponse.js';
|
|
2
|
+
export { default as ErrorResponse } from './ErrorResponse.js';
|
|
3
|
+
export { default as GetDateTimeResponse } from './GetDateTimeResponse.js';
|
|
4
|
+
export { default as GetDisplayParamResponse } from './GetDisplayParamResponse.js';
|
|
5
|
+
export { default as GetOpParamsResponse } from './GetOpParamsResponse.js';
|
|
6
|
+
export { default as GetRatePlanInfoResponse } from './GetRatePlanInfoResponse.js';
|
|
7
|
+
export { default as SetDisplayParamResponse } from './SetDisplayParamResponse.js';
|
|
8
|
+
export { default as SetOpParamsResponse } from './SetOpParamsResponse.js';
|
|
9
|
+
export { default as TurnRelayOffResponse } from './TurnRelayOffResponse.js';
|
|
10
|
+
export { default as TurnRelayOnResponse } from './TurnRelayOnResponse.js';
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mtx/commands/uplink/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAC,OAAO,IAAI,wBAAwB,EAAC,MAAM,+BAA+B,CAAC;AAClF,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAC,OAAO,IAAI,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAC,OAAO,IAAI,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAC,OAAO,IAAI,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAC,OAAO,IAAI,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAC,OAAO,IAAI,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAC,OAAO,IAAI,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAC,OAAO,IAAI,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAC,OAAO,IAAI,mBAAmB,EAAC,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accessLevels.js","sourceRoot":"","sources":["../../../src/mtx/constants/accessLevels.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC;AAChC,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,CAAC;AACzB,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC;AAC/B,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC;AAG9B,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directions.js","sourceRoot":"","sources":["../../../src/mtx/constants/directions.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC;AACtB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,CAAC;AAC1B,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frameAttributes.js","sourceRoot":"","sources":["../../../src/mtx/constants/frameAttributes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC;AAC/B,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC;AAC9B,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const DATA_REQUEST = 80;
|
|
2
|
+
export declare const DATA_RESPONSE = 81;
|
|
3
|
+
export declare const IDENT_REQUEST = 82;
|
|
4
|
+
export declare const IDENT_RESPONSE = 83;
|
|
5
|
+
export declare const L2_SET_ADDRESS_REQUEST = 84;
|
|
6
|
+
export declare const L2_SET_ADDRESS_RESPONSE = 85;
|
|
7
|
+
export declare const L2_CHECK_ADDRESS_REQUEST = 86;
|
|
8
|
+
export declare const L2_CHECK_ADDRESS_RESPONSE = 87;
|
|
9
|
+
export declare const L2_RM_ADDRESS_REQUEST = 88;
|
|
10
|
+
export declare const L2_RM_ADDRESS_RESPONSE = 89;
|
|
11
|
+
export declare const FRAGMENT_REQUEST = 90;
|
|
12
|
+
export declare const FRAGMENT_RESPONSE = 91;
|
|
13
|
+
export declare const INVALID = 255;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const DATA_REQUEST = 0x50;
|
|
2
|
+
export const DATA_RESPONSE = 0x51;
|
|
3
|
+
export const IDENT_REQUEST = 0x52;
|
|
4
|
+
export const IDENT_RESPONSE = 0x53;
|
|
5
|
+
export const L2_SET_ADDRESS_REQUEST = 0x54;
|
|
6
|
+
export const L2_SET_ADDRESS_RESPONSE = 0x55;
|
|
7
|
+
export const L2_CHECK_ADDRESS_REQUEST = 0x56;
|
|
8
|
+
export const L2_CHECK_ADDRESS_RESPONSE = 0x57;
|
|
9
|
+
export const L2_RM_ADDRESS_REQUEST = 0x58;
|
|
10
|
+
export const L2_RM_ADDRESS_RESPONSE = 0x59;
|
|
11
|
+
export const FRAGMENT_REQUEST = 0x5A;
|
|
12
|
+
export const FRAGMENT_RESPONSE = 0x5B;
|
|
13
|
+
export const INVALID = 0xFF;
|
|
14
|
+
//# sourceMappingURL=frameTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frameTypes.js","sourceRoot":"","sources":["../../../src/mtx/constants/frameTypes.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC;AACjC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAClC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAClC,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,CAAC;AACnC,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAC3C,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAC5C,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC;AAC7C,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC;AAC9C,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAC1C,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC;AAC3C,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AACrC,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AACtC,MAAM,CAAC,MAAM,OAAO,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as resultNames } from './resultNames.js';
|
|
2
|
+
export { default as screenNames } from './screenNames.js';
|
|
3
|
+
export * as accessLevels from './accessLevels.js';
|
|
4
|
+
export * as directions from './directions.js';
|
|
5
|
+
export * as frameAttributes from './frameAttributes.js';
|
|
6
|
+
export * as frameTypes from './frameTypes.js';
|
|
7
|
+
export * as resultCodes from './resultCodes.js';
|
|
8
|
+
export * as screenIds from './screenIds.js';
|
|
9
|
+
export * as screenSets from './screenSets.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { default as resultNames } from './resultNames.js';
|
|
2
|
+
export { default as screenNames } from './screenNames.js';
|
|
3
|
+
export * as accessLevels from './accessLevels.js';
|
|
4
|
+
export * as directions from './directions.js';
|
|
5
|
+
export * as frameAttributes from './frameAttributes.js';
|
|
6
|
+
export * as frameTypes from './frameTypes.js';
|
|
7
|
+
export * as resultCodes from './resultCodes.js';
|
|
8
|
+
export * as screenIds from './screenIds.js';
|
|
9
|
+
export * as screenSets from './screenSets.js';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mtx/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,YAAY,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const OK = 0;
|
|
2
|
+
export declare const UNKNOWN_COMMAND = 128;
|
|
3
|
+
export declare const NOT_ALIGNED_DATA = 129;
|
|
4
|
+
export declare const DECRYPTION_FAILURE = 130;
|
|
5
|
+
export declare const UNKNOWN_PROTOCOL = 131;
|
|
6
|
+
export declare const BAD_MESSAGE = 132;
|
|
7
|
+
export declare const BAD_DATA_LENGTH = 133;
|
|
8
|
+
export declare const BAD_ARRAY_INDEX = 134;
|
|
9
|
+
export declare const NOT_PREPARED_RATE_PLAN = 135;
|
|
10
|
+
export declare const BAD_RATE_PLAN_ID = 136;
|
|
11
|
+
export declare const BAD_RATE_PLAN_SIZE = 137;
|
|
12
|
+
export declare const BAD_RESPONSE_LENGTH = 144;
|
|
13
|
+
export declare const NO_DATA_FOR_DATE = 145;
|
|
14
|
+
export declare const CALIBRATION_DISABLED = 146;
|
|
15
|
+
export declare const ACCESS_DENIED = 147;
|
|
16
|
+
export declare const BAD_SALDO_WRITE = 149;
|
|
17
|
+
export declare const BLOCKED_METER = 151;
|
|
18
|
+
export declare const UNENCRYPTED_COMMAND_DISABLED = 152;
|
|
19
|
+
export declare const TIME_CORRECTION_FAILURE = 153;
|
|
20
|
+
export declare const INVALID_CORRECTION_INTERVAL = 154;
|
|
21
|
+
export declare const TIME_CORRECTION_OUT_HALF_HOUR_DISABLED = 155;
|
|
22
|
+
export declare const BAD_BLOCK_NUMBER = 156;
|
|
23
|
+
export declare const OUT_OFF_RANGE = 159;
|
|
24
|
+
export declare const SET_METER_TYPE_FAILURE = 160;
|
|
25
|
+
export declare const INTERNAL = 240;
|