com.eurotech.framework.comm
Class CommURI

java.lang.Object
  extended by com.eurotech.framework.comm.CommURI

public class CommURI
extends Object

Represents a Uniform Resource Identifier (URI) for a Comm/Serial Port.


Nested Class Summary
static class CommURI.Builder
          Builder class used as a helper in building the components of a CommURI
 
Field Summary
static int DATABITS_5
           
static int DATABITS_6
           
static int DATABITS_7
           
static int DATABITS_8
           
static int FLOWCONTROL_NONE
           
static int FLOWCONTROL_RTSCTS_IN
           
static int FLOWCONTROL_RTSCTS_OUT
           
static int FLOWCONTROL_XONXOFF_IN
           
static int FLOWCONTROL_XONXOFF_OUT
           
static int PARITY_EVEN
           
static int PARITY_MARK
           
static int PARITY_NONE
           
static int PARITY_ODD
           
static int PARITY_SPACE
           
static int STOPBITS_1
           
static int STOPBITS_1_5
           
static int STOPBITS_2
           
 
Method Summary
 int getBaudRate()
          The baud rate associated with the port
 int getDataBits()
          The number of data bits associated with the port
 int getParity()
          The parity associated with the port
 String getPort()
          The COM port or device node associated with this port
 int getStopBits()
          The number of stop bits associated with the port
 int getTimeout()
          The timeout associated with the port
static CommURI parseString(String uri)
          Converts a String of the CommURI form to a CommURI Object
 String toString()
          The String representing the CommURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DATABITS_5

public static final int DATABITS_5
See Also:
Constant Field Values

DATABITS_6

public static final int DATABITS_6
See Also:
Constant Field Values

DATABITS_7

public static final int DATABITS_7
See Also:
Constant Field Values

DATABITS_8

public static final int DATABITS_8
See Also:
Constant Field Values

PARITY_EVEN

public static final int PARITY_EVEN
See Also:
Constant Field Values

PARITY_MARK

public static final int PARITY_MARK
See Also:
Constant Field Values

PARITY_NONE

public static final int PARITY_NONE
See Also:
Constant Field Values

PARITY_ODD

public static final int PARITY_ODD
See Also:
Constant Field Values

PARITY_SPACE

public static final int PARITY_SPACE
See Also:
Constant Field Values

STOPBITS_1

public static final int STOPBITS_1
See Also:
Constant Field Values

STOPBITS_1_5

public static final int STOPBITS_1_5
See Also:
Constant Field Values

STOPBITS_2

public static final int STOPBITS_2
See Also:
Constant Field Values

FLOWCONTROL_NONE

public static final int FLOWCONTROL_NONE
See Also:
Constant Field Values

FLOWCONTROL_RTSCTS_IN

public static final int FLOWCONTROL_RTSCTS_IN
See Also:
Constant Field Values

FLOWCONTROL_RTSCTS_OUT

public static final int FLOWCONTROL_RTSCTS_OUT
See Also:
Constant Field Values

FLOWCONTROL_XONXOFF_IN

public static final int FLOWCONTROL_XONXOFF_IN
See Also:
Constant Field Values

FLOWCONTROL_XONXOFF_OUT

public static final int FLOWCONTROL_XONXOFF_OUT
See Also:
Constant Field Values
Method Detail

getPort

public String getPort()
The COM port or device node associated with this port

Returns:
a String representing the port

getBaudRate

public int getBaudRate()
The baud rate associated with the port

Returns:
an int representing the baud rate

getDataBits

public int getDataBits()
The number of data bits associated with the port

Returns:
an int representing the number of data bits

getStopBits

public int getStopBits()
The number of stop bits associated with the port

Returns:
an int representing the number of stop bits

getParity

public int getParity()
The parity associated with the port

Returns:
an int representing the parity

getTimeout

public int getTimeout()
The timeout associated with the port

Returns:
an int representing the timeout in milliseconds

toString

public String toString()
The String representing the CommURI

Overrides:
toString in class Object

parseString

public static CommURI parseString(String uri)
                           throws URISyntaxException
Converts a String of the CommURI form to a CommURI Object

Parameters:
uri - the String representing the CommURI
Returns:
a CommURI Object based on the uri String
Throws:
URISyntaxException


Copyright © 2013. All Rights Reserved.