Class: Phidgets::IR::IR_code_info
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Phidgets::IR::IR_code_info
- Defined in:
- lib/phidgets-ffi/ir.rb
Overview
This represents the encoding parameters needed to transmit a code.
Examples:
puts ir.code_info[:bit_count]
puts ir.code_info[:encoding]
puts ir.code_info[:length]
puts ir.code_info[:gap]
puts ir.code_info[:trail]
puts ir.code_info[:header]
puts ir.code_info[:one]
puts ir.code_info[:zero]
puts ir.code_info[:repeat]
puts ir.code_info[:min_repeat]
puts ir.code_info[:toggle_mask]
puts ir.code_info[:carrier_frequency]
puts ir.code_info[:duty_cycle]
Instance Attribute Summary collapse
-
#bit_count ⇒ Integer
Number of bits in the code.
-
#carrier_frequency ⇒ Integer
Carrier frequency in Hz - defaults to 38kHz.
-
#duty_cycle ⇒ Integer
Duty cycle in precent(10-50%) - defaults to 33.
-
#encoding ⇒ Phidgets::FFI::IREncoding
Encoding used to encode the data.
-
#gap ⇒ Integer
Gap time in us.
-
#header ⇒ FFI::Struct::InlineArray[2<Integer>]
Header pulse and space - can be 0 for none.
-
#length ⇒ Phidgets::FFI::IRLength
Constant or variable length encoding.
-
#min_repeat ⇒ Integer
Minimum number of times to repeat a code on transmit.
-
#one ⇒ FFI::Struct::InlineArray[2<Integer>]
Pulse and space times to represent a ‘1’ bit, in us.
-
#repeat ⇒ FFI::Struct::InlineArray[26<Integer>]
A series or pulse and space times to represent the repeat code.
-
#toggle_mask ⇒ FFI::StructLayout::CharArray[16<Integer>]
Bit toggles, which are applied to the code after each transmit.
-
#trail ⇒ Integer
Trail time in us - can be 0 for none.
-
#zero ⇒ FFI::Struct::InlineArray[2<Integer>]
Pulse and space times to represent a ‘0’ bit, in us.
Instance Attribute Details
#bit_count ⇒ Integer
Number of bits in the code
30 31 32 |
# File 'lib/phidgets-ffi/ir.rb', line 30 def bit_count @bit_count end |
#carrier_frequency ⇒ Integer
Carrier frequency in Hz - defaults to 38kHz
74 75 76 |
# File 'lib/phidgets-ffi/ir.rb', line 74 def carrier_frequency @carrier_frequency end |
#duty_cycle ⇒ Integer
Duty cycle in precent(10-50%) - defaults to 33
78 79 80 |
# File 'lib/phidgets-ffi/ir.rb', line 78 def duty_cycle @duty_cycle end |
#encoding ⇒ Phidgets::FFI::IREncoding
Encoding used to encode the data
34 35 36 |
# File 'lib/phidgets-ffi/ir.rb', line 34 def encoding @encoding end |
#gap ⇒ Integer
Gap time in us
42 43 44 |
# File 'lib/phidgets-ffi/ir.rb', line 42 def gap @gap end |
#header ⇒ FFI::Struct::InlineArray[2<Integer>]
Header pulse and space - can be 0 for none
50 51 52 |
# File 'lib/phidgets-ffi/ir.rb', line 50 def header @header end |
#length ⇒ Phidgets::FFI::IRLength
Constant or variable length encoding
38 39 40 |
# File 'lib/phidgets-ffi/ir.rb', line 38 def length @length end |
#min_repeat ⇒ Integer
Minimum number of times to repeat a code on transmit
66 67 68 |
# File 'lib/phidgets-ffi/ir.rb', line 66 def min_repeat @min_repeat end |
#one ⇒ FFI::Struct::InlineArray[2<Integer>]
Pulse and space times to represent a ‘1’ bit, in us
54 55 56 |
# File 'lib/phidgets-ffi/ir.rb', line 54 def one @one end |
#repeat ⇒ FFI::Struct::InlineArray[26<Integer>]
A series or pulse and space times to represent the repeat code. Start and end with pulses and null terminate - can be 0 for none
62 63 64 |
# File 'lib/phidgets-ffi/ir.rb', line 62 def repeat @repeat end |
#toggle_mask ⇒ FFI::StructLayout::CharArray[16<Integer>]
Bit toggles, which are applied to the code after each transmit
70 71 72 |
# File 'lib/phidgets-ffi/ir.rb', line 70 def toggle_mask @toggle_mask end |
#trail ⇒ Integer
Trail time in us - can be 0 for none
46 47 48 |
# File 'lib/phidgets-ffi/ir.rb', line 46 def trail @trail end |
#zero ⇒ FFI::Struct::InlineArray[2<Integer>]
Pulse and space times to represent a ‘0’ bit, in us
58 59 60 |
# File 'lib/phidgets-ffi/ir.rb', line 58 def zero @zero end |