How to use the node-opcua-utils.hexDump function in node-opcua-utils

To help you get started, we’ve selected a few node-opcua-utils 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-samples / bin / opcua_interceptor.js View on Github external
TrafficAnalyser.prototype.add = function (data) {

    const stream = new BinaryStream(data);
    if (argv.block) {
        console.log(hexDump(data));
        return;
    }
    const messageHeader = opcua.readMessageHeader(stream);

    if (messageHeader.msgType === "ERR") {

        var err = new s.TCPErrorMessage();
        err.decode(stream);
        console.log(" Error 0x" + err.statusCode.toString() + " reason:" + err.reason);
        console.log(hexDump(data));
    }

    const messageBuild = new MessageBuilder();
    messageBuild.on("full_message_body", function (full_message_body) {

        console.log(hexDump(full_message_body));

        try {
            analyseExtensionObject(full_message_body);
        }
        catch (err) {
            console.log("ERROR : ".red, err);
        }
    });
github node-opcua / node-opcua / packages / node-opcua-samples / bin / opcua_interceptor.js View on Github external
messageBuild.on("full_message_body", function (full_message_body) {

        console.log(hexDump(full_message_body));

        try {
            analyseExtensionObject(full_message_body);
        }
        catch (err) {
            console.log("ERROR : ".red, err);
        }
    });