DCT Lightfoot v3 API specification

javax.comm
Class CommPort

java.lang.Object
  |
  +--javax.comm.CommPort
Direct Known Subclasses:
SerialPort

public abstract class CommPort
extends Object

Basic communication port


Field Summary
protected  java.lang.String name
          Name of the port
 
Constructor Summary
CommPort()
           
 
Method Summary
 void close()
          Close the port
 void disableReceiveFraming()
          Disable receive framing Disable the receive framing
 void disableReceiveThreshold()
          Disable the receive threshold
 void disableReceiveTimeout()
          Disable receive timeout
abstract  void enableReceiveFraming(int framingByte)
          Enable receive framing
abstract  void enableReceiveThreshold(int thresh)
          Enable the receive threshold
abstract  void enableReceiveTimeout(int timeout)
          Enable the receive timeout
 int getInputBufferSize()
          Get the input buffer size
abstract  InputStream getInputStream()
          Get the input stream
 java.lang.String getName()
          Get the name of the port
 int getOutputBufferSize()
          Get the output buffer size
abstract  OutputStream getOutputStream()
          Get the output stream
 int getReceiveFramingByte()
          Get the receive framing byte
 int getReceiveThreshold()
          Return the receive threshold
 int getReceiveTimeout()
          Get the receive timeout
 boolean isReceiveFramingEnabled()
          Return true if receive framing is enabled
 boolean isReceiveThresholdEnabled()
          Return true if the receive threshold is enabled
 boolean isReceiveTimeoutEnabled()
          Return true if receive timeout is enabled
abstract  void setInputBufferSize(int size)
          Set the input buffer size
abstract  void setOutputBufferSize(int size)
          Set the output buffer size
 java.lang.String toString()
          Get a string representation
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
Name of the port

Constructor Detail

CommPort

public CommPort()
Method Detail

getName

public java.lang.String getName()
Get the name of the port

Returns:
the name

toString

public java.lang.String toString()
Get a string representation

Overrides:
toString in class Object
Returns:
the string value

getInputStream

public abstract InputStream getInputStream()
                                    throws IOException
Get the input stream

Returns:
the input stream
Throws:
IOException - if there is an error opening the input stream

getOutputStream

public abstract OutputStream getOutputStream()
                                      throws IOException
Get the output stream

Returns:
the output stream
Throws:
IOException - if there is an error opening the output stream

close

public void close()
Close the port


enableReceiveThreshold

public abstract void enableReceiveThreshold(int thresh)
                                     throws UnsupportedCommOperationException
Enable the receive threshold

Throws:
UnsupportedCommOperationException - if the operation is not supported

disableReceiveThreshold

public void disableReceiveThreshold()
Disable the receive threshold


isReceiveThresholdEnabled

public boolean isReceiveThresholdEnabled()
Return true if the receive threshold is enabled

Returns:
true or false

getReceiveThreshold

public int getReceiveThreshold()
Return the receive threshold

Returns:
the current receive threshold value

enableReceiveTimeout

public abstract void enableReceiveTimeout(int timeout)
                                   throws UnsupportedCommOperationException
Enable the receive timeout

Parameters:
timeout - The receive timeout value
Throws:
UnsupportedCommOperationException - if the operation is not supported

disableReceiveTimeout

public void disableReceiveTimeout()
Disable receive timeout


isReceiveTimeoutEnabled

public boolean isReceiveTimeoutEnabled()
Return true if receive timeout is enabled

Returns:
true or false

getReceiveTimeout

public int getReceiveTimeout()
Get the receive timeout

Returns:
the current receive timeout value

enableReceiveFraming

public abstract void enableReceiveFraming(int framingByte)
                                   throws UnsupportedCommOperationException
Enable receive framing

Parameters:
framingByte - The value to use
Throws:
UnsupportedCommOperationException - if the operation is not supported

disableReceiveFraming

public void disableReceiveFraming()
Disable receive framing Disable the receive framing


isReceiveFramingEnabled

public boolean isReceiveFramingEnabled()
Return true if receive framing is enabled

Returns:
true or false

getReceiveFramingByte

public int getReceiveFramingByte()
Get the receive framing byte

Returns:
the framing byte

setInputBufferSize

public abstract void setInputBufferSize(int size)
Set the input buffer size

Parameters:
size - The buffer size

getInputBufferSize

public int getInputBufferSize()
Get the input buffer size

Returns:
the input buffer size

setOutputBufferSize

public abstract void setOutputBufferSize(int size)
Set the output buffer size

Parameters:
size - The buffer size

getOutputBufferSize

public int getOutputBufferSize()
Get the output buffer size

Returns:
the output buffer size

DCT Lightfoot v3 API specification

DCT Lightfoot v3 API specification