node-opcua-packet-analyzer 2.97.0 → 2.98.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/package.json +8 -8
- package/dist/source/index.d.ts +0 -1
- package/dist/source/index.js +0 -8
- package/dist/source/index.js.map +0 -1
- package/dist/source/packet_analyzer/packet_analyzer.d.ts +0 -14
- package/dist/source/packet_analyzer/packet_analyzer.js +0 -188
- package/dist/source/packet_analyzer/packet_analyzer.js.map +0 -1
- package/dist/test_helpers/compare_obj_by_encoding.d.ts +0 -2
- package/dist/test_helpers/compare_obj_by_encoding.js +0 -17
- package/dist/test_helpers/compare_obj_by_encoding.js.map +0 -1
- package/dist/test_helpers/encode_decode_round_trip_test.d.ts +0 -22
- package/dist/test_helpers/encode_decode_round_trip_test.js +0 -112
- package/dist/test_helpers/encode_decode_round_trip_test.js.map +0 -1
- package/dist/test_helpers/index.d.ts +0 -2
- package/dist/test_helpers/index.js +0 -19
- package/dist/test_helpers/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-opcua-packet-analyzer",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.98.0",
|
|
4
4
|
"description": "pure nodejs OPCUA SDK - module -packet-analyzer",
|
|
5
5
|
"main": "./dist/source/index.js",
|
|
6
6
|
"types": "./dist/source/index.d.ts",
|
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"chalk": "4.1.2",
|
|
18
18
|
"node-opcua-assert": "2.88.0",
|
|
19
|
-
"node-opcua-basic-types": "2.
|
|
20
|
-
"node-opcua-binary-stream": "2.
|
|
21
|
-
"node-opcua-debug": "2.
|
|
22
|
-
"node-opcua-factory": "2.
|
|
23
|
-
"node-opcua-utils": "2.
|
|
19
|
+
"node-opcua-basic-types": "2.98.0",
|
|
20
|
+
"node-opcua-binary-stream": "2.98.0",
|
|
21
|
+
"node-opcua-debug": "2.98.0",
|
|
22
|
+
"node-opcua-factory": "2.98.0",
|
|
23
|
+
"node-opcua-utils": "2.98.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"node-opcua-nodeid": "2.
|
|
26
|
+
"node-opcua-nodeid": "2.98.0",
|
|
27
27
|
"node-opcua-test-helpers": "2.88.0",
|
|
28
28
|
"should": "^13.2.3"
|
|
29
29
|
},
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"internet of things"
|
|
41
41
|
],
|
|
42
42
|
"homepage": "http://node-opcua.github.io/",
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "07dcdd8e8c7f2b55544c6e23023093e35674829c"
|
|
44
44
|
}
|
package/dist/source/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { analyzePacket, analyseExtensionObject, analyze_object_binary_encoding } from "./packet_analyzer/packet_analyzer";
|
package/dist/source/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.analyze_object_binary_encoding = exports.analyseExtensionObject = exports.analyzePacket = void 0;
|
|
4
|
-
var packet_analyzer_1 = require("./packet_analyzer/packet_analyzer");
|
|
5
|
-
Object.defineProperty(exports, "analyzePacket", { enumerable: true, get: function () { return packet_analyzer_1.analyzePacket; } });
|
|
6
|
-
Object.defineProperty(exports, "analyseExtensionObject", { enumerable: true, get: function () { return packet_analyzer_1.analyseExtensionObject; } });
|
|
7
|
-
Object.defineProperty(exports, "analyze_object_binary_encoding", { enumerable: true, get: function () { return packet_analyzer_1.analyze_object_binary_encoding; } });
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
package/dist/source/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/index.ts"],"names":[],"mappings":";;;AAAA,qEAA0H;AAAjH,gHAAA,aAAa,OAAA;AAAE,yHAAA,sBAAsB,OAAA;AAAE,iIAAA,8BAA8B,OAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { BinaryStream } from "node-opcua-binary-stream";
|
|
3
|
-
import { BaseUAObject } from "node-opcua-factory";
|
|
4
|
-
interface AnalyzePacketOptions {
|
|
5
|
-
}
|
|
6
|
-
export interface ObjectMessage {
|
|
7
|
-
encode(stream: BinaryStream): void;
|
|
8
|
-
decode(stream: BinaryStream): void;
|
|
9
|
-
decodeDebug(stream: BinaryStream, options: any): void;
|
|
10
|
-
}
|
|
11
|
-
export declare function analyzePacket(buffer: Buffer, objMessage: ObjectMessage, padding: number, offset?: number, customOptions?: AnalyzePacketOptions): void;
|
|
12
|
-
export declare function analyseExtensionObject(buffer: Buffer, padding: number, offset: number, customOptions?: AnalyzePacketOptions): void;
|
|
13
|
-
export declare function analyze_object_binary_encoding(obj: BaseUAObject): void;
|
|
14
|
-
export {};
|
|
@@ -1,188 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.analyze_object_binary_encoding = exports.analyseExtensionObject = exports.analyzePacket = void 0;
|
|
4
|
-
const util_1 = require("util");
|
|
5
|
-
const chalk = require("chalk");
|
|
6
|
-
const node_opcua_assert_1 = require("node-opcua-assert");
|
|
7
|
-
const node_opcua_basic_types_1 = require("node-opcua-basic-types");
|
|
8
|
-
const node_opcua_binary_stream_1 = require("node-opcua-binary-stream");
|
|
9
|
-
const node_opcua_debug_1 = require("node-opcua-debug");
|
|
10
|
-
const node_opcua_factory_1 = require("node-opcua-factory");
|
|
11
|
-
const node_opcua_utils_1 = require("node-opcua-utils");
|
|
12
|
-
const spaces = " ";
|
|
13
|
-
function f(n, width) {
|
|
14
|
-
const s = n.toString();
|
|
15
|
-
return (s + " ").substring(0, Math.max(s.length, width));
|
|
16
|
-
}
|
|
17
|
-
function display_encoding_mask(padding, encodingMask, encodingInfo) {
|
|
18
|
-
for (const v in encodingInfo) {
|
|
19
|
-
if (!Object.prototype.hasOwnProperty.call(encodingInfo, v)) {
|
|
20
|
-
continue;
|
|
21
|
-
}
|
|
22
|
-
const enumKey = encodingInfo[v];
|
|
23
|
-
if (typeof enumKey === "number") {
|
|
24
|
-
continue;
|
|
25
|
-
}
|
|
26
|
-
const mask = encodingInfo[enumKey];
|
|
27
|
-
const bit = Math.log(mask) / Math.log(2);
|
|
28
|
-
const bits = [".", ".", ".", ".", ".", ".", ".", ".", "."];
|
|
29
|
-
bits[bit] = (encodingMask & mask) === mask ? "Y" : "n";
|
|
30
|
-
console.log(padding + " ", bits.join(""), " <- has " + enumKey + " 0x" + mask.toString(16));
|
|
31
|
-
}
|
|
32
|
-
// DataValueEncodingByte
|
|
33
|
-
}
|
|
34
|
-
function hex_block(start, end, buffer) {
|
|
35
|
-
const n = end - start;
|
|
36
|
-
const strBuf = (0, node_opcua_utils_1.buffer_ellipsis)(buffer);
|
|
37
|
-
return (chalk.cyan("s:") + f(start, 4) + chalk.cyan(" e:") + f(end, 4) + chalk.cyan(" n:") + f(n, 4) + " " + chalk.yellow(strBuf));
|
|
38
|
-
}
|
|
39
|
-
function make_tracer(buffer, padding, offset) {
|
|
40
|
-
padding = !padding ? 0 : padding;
|
|
41
|
-
offset = offset || 0;
|
|
42
|
-
const pad = () => " ".substring(0, padding);
|
|
43
|
-
function _display(str, hexInfo) {
|
|
44
|
-
hexInfo = hexInfo || "";
|
|
45
|
-
// account for ESC codes for colors
|
|
46
|
-
const nbColorAttributes = [...str.split("")].filter((c) => c === "\u001b").length;
|
|
47
|
-
const extra = nbColorAttributes * 5;
|
|
48
|
-
console.log((pad() + str + spaces).substring(0, 132 + extra) + "|" + hexInfo);
|
|
49
|
-
}
|
|
50
|
-
function display(str, hexInfo) {
|
|
51
|
-
const lines = str.split("\n");
|
|
52
|
-
for (const line of lines) {
|
|
53
|
-
_display(line, hexInfo);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function display_encodeable(value, buffer1, start, end) {
|
|
57
|
-
const bufferExtract = buffer1.subarray(start, end);
|
|
58
|
-
const stream = new node_opcua_binary_stream_1.BinaryStream(bufferExtract);
|
|
59
|
-
const nodeId = (0, node_opcua_basic_types_1.decodeNodeId)(stream);
|
|
60
|
-
const encodingMask = (0, node_opcua_basic_types_1.decodeByte)(stream); // 1 bin 2: xml
|
|
61
|
-
const length = (0, node_opcua_basic_types_1.decodeUInt32)(stream);
|
|
62
|
-
display(chalk.green(" ExpandedNodId =") + " " + nodeId);
|
|
63
|
-
display(chalk.green(" encoding mask =") + " " + encodingMask);
|
|
64
|
-
display(chalk.green(" length =") + " " + length);
|
|
65
|
-
analyzePacket(bufferExtract.subarray(stream.length), value.encodingDefaultBinary, padding + 2, start + stream.length);
|
|
66
|
-
}
|
|
67
|
-
return {
|
|
68
|
-
tracer: {
|
|
69
|
-
dump: (title, value) => display(title + " " + chalk.green(value.toString())),
|
|
70
|
-
encoding_byte: (encodingMask, valueEnum, start, end) => {
|
|
71
|
-
(0, node_opcua_assert_1.assert)(valueEnum);
|
|
72
|
-
const b = buffer.subarray(start, end);
|
|
73
|
-
display(" 012345678", hex_block(start, end, b));
|
|
74
|
-
display_encoding_mask(pad(), encodingMask, valueEnum);
|
|
75
|
-
},
|
|
76
|
-
trace: (operation, name, value, start, end, fieldType) => {
|
|
77
|
-
const b = buffer.subarray(start, end);
|
|
78
|
-
let _hexDump = "";
|
|
79
|
-
switch (operation) {
|
|
80
|
-
case "start":
|
|
81
|
-
padding += 2;
|
|
82
|
-
display(name.toString());
|
|
83
|
-
break;
|
|
84
|
-
case "end":
|
|
85
|
-
padding -= 2;
|
|
86
|
-
break;
|
|
87
|
-
case "start_array":
|
|
88
|
-
display("." + name + " (length = " + value + ") " + "[", hex_block(start, end, b));
|
|
89
|
-
padding += 2;
|
|
90
|
-
break;
|
|
91
|
-
case "end_array":
|
|
92
|
-
padding -= 2;
|
|
93
|
-
display("] // " + name);
|
|
94
|
-
break;
|
|
95
|
-
case "start_element":
|
|
96
|
-
display(" #" + value + " {");
|
|
97
|
-
padding += 2;
|
|
98
|
-
break;
|
|
99
|
-
case "end_element":
|
|
100
|
-
padding -= 2;
|
|
101
|
-
display(" } // # " + value);
|
|
102
|
-
break;
|
|
103
|
-
case "member":
|
|
104
|
-
display("." + name + " : " + fieldType);
|
|
105
|
-
_hexDump = "";
|
|
106
|
-
if (value instanceof Buffer) {
|
|
107
|
-
_hexDump = (0, node_opcua_debug_1.hexDump)(value);
|
|
108
|
-
console.log(_hexDump);
|
|
109
|
-
value = "<BUFFER>";
|
|
110
|
-
}
|
|
111
|
-
if (value && value.encode) {
|
|
112
|
-
if (fieldType === "ExtensionObject") {
|
|
113
|
-
display_encodeable(value, buffer, start, end);
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
const str = value.toString() || "<empty>";
|
|
117
|
-
display(str);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
else {
|
|
121
|
-
display(" " + value, hex_block(start, end, b));
|
|
122
|
-
}
|
|
123
|
-
break;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
function analyzePacket(buffer, objMessage, padding, offset, customOptions) {
|
|
130
|
-
const stream = new node_opcua_binary_stream_1.BinaryStream(buffer);
|
|
131
|
-
_internalAnalyzePacket(buffer, stream, objMessage, padding, customOptions, offset);
|
|
132
|
-
}
|
|
133
|
-
exports.analyzePacket = analyzePacket;
|
|
134
|
-
function analyseExtensionObject(buffer, padding, offset, customOptions) {
|
|
135
|
-
const stream = new node_opcua_binary_stream_1.BinaryStream(buffer);
|
|
136
|
-
let id;
|
|
137
|
-
let objMessage;
|
|
138
|
-
try {
|
|
139
|
-
id = (0, node_opcua_basic_types_1.decodeExpandedNodeId)(stream);
|
|
140
|
-
objMessage = (0, node_opcua_factory_1.getStandardDataTypeFactory)().constructObject(id);
|
|
141
|
-
}
|
|
142
|
-
catch (err) {
|
|
143
|
-
console.log(id);
|
|
144
|
-
console.log(err);
|
|
145
|
-
console.log("Cannot read decodeExpandedNodeId on stream " + stream.buffer.toString("hex"));
|
|
146
|
-
}
|
|
147
|
-
_internalAnalyzePacket(buffer, stream, objMessage, padding, customOptions, offset);
|
|
148
|
-
}
|
|
149
|
-
exports.analyseExtensionObject = analyseExtensionObject;
|
|
150
|
-
function _internalAnalyzePacket(buffer, stream, objMessage, padding, customOptions, offset) {
|
|
151
|
-
let options = make_tracer(buffer, padding, offset);
|
|
152
|
-
options.name = "message";
|
|
153
|
-
if (customOptions)
|
|
154
|
-
options = Object.assign(Object.assign({}, options), customOptions);
|
|
155
|
-
try {
|
|
156
|
-
if (objMessage) {
|
|
157
|
-
objMessage.decodeDebug(stream, options);
|
|
158
|
-
}
|
|
159
|
-
else {
|
|
160
|
-
console.log(" Invalid object", objMessage);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
catch (err) {
|
|
164
|
-
console.log(" Error in ", err);
|
|
165
|
-
if (err instanceof Error) {
|
|
166
|
-
console.log(" Error in ", err.stack);
|
|
167
|
-
}
|
|
168
|
-
console.log(" objMessage ", (0, util_1.inspect)(objMessage, { colors: true }));
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
function analyze_object_binary_encoding(obj) {
|
|
172
|
-
(0, node_opcua_assert_1.assert)(obj);
|
|
173
|
-
const size = obj.binaryStoreSize();
|
|
174
|
-
console.log("-------------------------------------------------");
|
|
175
|
-
console.log(" size = ", size);
|
|
176
|
-
const stream = new node_opcua_binary_stream_1.BinaryStream(size);
|
|
177
|
-
obj.encode(stream);
|
|
178
|
-
stream.rewind();
|
|
179
|
-
console.log("-------------------------------------------------");
|
|
180
|
-
if (stream.buffer.length < 256) {
|
|
181
|
-
console.log((0, node_opcua_debug_1.hexDump)(stream.buffer));
|
|
182
|
-
console.log("-------------------------------------------------");
|
|
183
|
-
}
|
|
184
|
-
const reloadedObject = new obj.constructor();
|
|
185
|
-
analyzePacket(stream.buffer, reloadedObject, 0);
|
|
186
|
-
}
|
|
187
|
-
exports.analyze_object_binary_encoding = analyze_object_binary_encoding;
|
|
188
|
-
//# sourceMappingURL=packet_analyzer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"packet_analyzer.js","sourceRoot":"","sources":["../../../source/packet_analyzer/packet_analyzer.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,+BAA+B;AAC/B,yDAA2C;AAE3C,mEAAsG;AACtG,uEAAwD;AACxD,uDAA2C;AAC3C,2DAA8E;AAC9E,uDAAmD;AAEnD,MAAM,MAAM,GACR,+KAA+K,CAAC;AAEpL,SAAS,CAAC,CAAC,CAAS,EAAE,KAAa;IAC/B,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;IACvB,OAAO,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;AAClE,CAAC;AAED,SAAS,qBAAqB,CAAC,OAAe,EAAE,YAAiB,EAAE,YAAiB;IAChF,KAAK,MAAM,CAAC,IAAI,YAAY,EAAE;QAC1B,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE;YACxD,SAAS;SACZ;QACD,MAAM,OAAO,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;QAChC,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;YAC7B,SAAS;SACZ;QAED,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;QACnC,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAEzC,MAAM,IAAI,GAAG,CAAC,GAAG,EA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MAAM,GAAG,GAAG,EAAE;QAC5B,OAAO,CAAC,GAAG,CAAC,IAAA,0BAAO,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QACpC,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC,CAAC;KACpE;IAED,MAAM,cAAc,GAAG,IAAK,GAAG,CAAC,WAAmB,EAAE,CAAC;IACtD,aAAa,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC;AACpD,CAAC;AAlBD,wEAkBC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.compare_obj_by_encoding = void 0;
|
|
4
|
-
const node_opcua_binary_stream_1 = require("node-opcua-binary-stream");
|
|
5
|
-
const should = require("should");
|
|
6
|
-
const persist = should;
|
|
7
|
-
function compare_obj_by_encoding(obj1, obj2) {
|
|
8
|
-
function encoded(obj) {
|
|
9
|
-
const stream = new node_opcua_binary_stream_1.BinaryStream(obj.binaryStoreSize());
|
|
10
|
-
obj.encode(stream);
|
|
11
|
-
return stream.buffer.toString("hex");
|
|
12
|
-
}
|
|
13
|
-
encoded(obj1).should.eql(encoded(obj2));
|
|
14
|
-
return true;
|
|
15
|
-
}
|
|
16
|
-
exports.compare_obj_by_encoding = compare_obj_by_encoding;
|
|
17
|
-
//# sourceMappingURL=compare_obj_by_encoding.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"compare_obj_by_encoding.js","sourceRoot":"","sources":["../../test_helpers/compare_obj_by_encoding.ts"],"names":[],"mappings":";;;AAAA,uEAAwD;AAExD,iCAAiC;AACjC,MAAM,OAAO,GAAG,MAAM,CAAC;AAEvB,SAAgB,uBAAuB,CAAC,IAAkB,EAAE,IAAkB;IAC1E,SAAS,OAAO,CAAC,GAAiB;QAC9B,MAAM,MAAM,GAAG,IAAI,uCAAY,CAAC,GAAG,CAAC,eAAe,EAAE,CAAC,CAAC;QACvD,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACnB,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACxC,OAAO,IAAI,CAAC;AAChB,CAAC;AARD,0DAQC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { BinaryStream } from "node-opcua-binary-stream";
|
|
3
|
-
import { ExpandedNodeId } from "node-opcua-nodeid";
|
|
4
|
-
import { BaseUAObject } from "node-opcua-factory";
|
|
5
|
-
export interface IExtensionObject extends BaseUAObject {
|
|
6
|
-
binaryStoreSize(): number;
|
|
7
|
-
encode(stream: BinaryStream): void;
|
|
8
|
-
decode(stream: BinaryStream): void;
|
|
9
|
-
encodingDefaultBinary?: ExpandedNodeId;
|
|
10
|
-
constructor: any;
|
|
11
|
-
}
|
|
12
|
-
type encode_decode_round_trip_testCallback = (buffer: Buffer, encoding: any, options: any) => void;
|
|
13
|
-
/**
|
|
14
|
-
* @method encode_decode_round_trip_test
|
|
15
|
-
* @param obj : object to test ( the object must provide a binaryStoreSize,encode,decode method
|
|
16
|
-
* @param [options]
|
|
17
|
-
* @param callback_buffer
|
|
18
|
-
* @return {*}
|
|
19
|
-
*/
|
|
20
|
-
export declare function encode_decode_round_trip_test(obj: IExtensionObject, options?: unknown | encode_decode_round_trip_testCallback, callback_buffer?: encode_decode_round_trip_testCallback): any;
|
|
21
|
-
export declare function json_encode_decode_round_trip_test(obj: unknown, options: unknown, callbackBuffer?: unknown): void;
|
|
22
|
-
export {};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.json_encode_decode_round_trip_test = exports.encode_decode_round_trip_test = void 0;
|
|
4
|
-
// tslint:disable:no-console
|
|
5
|
-
// @ts-check
|
|
6
|
-
const chalk = require("chalk");
|
|
7
|
-
const node_opcua_binary_stream_1 = require("node-opcua-binary-stream");
|
|
8
|
-
const node_opcua_debug_1 = require("node-opcua-debug");
|
|
9
|
-
const node_opcua_factory_1 = require("node-opcua-factory");
|
|
10
|
-
const node_opcua_test_helpers_1 = require("node-opcua-test-helpers");
|
|
11
|
-
const should = require("should");
|
|
12
|
-
const source_1 = require("../source");
|
|
13
|
-
function dump_block_in_debug_mode(buffer, id, options) {
|
|
14
|
-
if (process.env.DEBUG) {
|
|
15
|
-
console.log((0, node_opcua_debug_1.hexDump)(buffer));
|
|
16
|
-
(0, source_1.analyzePacket)(buffer, id, 0, 0, options);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
function isTypedArray(v) {
|
|
20
|
-
if (v && v.buffer && v.buffer instanceof ArrayBuffer) {
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
function isArrayOrTypedArray(v) {
|
|
26
|
-
return isTypedArray(v) || v instanceof Array;
|
|
27
|
-
}
|
|
28
|
-
function compare(objReloaded, obj) {
|
|
29
|
-
function displayError(p, expected, actual) {
|
|
30
|
-
console.log(chalk.yellow(" ---------------------------------- error in encode_decode_round_trip_test"));
|
|
31
|
-
console.log(chalk.red(" key "), p);
|
|
32
|
-
console.log(chalk.red(" expected "), JSON.stringify(expected));
|
|
33
|
-
console.log(chalk.cyan(" actual "), JSON.stringify(actual));
|
|
34
|
-
}
|
|
35
|
-
Object.keys(objReloaded).forEach((p) => {
|
|
36
|
-
try {
|
|
37
|
-
if (isArrayOrTypedArray(obj[p])) {
|
|
38
|
-
(0, node_opcua_test_helpers_1.assert_arrays_are_equal)(objReloaded[p], obj[p]);
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
if (objReloaded[p] === undefined || obj[p] === undefined) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
JSON.stringify(objReloaded[p]).should.eql(JSON.stringify(obj[p]));
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
catch (err) {
|
|
48
|
-
displayError(p, obj[p], objReloaded[p]);
|
|
49
|
-
console.log(obj.toString());
|
|
50
|
-
console.log(objReloaded.toString());
|
|
51
|
-
// re throw exception
|
|
52
|
-
throw err;
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
function redirectToNull(functor) {
|
|
57
|
-
const old = console.log;
|
|
58
|
-
if (!process.env.DEBUG) {
|
|
59
|
-
// tslint:disable:no-empty
|
|
60
|
-
console.log = (...args) => {
|
|
61
|
-
/** */
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
try {
|
|
65
|
-
functor();
|
|
66
|
-
}
|
|
67
|
-
finally {
|
|
68
|
-
console.log = old;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* @method encode_decode_round_trip_test
|
|
73
|
-
* @param obj : object to test ( the object must provide a binaryStoreSize,encode,decode method
|
|
74
|
-
* @param [options]
|
|
75
|
-
* @param callback_buffer
|
|
76
|
-
* @return {*}
|
|
77
|
-
*/
|
|
78
|
-
function encode_decode_round_trip_test(obj, options, callback_buffer) {
|
|
79
|
-
if (!callback_buffer && typeof options === "function") {
|
|
80
|
-
callback_buffer = options;
|
|
81
|
-
options = {};
|
|
82
|
-
}
|
|
83
|
-
callback_buffer = callback_buffer || dump_block_in_debug_mode;
|
|
84
|
-
should.exist(obj);
|
|
85
|
-
const size = obj.binaryStoreSize();
|
|
86
|
-
const stream = new node_opcua_binary_stream_1.BinaryStream(Buffer.alloc(size));
|
|
87
|
-
obj.encode(stream);
|
|
88
|
-
callback_buffer(stream.buffer, obj.encodingDefaultBinary, options);
|
|
89
|
-
stream.rewind();
|
|
90
|
-
// reconstruct a object ( some object may not have a default Binary and should be recreated
|
|
91
|
-
const expandedNodeId = obj.encodingDefaultBinary;
|
|
92
|
-
const objReloaded = expandedNodeId ? (0, node_opcua_factory_1.getStandardDataTypeFactory)().constructObject(expandedNodeId) : new obj.constructor();
|
|
93
|
-
objReloaded.decode(stream);
|
|
94
|
-
redirectToNull(() => (0, source_1.analyze_object_binary_encoding)(obj));
|
|
95
|
-
compare(objReloaded, obj);
|
|
96
|
-
return objReloaded;
|
|
97
|
-
}
|
|
98
|
-
exports.encode_decode_round_trip_test = encode_decode_round_trip_test;
|
|
99
|
-
function json_encode_decode_round_trip_test(obj, options, callbackBuffer) {
|
|
100
|
-
if (!callbackBuffer && typeof options === "function") {
|
|
101
|
-
callbackBuffer = options;
|
|
102
|
-
options = {};
|
|
103
|
-
}
|
|
104
|
-
callbackBuffer = callbackBuffer || dump_block_in_debug_mode;
|
|
105
|
-
should.exist(obj);
|
|
106
|
-
const json = JSON.stringify(obj);
|
|
107
|
-
const objReloaded = JSON.parse(json);
|
|
108
|
-
compare(objReloaded, obj);
|
|
109
|
-
return objReloaded;
|
|
110
|
-
}
|
|
111
|
-
exports.json_encode_decode_round_trip_test = json_encode_decode_round_trip_test;
|
|
112
|
-
//# sourceMappingURL=encode_decode_round_trip_test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"encode_decode_round_trip_test.js","sourceRoot":"","sources":["../../test_helpers/encode_decode_round_trip_test.ts"],"names":[],"mappings":";;;AAAA,4BAA4B;AAC5B,YAAY;AACZ,+BAA+B;AAC/B,uEAAwD;AACxD,uDAA2C;AAE3C,2DAAyG;AACzG,qEAAkE;AAClE,iCAAiC;AAEjC,sCAA0E;AAS1E,SAAS,wBAAwB,CAAC,MAAc,EAAE,EAAO,EAAE,OAAY;IACnE,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE;QACnB,OAAO,CAAC,GAAG,CAAC,IAAA,0BAAO,EAAC,MAAM,CAAC,CAAC,CAAC;QAC7B,IAAA,sBAAa,EAAC,MAAM,EAAE,EAAE,EAAE,CAAC,E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,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./compare_obj_by_encoding"), exports);
|
|
18
|
-
__exportStar(require("./encode_decode_round_trip_test"), exports);
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../test_helpers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAA0C;AAC1C,kEAAgD"}
|