How to use the node-opcua-service-discovery.FindServersOnNetworkResponse function in node-opcua-service-discovery

To help you get started, we’ve selected a few node-opcua-service-discovery 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-server-discovery / source / opcua_discovery_server.ts View on Github external
if (this.mDnsResponder) {
            for (const server of this.mDnsResponder.registeredServers) {
                if (server.recordId <= request.startingRecordId) {
                    continue;
                }
                if (!hasCapabilities(server.serverCapabilities, serverCapabilityFilter)) {
                    continue;
                }
                servers.push(server);
                if (servers.length === request.maxRecordsToReturn) {
                    break;
                }
            }
        }
        const response = new FindServersOnNetworkResponse({
            lastCounterResetTime, //  UtcTime The last time the counters were reset
            servers
        });
        channel.send_response("MSG", response, message);

    }
github node-opcua / node-opcua / packages / node-opcua-server-discovery / source / opcua_discovery_server.ts View on Github external
function sendError(statusCode: StatusCode) {
            const response1 = new FindServersOnNetworkResponse({ responseHeader: { serviceResult: statusCode } });
            return channel.send_response("MSG", response1, message);
        }