How to use the node-opcua-transport/src/message_builder_base.MessageBuilderBase.call function in node-opcua-transport

To help you get started, we’ve selected a few node-opcua-transport 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 / src / message_builder.js View on Github external
function MessageBuilder(options) {

    options = options || {};
    MessageBuilderBase.call(this, options);

    this.securityPolicy = SecurityPolicy.Invalid; // not known yet
    this.securityMode = options.securityMode || MessageSecurityMode.INVALID; // not known yet

    this.objectFactory = options.objectFactory || require("node-opcua-factory");

    assert(_.isFunction(this.objectFactory.constructObject), " the objectFactory must provide a constructObject method");

    this.previous_sequenceNumber = -1; // means unknown
    assert(_.isFinite(this.previous_sequenceNumber));
}
util.inherits(MessageBuilder, MessageBuilderBase);