giovynet.serial
Class Parameters

java.lang.Object
  extended by giovynet.serial.Parameters

public class Parameters
extends java.lang.Object

Class that sets parameters for the null modem serial communication.


Constructor Summary
Parameters()
          Constructor.
 
Method Summary
 java.lang.String getBaudRate()
          Get baude rate.
 java.lang.String getByteSize()
          Get byte size.
 int getMinDelayRead()
          Gets the minimum length of time elapsed before reading a character.
 int getMinDelayWrite()
          Gets the minimum length of time elapsed before writing a character.
 java.lang.String getParity()
          get parity
 java.lang.String getPort()
          Get serial port.
 int getReadInterval()
          ONLY TO WINDOWS.
 int getReadTotalConstant()
          ONLY TO WINDOWS.
 int getReadTotalMultiplier()
          ONLY TO WINDOWS.
 java.lang.String getStopBits()
          Get stop bits.
 int getWriteTotalConstant()
          ONLY TO WINDOWS.
 int getWriteTotalMultiplier()
          ONLY TO WINDOWS.
 void setBaudRate(Baud baud)
          Set baude Rate.
 void setByteSize(java.lang.String byteSize)
          Set byte size.
 void setMinDelayRead(int minDelayRead)
          Sets the minimum length of time elapsed before reading a character.
 void setMinDelayWrite(int minDelayWrite)
          Sets the minimum length of time elapsed before writing a character.
 void setParity(java.lang.String parity)
          Set parity.
 void setPort(java.lang.String port)
          Set port name.
 void setReadInterval(int readInterval)
          ONLY TO WINDOWS.
 void setReadTotalConstant(int readTotalConstant)
          ONLY TO WINDOWS.
 void setReadTotalMultiplier(int readTotalMultiplier)
          ONLY TO WINDOWS.
 void setStopBits(java.lang.String stopBits)
          Set stop bits.
 void setWriteTotalConstant(int writeTotalConstant)
          ONLY TO WINDOWS.
 void setWriteTotalMultiplier(int writeTotalMultiplier)
          ONLY TO WINDOWS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parameters

public Parameters()
           throws java.lang.Exception
Constructor.

Throws:
java.lang.Exception
Method Detail

getPort

public java.lang.String getPort()
Get serial port.

Returns:
the port

setPort

public void setPort(java.lang.String port)
Set port name.
VALUE DEFAULT COM1.

Parameters:
port - the port to set

getBaudRate

public java.lang.String getBaudRate()
Get baude rate.

Returns:
the baudRate

setBaudRate

public void setBaudRate(Baud baud)
Set baude Rate.
VALUE DEFAULT 9600.
Options: 110,300,600,1200,2400,4800,9600,19200,38400,57600,115200,460800.

Parameters:
baudRate -

getByteSize

public java.lang.String getByteSize()
Get byte size.

Returns:
the byteSize

setByteSize

public void setByteSize(java.lang.String byteSize)
Set byte size.
VALUE DEFAULT 8.
Options:
7 : 7 bits.
8 : 8 bits.

Parameters:
byteSize - the byteSize to set

getStopBits

public java.lang.String getStopBits()
Get stop bits.

Returns:
the stopBits

setStopBits

public void setStopBits(java.lang.String stopBits)
Set stop bits.
VALUE DEFAULT 1 StopBits;
Options:
0 : 1 Stop Bits.
2 : 2 Stop Bits.

Parameters:
stopBits - the stopBits to set.

getParity

public java.lang.String getParity()
get parity

Returns:
the parity

setParity

public void setParity(java.lang.String parity)
Set parity.
VALUE DEFAULT N.
Options:
E : Even parity.
N : No parity.
O : Odd parity
S : Space parity.

Parameters:
parity - the parity to set

getReadInterval

public int getReadInterval()
ONLY TO WINDOWS. Get Read Interval Timeout in milliseconds.

Returns:
the readInterval

setReadInterval

public void setReadInterval(int readInterval)
ONLY TO WINDOWS. Set Read Interval Timeout
The maximum time allowed to elapse between the arrival of two bytes
on the communications line, in milliseconds.
VALUE DEFAULT 50.

Parameters:
readInterval - the readInterval to set

getReadTotalConstant

public int getReadTotalConstant()
ONLY TO WINDOWS. Get Read Total Constant Timeout.

Returns:
the readTotalConstant

setReadTotalConstant

public void setReadTotalConstant(int readTotalConstant)
ONLY TO WINDOWS. Set Read Total Constant Timeout.
A constant used to calculate the total time-out period for read
operations, in milliseconds. For each read operation, this value is added
to the product of the ReadTotalMultiplierTimeout member and the requested
number of bytes.
A value of zero for both the ReadTotalMultiplierTimeout and
ReadTotalConstantTimeout members indicates that total time-outs are not
used for read operations.
VALUE DEFAULT 50.

Parameters:
readTotalConstant - the readTotalConstant to set

getReadTotalMultiplier

public int getReadTotalMultiplier()
ONLY TO WINDOWS. Get Read Total Multipliler Timeout in milliseconds.

Returns:
the readTotalMultiplier

setReadTotalMultiplier

public void setReadTotalMultiplier(int readTotalMultiplier)
ONLY TO WINDOWS. Set Write Total Multiplier Timeout.
The multiplier used to calculate the total time-out period for write
operations, in milliseconds. For each write operation, this value is
multiplied by the number of bytes to be written.
VALUE DEFAULT 10.

Parameters:
readTotalMultiplier - the readTotalMultiplier to set

getWriteTotalConstant

public int getWriteTotalConstant()
ONLY TO WINDOWS. Get the Write Total Constant Time in milliseconds.

Returns:
the writeTotalConstant

setWriteTotalConstant

public void setWriteTotalConstant(int writeTotalConstant)
ONLY TO WINDOWS. Set Write Total Constant Timeout.
A constant used to calculate the total time-out period for write
operations, in milliseconds. For each write operation, this value is
added to the product of the WriteTotalMultiplierTimeout member and the
number of bytes to be written.
A value of zero for both the WriteTotalTimeoutMultiplier and
WriteTotalConstantTimeout members indicates that total time-outs are not
used for write operations.
VALUE DEFAULT 50.

Parameters:
writeTotalConstant - the writeTotalConstant to set

getWriteTotalMultiplier

public int getWriteTotalMultiplier()
ONLY TO WINDOWS. Get Write Total Multiplier Timeout in milliseconds.

Returns:
the writeTotalMultiplier

setWriteTotalMultiplier

public void setWriteTotalMultiplier(int writeTotalMultiplier)
ONLY TO WINDOWS. Set Write Total Multiplier Timeout.
The multiplier used to calculate the total time-out period for write
operations, in milliseconds. For each write operation, this value is
multiplied by the number of bytes to be written.
VALUE DEFAULT 10.

Parameters:
writeTotalMultiplier - the writeTotalMultiplier to set

getMinDelayRead

public int getMinDelayRead()
Gets the minimum length of time elapsed before reading a character.

Returns:
time in milliseconds.

setMinDelayRead

public void setMinDelayRead(int minDelayRead)
Sets the minimum length of time elapsed before reading a character. On Linux the default is 10 milliseconds. On Windows the default is 0 (zero).

Parameters:
minDelayRead -

getMinDelayWrite

public int getMinDelayWrite()
Gets the minimum length of time elapsed before writing a character.

Returns:
time in milliseconds.

setMinDelayWrite

public void setMinDelayWrite(int minDelayWrite)
Sets the minimum length of time elapsed before writing a character. On Linux the default is 10 milliseconds. On Windows the default is 0 (zero).

Parameters:
minDelayWrite -