How to use the node-opcua-packet-analyzer.analyseExtensionObject function in node-opcua-packet-analyzer

To help you get started, we’ve selected a few node-opcua-packet-analyzer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github node-opcua / node-opcua / packages / node-opcua-secure-channel / source / message_builder.ts View on Github external
private _safe_decode_message_body(fullMessageBody: Buffer, objMessage: any, binaryStream: BinaryStream) {
        try {
            // de-serialize the object from the binary stream
            const options = this.objectFactory;
            objMessage.decode(binaryStream, options);
        } catch (err) {
            console.log(err);
            console.log(err.stack);
            console.log(hexDump(fullMessageBody));
            analyseExtensionObject(fullMessageBody, 0, 0);

            console.log(" ---------------- block");
            let i = 0;
            this.messageChunks.forEach((messageChunk) => {
                console.log(" ---------------- chunk i=", i++);
                console.log(hexDump(messageChunk));
            });
            return false;
        }
        return true;
    }
}
github node-opcua / node-opcua / packages / node-opcua-secure-channel / test_helpers / mock / mock_transport.ts View on Github external
}
                assert(replies.length >= 1, " expecting at least one reply " + JSON.stringify(reply));
                replies.forEach((reply1: any) => {
                    debugLog("\nFAKE SERVER SEND");
                    debugLog(chalk.red(hexDump(reply1)));
                    this._mockTransport.server.write(reply1);
                });

            } else {
                const msg = " MockServerTransport has no more packets to send to client to" +
                  " emulate server responses.... ";
                console.log(chalk.red.bold(msg));
                console.log(chalk.blue.bold(hexDump(data)));

                display_trace_from_this_projet_only();
                analyseExtensionObject(data, 0, 0, {});

                this.emit("done");
            }
        });
    }
github node-opcua / node-opcua / packages / node-opcua-secure-channel / test_helpers / verify_message_chunk.ts View on Github external
messageBuilder.on("full_message_body", (fullMessageBody: Buffer) => {
        console.log("full_message_body received:");
        analyseExtensionObject(fullMessageBody, 0, 0);
    });
    messageBuilder.on("start_chunk", (info) => {

node-opcua-packet-analyzer

pure nodejs OPCUA SDK - module packet-analyzer

MIT
Latest version published 1 month ago

Package Health Score

83 / 100
Full package analysis