How to use the node-opcua-server.OPCUAServerEndPoint function in node-opcua-server

To help you get started, we’ve selected a few node-opcua-server 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 / src / opcua_discovery_server.js View on Github external
serverInfo.productUri = serverInfo.productUri || "SampleDiscoveryServer";
        serverInfo.applicationName = serverInfo.applicationName || {text: "SampleDiscoveryServer", locale: null};
        serverInfo.gatewayServerUri = serverInfo.gatewayServerUri || "";
        serverInfo.discoveryProfileUri = serverInfo.discoveryProfileUri || "";
        serverInfo.discoveryUrls = serverInfo.discoveryUrls || [];

        this.serverInfo = serverInfo;

        const port = options.port || 4840;

        this.capabilitiesForMDNS = ["LDS"];
        this.registered_servers = {};
        // see OPC UA Spec 1.2 part 6 : 7.4 Well Known Addresses
        // opc.tcp://localhost:4840/UADiscovery

        const endPoint = new OPCUAServerEndPoint({
            port: port,
            certificateChain: this.getCertificateChain(),
            privateKey: this.getPrivateKey(),
            serverInfo: this.serverInfo
        });
        endPoint.addStandardEndpointDescriptions();

        this.endpoints.push(endPoint);

        endPoint.on("message", (message, channel) => {
            this.on_request(message, channel);
        });
        this.mDnsResponder = null;
    }
github node-opcua / node-opcua / packages / node-opcua-server-discovery / source / opcua_discovery_server.ts View on Github external
this._delayInit = () => {
            const endPoint = new OPCUAServerEndPoint({
                port,

                certificateChain: this.getCertificateChain(),

                certificateManager: this.serverCertificateManager,

                privateKey: this.getPrivateKey(),
                serverInfo: this.serverInfo
            });
            endPoint.addStandardEndpointDescriptions();

            this.endpoints.push(endPoint);

            endPoint.on("message", (message: Message, channel: ServerSecureChannelLayer) => {
                if (doDebug) {
                    debugLog(" RECEIVE MESSAGE", message.request.constructor.name);