How to use the node-opcua-service-endpoints.ApplicationType.SERVER function in node-opcua-service-endpoints

To help you get started, we’ve selected a few node-opcua-service-endpoints 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 / src / opcua_server.js View on Github external
endPoint.on("message", function (message, channel) {
        self.on_request(message, channel);
    });

    endPoint.on("error", function (err) {
        console.log("OPCUAServer endpoint error", err);

        // set serverState to ServerState.Failed;
        self.engine.setServerState(ServerState.Failed);

        self.shutdown(function () {
        });
    });

    self.serverInfo.applicationType = ApplicationType.SERVER;


    self.userManager = options.userManager || {};
    if (!_.isFunction(self.userManager.isValidUser)) {
        self.userManager.isValidUser = function (/*userName,password*/) {
            return false;
        };
    }

    self.discoveryServerEndpointUrl = options.discoveryServerEndpointUrl || "opc.tcp://localhost:4840";
    assert(typeof self.discoveryServerEndpointUrl === "string");
    self.capabilitiesForMDNS = options.capabilitiesForMDNS || [ "NA" ];
    self.registerServerMethod = options.registerServerMethod || RegisterServerMethod.HIDDEN;
    _installRegisterServerManager(self);
}
util.inherits(OPCUAServer, OPCUABaseServer);