Sha256: e66094a502131256cc8158042ee42a4ee16abe2adb8548b408c231ba2c314ff0

Contents?: true

Size: 1.05 KB

Versions: 8

Compression:

Stored size: 1.05 KB

Contents

let library;

class TransmitterWrapper {
    static initialize() {
        if (process.platform === "win32")
            library = require(`${require('path').resolve(__dirname, '../../../')}/build/Release/JavonetNodejsRuntimeAddon.node`)
        else if (process.platform === "darwin")
            library = require(`${require('path').resolve(__dirname, '../../../')}/build/Release/JavonetNodejsRuntimeAddon.node`)
        else
            library = require(`${require('path').resolve(__dirname, '../../../')}/build/Release/JavonetNodejsRuntimeAddon.node`)
        let binariesRootPath = String(`${require('path').resolve(__dirname, '../../../')}`)
        return library.initializeTransmitter(binariesRootPath)
    }

    static activate(licenceKey, proxyHost, proxyUserName, proxyUserPassword) {
        this.initialize()
        return library.activate(licenceKey, proxyHost, proxyUserName, proxyUserPassword)
    }

    static sendCommand(messageArray) {
        return library.sendCommand(messageArray)
    }
}

module.exports = TransmitterWrapper

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
javonet-ruby-sdk-2.3.0 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/core/transmitter/TransmitterWrapper.js
javonet-ruby-sdk-2.2.0 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/core/transmitter/TransmitterWrapper.js
javonet-ruby-sdk-2.1.14 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/core/transmitter/TransmitterWrapper.js
javonet-ruby-sdk-2.1.13 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/core/transmitter/TransmitterWrapper.js
javonet-ruby-sdk-2.1.12 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/core/transmitter/TransmitterWrapper.js
javonet-ruby-sdk-2.1.11 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/core/transmitter/TransmitterWrapper.js
javonet-ruby-sdk-2.1.10 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/core/transmitter/TransmitterWrapper.js
javonet-ruby-sdk-2.1.9 lib/javonet-ruby-sdk/Binaries/Nodejs/Windows/X64/core/transmitter/TransmitterWrapper.js