ikayaki.squid
Class SerialParameters

java.lang.Object
  extended by ikayaki.squid.SerialParameters

public class SerialParameters
extends Object

Contains all the serial communication parameters which SerialIO uses when opening the port.

Author:
Aki Sysmäläinen

Field Summary
private  int baudRate
          The baud rate.
private  int databits
          The number of data bits.
private  int flowControlIn
          Type of flow control for receiving.
private  int flowControlOut
          Type of flow control for sending.
private  int parity
          The type of parity.
private  String portName
          The name of the serial port.
private  int stopbits
          The number of stop bits.
 
Constructor Summary
SerialParameters(String portName)
          Creates a SerialParameter object with default Serial settings for serial port communication.
SerialParameters(String portName, int baudRate, int flowControlIn, int flowControlOut, int databits, int stopbits, int parity)
          Creates a SerialParameter object containing settings for serial port communication.
 
Method Summary
 int getBaudRate()
           
 int getDatabits()
           
 int getFlowControlIn()
           
 int getFlowControlOut()
           
 int getParity()
           
 String getPortName()
           
 int getStopbits()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

portName

private String portName
The name of the serial port.


baudRate

private int baudRate
The baud rate.


flowControlIn

private int flowControlIn
Type of flow control for receiving.


flowControlOut

private int flowControlOut
Type of flow control for sending.


databits

private int databits
The number of data bits.


stopbits

private int stopbits
The number of stop bits.


parity

private int parity
The type of parity.

Constructor Detail

SerialParameters

public SerialParameters(String portName,
                        int baudRate,
                        int flowControlIn,
                        int flowControlOut,
                        int databits,
                        int stopbits,
                        int parity)
Creates a SerialParameter object containing settings for serial port communication.

Parameters:
portName - The name of the serial port.
baudRate - The baud rate.
flowControlIn - Type of flow control for receiving.
flowControlOut - Type of flow control for sending.
databits - The number of data bits.
stopbits - The number of stop bits.
parity - The type of parity.

SerialParameters

public SerialParameters(String portName)
Creates a SerialParameter object with default Serial settings for serial port communication. Default settings are: Baudrate: 1200 Flowcontrol in: None Flowcontrol out: None Databits: 8 Stopbits: 1 Parity: None

Parameters:
portName - The name of the serial port.
Method Detail

getPortName

public String getPortName()

getBaudRate

public int getBaudRate()

getFlowControlIn

public int getFlowControlIn()

getFlowControlOut

public int getFlowControlOut()

getDatabits

public int getDatabits()

getStopbits

public int getStopbits()

getParity

public int getParity()