2009-01-09 1.2.0

org.eclipse.soda.dk.comm
Class NSParallelPort

java.lang.Object
  extended by javax.comm.CommPort
      extended by javax.comm.ParallelPort
          extended by org.eclipse.soda.dk.comm.NSParallelPort

public class NSParallelPort
extends ParallelPort

Since:
1.0
Version:
1.2.0

Field Summary
(package private)  int fd
          Define the fd (int) field.
(package private)  java.io.FileDescriptor FD
          Define the fd (FileDescriptor) field.
(package private)  int insBufferCount
          Define the ins buffer count (int) field.
(package private)  int insBufferSize
          Disable read buffering for now
static int LPT_MODE_ANY
          Define the lpt mode any (int) constant.
static int LPT_MODE_ECP
          Define the lpt mode ecp (int) constant.
static int LPT_MODE_EPP
          Define the lpt mode epp (int) constant.
static int LPT_MODE_NIBBLE
          Define the lpt mode nibble (int) constant.
static int LPT_MODE_PS2
          Define the lpt mode ps2 (int) constant.
static int LPT_MODE_SPP
          Define the lpt mode spp (int) constant.
(package private)  boolean notifyOnBufferFlag
          Define the notify on buffer flag (boolean) field.
(package private)  int outsBufferCount
          Define the outs buffer count (int) field.
(package private)  int outsBufferSize
          Disable write buffering for default
(package private)  boolean outsSuspended
          Define the outs suspended (boolean) field.
(package private)  boolean rcvFraming
          Define the rcv framing (boolean) field.
(package private)  int rcvFramingByte
          Define the rcv framing byte (int) field.
(package private)  boolean rcvFramingByteReceived
          Define the rcv framing byte received (boolean) field.
(package private)  int rcvThreshold
          Define the rcv threshold (int) field.
(package private)  int rcvTimeout
          Define the rcv timeout (int) field.
 
Fields inherited from class javax.comm.CommPort
name
 
Constructor Summary
NSParallelPort(java.lang.String portName, NSCommDriver driver)
          Constructs an instance of this class from the specified port name and driver parameters.
 
Method Summary
 void addEventListener(ParallelPortEventListener lst)
          Add event listener with the specified lst parameter.
 void close()
          Close.
 void disableReceiveFraming()
          Disable receive framing.
 void disableReceiveThreshold()
          Disable receive threshold.
 void disableReceiveTimeout()
          Disable receive timeout.
 void enableReceiveFraming(int rcvFramingByte)
          Enable receive framing with the specified rcv framing byte parameter.
 void enableReceiveThreshold(int thresh)
          Enable receive threshold with the specified thresh parameter.
 void enableReceiveTimeout(int rt)
          Enable receive timeout with the specified rt parameter.
protected  void finalize()
          Finalize.
 int getInputBufferSize()
          Gets the input buffer size (int) value.
 java.io.InputStream getInputStream()
          Gets the input stream value.
 int getMode()
          Gets the mode (int) value.
 int getOutputBufferFree()
          Gets the output buffer free (int) value.
 int getOutputBufferSize()
          Gets the output buffer size (int) value.
 java.io.OutputStream getOutputStream()
          Gets the output stream value.
 int getReceiveFramingByte()
          Gets the receive framing byte (int) value.
 int getReceiveThreshold()
          Gets the receive threshold (int) value.
 int getReceiveTimeout()
          Gets the receive timeout (int) value.
 boolean isPaperOut()
          Gets the paper out (boolean) value.
 boolean isPrinterBusy()
          Gets the printer busy (boolean) value.
 boolean isPrinterError()
          Gets the printer error (boolean) value.
 boolean isPrinterSelected()
          Gets the printer selected (boolean) value.
 boolean isPrinterTimedOut()
          Gets the printer timed out (boolean) value.
 boolean isReceiveFramingEnabled()
          Gets the receive framing enabled (boolean) value.
 boolean isReceiveThresholdEnabled()
          Gets the receive threshold enabled (boolean) value.
 boolean isReceiveTimeoutEnabled()
          Gets the receive timeout enabled (boolean) value.
 void notifyOnBuffer(boolean notify)
          Notify on buffer with the specified notify parameter.
 void notifyOnError(boolean notify)
          Notify on error with the specified notify parameter.
 void removeEventListener()
          Remove event listener.
(package private)  void reportParallelEvent(int eventType, boolean oldvalue, boolean newvalue)
          Report parallel event with the specified event type, oldvalue and newvalue parameters.
 void restart()
          Restart.
 void setInputBufferSize(int size)
          Sets the input buffer size value.
 int setMode(int md)
          Sets the mode value.
 void setOutputBufferSize(int size)
          Sets the output buffer size value.
 void suspend()
          Suspend.
 
Methods inherited from class javax.comm.CommPort
getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LPT_MODE_ANY

public static final int LPT_MODE_ANY
Define the lpt mode any (int) constant.

See Also:
Constant Field Values

LPT_MODE_SPP

public static final int LPT_MODE_SPP
Define the lpt mode spp (int) constant.

See Also:
Constant Field Values

LPT_MODE_PS2

