Class: XBee::Config::XBeeUARTConfig
- Inherits:
-
Object
- Object
- XBee::Config::XBeeUARTConfig
- Defined in:
- lib/module_config.rb
Overview
A class for encapsulating UART communication parameters
Instance Attribute Summary collapse
-
#baud ⇒ Object
Returns the value of attribute baud.
-
#data_bits ⇒ Object
Returns the value of attribute data_bits.
-
#parity ⇒ Object
Returns the value of attribute parity.
-
#stop_bits ⇒ Object
Returns the value of attribute stop_bits.
Instance Method Summary collapse
-
#initialize(baud = 9600, data_bits = 8, parity = 0, stop_bits = 1) ⇒ XBeeUARTConfig
constructor
Defaults to standard 9600 baud 8N1 communications.
Constructor Details
#initialize(baud = 9600, data_bits = 8, parity = 0, stop_bits = 1) ⇒ XBeeUARTConfig
Defaults to standard 9600 baud 8N1 communications
11 12 13 14 15 16 |
# File 'lib/module_config.rb', line 11 def initialize(baud = 9600, data_bits = 8, parity = 0, stop_bits = 1) self.baud = Integer(baud) self.data_bits = Integer(data_bits) self.parity = Integer(parity) self.stop_bits = Integer(stop_bits) end |
Instance Attribute Details
#baud ⇒ Object
Returns the value of attribute baud.
7 8 9 |
# File 'lib/module_config.rb', line 7 def baud @baud end |
#data_bits ⇒ Object
Returns the value of attribute data_bits.
7 8 9 |
# File 'lib/module_config.rb', line 7 def data_bits @data_bits end |
#parity ⇒ Object
Returns the value of attribute parity.
7 8 9 |
# File 'lib/module_config.rb', line 7 def parity @parity end |
#stop_bits ⇒ Object
Returns the value of attribute stop_bits.
7 8 9 |
# File 'lib/module_config.rb', line 7 def stop_bits @stop_bits end |