Class: Transmitter
- Inherits:
-
Object
- Object
- Transmitter
- Defined in:
- lib/javonet-ruby-sdk/core/transmitter/transmitter.rb,
lib/javonet-ruby-sdk/Binaries/Ruby/Linux/X64/core/transmitter/transmitter.rb,
lib/javonet-ruby-sdk/Binaries/Ruby/MacOs/X64/core/transmitter/transmitter.rb,
lib/javonet-ruby-sdk/Binaries/Ruby/Windows/X64/core/transmitter/transmitter.rb
Class Method Summary collapse
- .activate_with_credentials(licenseKey) ⇒ Object
- .activate_with_credentials_and_proxy(licenseKey, proxyHost, proxyUserName, proxyPassword) ⇒ Object
- .activate_with_license_file ⇒ Object
- .get_native_error ⇒ Object
- .send_command(message_byte_array, message_byte_array_len) ⇒ Object
- .set_config_source(configPath) ⇒ Object
Class Method Details
.activate_with_credentials(licenseKey) ⇒ Object
29 30 31 |
# File 'lib/javonet-ruby-sdk/core/transmitter/transmitter.rb', line 29 def self.activate_with_credentials(licenseKey) return activate(licenseKey) end |
.activate_with_credentials_and_proxy(licenseKey, proxyHost, proxyUserName, proxyPassword) ⇒ Object
33 34 35 |
# File 'lib/javonet-ruby-sdk/core/transmitter/transmitter.rb', line 33 def self.activate_with_credentials_and_proxy(licenseKey, proxyHost, proxyUserName, proxyPassword) return activate(licenseKey, proxyHost, proxyUserName, proxyPassword) end |
.activate_with_license_file ⇒ Object
25 26 27 |
# File 'lib/javonet-ruby-sdk/core/transmitter/transmitter.rb', line 25 def self.activate_with_license_file() return activate() end |
.get_native_error ⇒ Object
47 48 49 |
# File 'lib/javonet-ruby-sdk/core/transmitter/transmitter.rb', line 47 def self.get_native_error TransmitterWrapper.GetNativeError end |
.send_command(message_byte_array, message_byte_array_len) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/javonet-ruby-sdk/core/transmitter/transmitter.rb', line 7 def self.send_command(, ) = FFI::MemoryPointer.new(:uchar, , true) .put_array_of_uchar(0, ) response_byte_array_len = TransmitterWrapper.SendCommand(, ) if response_byte_array_len > 0 response = FFI::MemoryPointer.new(:uchar, response_byte_array_len, true) TransmitterWrapper.ReadResponse(response, response_byte_array_len) response_byte_array = response.get_array_of_uchar(0, response_byte_array_len) return response_byte_array elsif response_byte_array_len == 0 = "Response is empty" raise Exception.new else = get_native_error raise Exception.new "Javonet native error code: " + response_byte_array_len.to_s + ". " + end end |
.set_config_source(configPath) ⇒ Object
51 52 53 54 55 56 57 58 59 |
# File 'lib/javonet-ruby-sdk/core/transmitter/transmitter.rb', line 51 def self.set_config_source(configPath) set_config_result = TransmitterWrapper.SetConfigSource(configPath) if set_config_result < 0 = get_native_error raise Exception.new "Javonet set config source result: " + set_config_result.to_s + ". Native error message: " + else return set_config_result end end |