public static final int LPT_MODE_PS2
Define the lpt mode ps2 (int) constant.

See Also:
Constant Field Values

LPT_MODE_EPP

public static final int LPT_MODE_EPP
Define the lpt mode epp (int) constant.

See Also:
Constant Field Values

LPT_MODE_ECP

public static final int LPT_MODE_ECP
Define the lpt mode ecp (int) constant.

See Also:
Constant Field Values

LPT_MODE_NIBBLE

public static final int LPT_MODE_NIBBLE
Define the lpt mode nibble (int) constant.

See Also:
Constant Field Values

fd

int fd
Define the fd (int) field.


FD

java.io.FileDescriptor FD
Define the fd (FileDescriptor) field.


rcvThreshold

int rcvThreshold
Define the rcv threshold (int) field.


rcvTimeout

int rcvTimeout
Define the rcv timeout (int) field.


rcvFraming

boolean rcvFraming
Define the rcv framing (boolean) field.


rcvFramingByte

int rcvFramingByte
Define the rcv framing byte (int) field.


rcvFramingByteReceived

boolean rcvFramingByteReceived
Define the rcv framing byte received (boolean) field.


insBufferSize

int insBufferSize
Disable read buffering for now


insBufferCount

int insBufferCount
Define the ins buffer count (int) field.


outsSuspended

boolean outsSuspended
Define the outs suspended (boolean) field.


outsBufferSize

int outsBufferSize
Disable write buffering for default


outsBufferCount

int outsBufferCount
Define the outs buffer count (int) field.


notifyOnBufferFlag

boolean notifyOnBufferFlag
Define the notify on buffer flag (boolean) field.

Constructor Detail

NSParallelPort

NSParallelPort(java.lang.String portName,
               NSCommDriver driver)
         throws java.io.IOException
Constructs an instance of this class from the specified port name and driver parameters.

Parameters:
portName - The port name (String) parameter.
driver - The driver (NSCommDriver) parameter.
Throws:
java.io.IOException - IOException.
Method Detail

addEventListener

public void addEventListener(ParallelPortEventListener lst)
                      throws java.util.TooManyListenersException
Add event listener with the specified lst parameter.

Specified by:
addEventListener in class ParallelPort
Parameters:
lst - The lst (ParallelPortEventListener) parameter.
Throws:
java.util.TooManyListenersException - Too Many Listeners Exception.
See Also:
removeEventListener()

close

public void close()
Close.

Overrides:
close in class CommPort

disableReceiveFraming

public void disableReceiveFraming()
Disable receive framing.

Specified by:
disableReceiveFraming in class CommPort
See Also:
enableReceiveFraming(int)

disableReceiveThreshold

public void disableReceiveThreshold()
Disable receive threshold.

Specified by:
disableReceiveThreshold in class CommPort
See Also:
enableReceiveThreshold(int), getReceiveThreshold()

disableReceiveTimeout

public void disableReceiveTimeout()
Disable receive timeout.

Specified by:
disableReceiveTimeout in class CommPort
See Also:
enableReceiveTimeout(int), getReceiveTimeout()

enableReceiveFraming

public void enableReceiveFraming(int rcvFramingByte)
                          throws UnsupportedCommOperationException
Enable receive framing with the specified rcv framing byte parameter.

Specified by:
enableReceiveFraming in class CommPort
Parameters:
rcvFramingByte - The rcv framing byte (int) parameter.
Throws:
UnsupportedCommOperationException - Unsupported Comm Operation Exception.
See Also:
disableReceiveFraming()

enableReceiveThreshold

public void enableReceiveThreshold(int thresh)
                            throws UnsupportedCommOperationException
Enable receive threshold with the specified thresh parameter.

Specified by:
enableReceiveThreshold in class CommPort
Parameters:
thresh - The thresh (int) parameter.
Throws:
UnsupportedCommOperationException - Unsupported Comm Operation Exception.
See Also:
disableReceiveThreshold(), getReceiveThreshold()

enableReceiveTimeout

public void enableReceiveTimeout(int rt)
                          throws UnsupportedCommOperationException
Enable receive timeout with the specified rt parameter.

Specified by:
enableReceiveTimeout in class CommPort
Parameters:
rt - The rt (int) parameter.
Throws:
UnsupportedCommOperationException - Unsupported Comm Operation Exception.
See Also:
disableReceiveTimeout(), getReceiveTimeout()

finalize

protected void finalize()
                 throws java.io.IOException
Finalize.

Overrides:
finalize in class java.lang.Object
Throws:
java.io.IOException - IOException.

getInputBufferSize

public int getInputBufferSize()
Gets the input buffer size (int) value.

Specified by:
getInputBufferSize in class CommPort
Returns:
The input buffer size (int) value.
See Also:
setInputBufferSize(int)

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Gets the input stream value.

Specified by:
getInputStream in class CommPort
Returns:
The input stream (InputStream) value.
Throws:
java.io.IOException - IOException.

getMode

public int getMode()
Gets the mode (int) value.

Specified by:
getMode in class ParallelPort
Returns:
The mode (int) value.
See Also:
setMode(int)

