How to use the node-opcua-common.OPCUASecureObject.prototype function in node-opcua-common

To help you get started, we’ve selected a few node-opcua-common 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-client / src / client_base.js View on Github external
* @type {options.connectionStrategy|{maxRetry, initialDelay, maxDelay, randomisationFactor}|*|{maxRetry: number, initialDelay: number, maxDelay: number, randomisationFactor: number}}
     */
    this.connectionStrategy = options.connectionStrategy || defaultConnectionStrategy;

    /***
     * @property keepPendingSessionsOnDisconnect²
     * @type {boolean}
     */
    this.keepPendingSessionsOnDisconnect = options.keepPendingSessionsOnDisconnect || false;
}

util.inherits(OPCUAClientBase, EventEmitter);

OPCUAClientBase.prototype.getPrivateKey = OPCUASecureObject.prototype.getPrivateKey;
OPCUAClientBase.prototype.getCertificate = OPCUASecureObject.prototype.getCertificate;
OPCUAClientBase.prototype.getCertificateChain = OPCUASecureObject.prototype.getCertificateChain;

const ObjectRegistry = require("node-opcua-object-registry").ObjectRegistry;
OPCUAClientBase.registry = new ObjectRegistry();

/**
 * is true when the client has already requested the server end points.
 * @property knowsServerEndpoint
 * @type boolean
 */
OPCUAClientBase.prototype.__defineGetter__("knowsServerEndpoint", function () {
    const self = this;
    return (self._server_endpoints && self._server_endpoints.length > 0);
});

OPCUAClientBase.prototype._destroy_secure_channel = function () {
github node-opcua / node-opcua / packages / node-opcua-client / src / client_base.js View on Github external
/**
     * @property connectionStrategy
     * @type {options.connectionStrategy|{maxRetry, initialDelay, maxDelay, randomisationFactor}|*|{maxRetry: number, initialDelay: number, maxDelay: number, randomisationFactor: number}}
     */
    this.connectionStrategy = options.connectionStrategy || defaultConnectionStrategy;

    /***
     * @property keepPendingSessionsOnDisconnect²
     * @type {boolean}
     */
    this.keepPendingSessionsOnDisconnect = options.keepPendingSessionsOnDisconnect || false;
}

util.inherits(OPCUAClientBase, EventEmitter);

OPCUAClientBase.prototype.getPrivateKey = OPCUASecureObject.prototype.getPrivateKey;
OPCUAClientBase.prototype.getCertificate = OPCUASecureObject.prototype.getCertificate;
OPCUAClientBase.prototype.getCertificateChain = OPCUASecureObject.prototype.getCertificateChain;

const ObjectRegistry = require("node-opcua-object-registry").ObjectRegistry;
OPCUAClientBase.registry = new ObjectRegistry();

/**
 * is true when the client has already requested the server end points.
 * @property knowsServerEndpoint
 * @type boolean
 */
OPCUAClientBase.prototype.__defineGetter__("knowsServerEndpoint", function () {
    const self = this;
    return (self._server_endpoints && self._server_endpoints.length > 0);
});