Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const assert = require("node-opcua-assert").assert;
const async = require("async");
const EventEmitter = require("events").EventEmitter;
const util = require("util");
const _ = require("underscore");
const discovery_service = require("node-opcua-service-discovery");
const RegisterServerRequest = discovery_service.RegisterServerRequest;
const RegisterServerResponse = discovery_service.RegisterServerResponse;
const RegisterServer2Request = discovery_service.RegisterServer2Request;
const RegisterServer2Response = discovery_service.RegisterServer2Response;
const OPCUAClientBase = require("node-opcua-client").OPCUAClientBase;
const SecurityPolicy = require("node-opcua-secure-channel").SecurityPolicy;
const coerceSecurityPolicy = require("node-opcua-secure-channel").coerceSecurityPolicy;
const MessageSecurityMode = require("node-opcua-service-secure-channel").MessageSecurityMode;
const _enumerationMessageSecurityMode = require("node-opcua-service-secure-channel")._enumerationMessageSecurityMode;
const Enum = require("node-opcua-enum").Enum;
const debugLog = require("node-opcua-debug").make_debugLog(__filename);
const RegisterServerManagerStatus = new Enum({
INACTIVE: 1,
INITIALIZING: 2,
const chalk = require("chalk");
const util = require("util");
const _ = require("underscore");
const assert = require("node-opcua-assert").assert;
const path = require("path");
const fs = require("fs");
const url = require("url");
const OPCUABaseServer = require("node-opcua-server").OPCUABaseServer;
const OPCUAServerEndPoint = require("node-opcua-server").OPCUAServerEndPoint;
const StatusCodes = require("node-opcua-status-code").StatusCodes;
const discovery_service = require("node-opcua-service-discovery");
const RegisterServerRequest = discovery_service.RegisterServerRequest;
const RegisterServerResponse = discovery_service.RegisterServerResponse;
const RegisterServer2Request = discovery_service.RegisterServer2Request;
const RegisterServer2Response = discovery_service.RegisterServer2Response;
const FindServersOnNetworkRequest = discovery_service.FindServersOnNetworkRequest;
const FindServersOnNetworkResponse = discovery_service.FindServersOnNetworkResponse;
const endpoints_service = require("node-opcua-service-endpoints");
const ApplicationType = endpoints_service.ApplicationType;
const get_fully_qualified_domain_name = require("node-opcua-hostname").get_fully_qualified_domain_name;
const debugLog = require("node-opcua-debug").make_debugLog(__filename);
const doDebug = false;
const _announcedOnMulticastSubnet = require("node-opcua-service-discovery")._announcedOnMulticastSubnet;
const _stop_announcedOnMulticastSubnet = require("node-opcua-service-discovery")._stop_announcedOnMulticastSubnet;
const _announceServerOnMulticastSubnet = require("node-opcua-service-discovery")._announceServerOnMulticastSubnet;