connect()

in greengrass-opcua-adapter-nodejs/subscriber.js [109:124]


    connect() {
        const self = this;
        self._client.connect(self._serverConfig.url, (connectError) => {
            if (connectError) {
                console.log('Got an error connecting to ', self._serverConfig.url, ' Err: ', connectError);
                return;
            }
            self.emit('connect');
        });

        // Use this timeout to control issue data to AWS IoT Core if enable the custom strategy.
        if (self._customConfig.customUploadDataStrategy.enableStrategy) {
            let timeout = self._customConfig.customUploadDataStrategy.pollingInSecond * 1000;
            timeoutObj = setTimeout(sendDataToCloud, timeout, self._serverConfig, self._customConfig);
        }
    }