class Calypso::SerialPortData

Serial port information wrapper.

Attributes

baud[R]

@return [Fixnum] Serial baud rate.

databits[R]

@return [Fixnum] Number of data bits per byte.

parity[R]

@return [Symbol] Connection parity.

port[R]

@return [String] Path to the serial device.

stopbits[R]

@return [Fixnum] Number of stop bits.

Public Class Methods

new(port, baud = 9600, databits = 8, stopbits = 1, parity = SerialPort::NONE) click to toggle source

Create a new serial port controller.

@param port [String] Path to the serial device. @param baud [Fixnum] Serial baud rate. @param databits [Fixnum] Number of data bits per byte. @param stopbits [Fixnum] Number of stop bits. @param parity [Symbol] Connection parity.

# File lib/calypso/serialportdata.rb, line 41
def initialize(port, baud = 9600, databits = 8, stopbits = 1, parity = SerialPort::NONE)
  @port = port
  @baud = baud
  @databits = databits
  @stopbits = stopbits
  @parity = parity
end