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(licenceKey) ⇒ Object
- .activate_with_credentials_and_proxy(licenceKey, proxyHost, proxyUserName, proxyPassword) ⇒ Object
- .activate_with_licence_file ⇒ Object
- .get_native_error ⇒ Object
- .send_command(message_byte_array, message_byte_array_len) ⇒ Object
Class Method Details
.activate_with_credentials(licenceKey) ⇒ Object
33 34 35 |
# File 'lib/javonet-ruby-sdk/core/transmitter/transmitter.rb', line 33 def self.activate_with_credentials(licenceKey) return activate(licenceKey) end |
.activate_with_credentials_and_proxy(licenceKey, proxyHost, proxyUserName, proxyPassword) ⇒ Object
37 38 39 |
# File 'lib/javonet-ruby-sdk/core/transmitter/transmitter.rb', line 37 def self.activate_with_credentials_and_proxy(licenceKey, proxyHost, proxyUserName, proxyPassword) return activate(licenceKey, proxyHost, proxyUserName, proxyPassword) end |
.activate_with_licence_file ⇒ Object
29 30 31 |
# File 'lib/javonet-ruby-sdk/core/transmitter/transmitter.rb', line 29 def self.activate_with_licence_file() return activate() end |
.get_native_error ⇒ Object
7 8 9 |
# File 'lib/javonet-ruby-sdk/core/transmitter/transmitter.rb', line 7 def self.get_native_error TransmitterWrapper.GetNativeError end |
.send_command(message_byte_array, message_byte_array_len) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/javonet-ruby-sdk/core/transmitter/transmitter.rb', line 11 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 |