How to use the node-opcua-object-registry.ObjectRegistry.registries function in node-opcua-object-registry

To help you get started, we’ve selected a few node-opcua-object-registry 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-leak-detector / src / resource_leak_detector.js View on Github external
errorMessages.push(" setInterval doesn't match number of clearInterval calls : \n      " +
            " setIntervalCallCount = " + self.setIntervalCallCount +
            " clearIntervalCallCount = " + self.clearIntervalCallCount);
    }
    if ((self.clearTimeoutCallCount + self.honoredTimeoutFuncCallCount) !== self.setTimeoutCallCount) {
        errorMessages.push(" setTimeout doesn't match number of clearTimeout or achieved timer calls : \n     " +
            " setTimeoutCallCount = " + self.setTimeoutCallCount +
            " clearTimeoutCallCount = " + self.clearTimeoutCallCount +
            " honoredTimeoutFuncCallCount = " + self.honoredTimeoutFuncCallCount);
    }
    if (self.setTimeoutCallPendingCount !== 0) {
        errorMessages.push(" setTimeoutCallPendingCount is not zero: some timer are still pending " +
            self.setTimeoutCallPendingCount);
    }

    const monitoredResource = ObjectRegistry.registries;

    for (let i = 0; i < monitoredResource.length; i++) {
        const res = monitoredResource[i];
        if (res.count() !== 0) {
            errorMessages.push(" some Resource have not been properly terminated: " + res.toString());
        }
    }

    if (errorMessages.length) {

        //xx        if (info) {
        //xx            console.log(" TRACE : ", info);
        //xx        }
        console.log(errorMessages.join("\n"));
        console.log("----------------------------------------------- more info");

node-opcua-object-registry

pure nodejs OPCUA SDK - module object-registry

MIT
Latest version published 3 months ago

Package Health Score

86 / 100
Full package analysis