getOutputBufferFree

public int getOutputBufferFree()
Gets the output buffer free (int) value.

Specified by:
getOutputBufferFree in class ParallelPort
Returns:
The output buffer free (int) value.

getOutputBufferSize

public int getOutputBufferSize()
Gets the output buffer size (int) value.

Specified by:
getOutputBufferSize in class CommPort
Returns:
The output buffer size (int) value.
See Also:
setOutputBufferSize(int)

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Gets the output stream value.

Specified by:
getOutputStream in class CommPort
Returns:
The output stream (OutputStream) value.
Throws:
java.io.IOException - IOException.

getReceiveFramingByte

public int getReceiveFramingByte()
Gets the receive framing byte (int) value.

Specified by:
getReceiveFramingByte in class CommPort
Returns:
The receive framing byte (int) value.

getReceiveThreshold

public int getReceiveThreshold()
Gets the receive threshold (int) value.

Specified by:
getReceiveThreshold in class CommPort
Returns:
The receive threshold (int) value.
See Also:
disableReceiveThreshold(), enableReceiveThreshold(int)

getReceiveTimeout

public int getReceiveTimeout()
Gets the receive timeout (int) value.

Specified by:
getReceiveTimeout in class CommPort
Returns:
The receive timeout (int) value.
See Also:
disableReceiveTimeout(), enableReceiveTimeout(int)

isPaperOut

public boolean isPaperOut()
Gets the paper out (boolean) value.

Specified by:
isPaperOut in class ParallelPort
Returns:
The paper out (boolean) value.

isPrinterBusy

public boolean isPrinterBusy()
Gets the printer busy (boolean) value.

Specified by:
isPrinterBusy in class ParallelPort
Returns:
The printer busy (boolean) value.

isPrinterError

public boolean isPrinterError()
Gets the printer error (boolean) value.

Specified by:
isPrinterError in class ParallelPort
Returns:
The printer error (boolean) value.

isPrinterSelected

public boolean isPrinterSelected()
Gets the printer selected (boolean) value.

Specified by:
isPrinterSelected in class ParallelPort
Returns:
The printer selected (boolean) value.

isPrinterTimedOut

public boolean isPrinterTimedOut()
Gets the printer timed out (boolean) value.

Specified by:
isPrinterTimedOut in class ParallelPort
Returns:
The printer timed out (boolean) value.

isReceiveFramingEnabled

public boolean isReceiveFramingEnabled()
Gets the receive framing enabled (boolean) value.

Specified by:
isReceiveFramingEnabled in class CommPort
Returns:
The receive framing enabled (boolean) value.

isReceiveThresholdEnabled

public boolean isReceiveThresholdEnabled()
Gets the receive threshold enabled (boolean) value.

Specified by:
isReceiveThresholdEnabled in class CommPort
Returns:
The receive threshold enabled (boolean) value.

isReceiveTimeoutEnabled

public boolean isReceiveTimeoutEnabled()
Gets the receive timeout enabled (boolean) value.

Specified by:
isReceiveTimeoutEnabled in class CommPort
Returns:
The receive timeout enabled (boolean) value.

notifyOnBuffer

public void notifyOnBuffer(boolean notify)
Notify on buffer with the specified notify parameter.

Specified by:
notifyOnBuffer in class ParallelPort
Parameters:
notify - The notify (boolean) parameter.

notifyOnError

public void notifyOnError(boolean notify)
Notify on error with the specified notify parameter.

Specified by:
notifyOnError in class ParallelPort
Parameters:
notify - The notify (boolean) parameter.

removeEventListener

public void removeEventListener()
Remove event listener.

Specified by:
removeEventListener in class ParallelPort
See Also:
addEventListener(ParallelPortEventListener)

reportParallelEvent

void reportParallelEvent(int eventType,
                         boolean oldvalue,
                         boolean newvalue)
Report parallel event with the specified event type, oldvalue and newvalue parameters.

Parameters:
eventType - The event type (int) parameter.
oldvalue - The oldvalue (boolean) parameter.
newvalue - The newvalue (boolean) parameter.

restart

public void restart()
Restart.

Specified by:
restart in class ParallelPort

setInputBufferSize

public void setInputBufferSize(int size)
Sets the input buffer size value.

Specified by:
setInputBufferSize in class CommPort
Parameters:
size - The size (int) parameter.
See Also:
getInputBufferSize()

setMode

public int setMode(int md)
            throws UnsupportedCommOperationException
Sets the mode value.

Specified by:
setMode in class ParallelPort
Parameters:
md - The md (int) parameter.
Returns:
The mode (int) value.
Throws:
UnsupportedCommOperationException - Unsupported Comm Operation Exception.
See Also:
getMode()

setOutputBufferSize

public void setOutputBufferSize(int size)
Sets the output buffer size value.

Specified by:
setOutputBufferSize in class CommPort
Parameters:
size - The size (int) parameter.
See Also:
getOutputBufferSize()

suspend

public void suspend()
Suspend.

Specified by:
suspend in class ParallelPort

2009-01-09 1.2.0

Copyright (c) 2009 IBM. See license in Legal section.