1.0.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


Field Summary
(package private)  int fd
           
(package private)  java.io.FileDescriptor FD
           
(package private)  int insBufferCount
           
(package private)  int insBufferSize
          Disable read buffering for now
static int LPT_MODE_ANY
           
static int LPT_MODE_ECP
           
static int LPT_MODE_EPP
           
static int LPT_MODE_NIBBLE
           
static int LPT_MODE_PS2
           
static int LPT_MODE_SPP
           
(package private)  boolean notifyOnBufferFlag
           
(package private)  int outsBufferCount
           
(package private)  int outsBufferSize
          Disable write buffering for default
(package private)  boolean outsSuspended
           
(package private)  boolean rcvFraming
           
(package private)  int rcvFramingByte
           
(package private)  boolean rcvFramingByteReceived
           
(package private)  int rcvThreshold
           
(package private)  int rcvTimeout
           
 
Fields inherited from class javax.comm.CommPort
name
 
Constructor Summary
NSParallelPort(java.lang.String portName, NSCommDriver driver)
           
 
Method Summary
 void addEventListener(ParallelPortEventListener lst)
          Add event listener with the specified lsnr 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 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 rcv timeout parameter.
protected  void 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)
           
 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
See Also:
Constant Field Values

LPT_MODE_SPP

public static final int LPT_MODE_SPP
See Also:
Constant Field Values

LPT_MODE_PS2

public static final int LPT_MODE_PS2
See Also:
Constant Field Values

LPT_MODE_EPP

public static final int LPT_MODE_EPP
See Also:
Constant Field Values

LPT_MODE_ECP

public static final int LPT_MODE_ECP
See Also:
Constant Field Values

LPT_MODE_NIBBLE

public static final int LPT_MODE_NIBBLE
See Also:
Constant Field Values

fd

int fd

FD

java.io.FileDescriptor FD

rcvThreshold

int rcvThreshold

rcvTimeout

int rcvTimeout

rcvFraming

boolean rcvFraming

rcvFramingByte

int rcvFramingByte

rcvFramingByteReceived

boolean rcvFramingByteReceived

insBufferSize

int insBufferSize
Disable read buffering for now


insBufferCount

int insBufferCount

outsSuspended

boolean outsSuspended

outsBufferSize

int outsBufferSize
Disable write buffering for default


outsBufferCount

int outsBufferCount

notifyOnBufferFlag

boolean notifyOnBufferFlag
Constructor Detail

NSParallelPort

NSParallelPort(java.lang.String portName,
               NSCommDriver driver)
         throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Description copied from class: CommPort
Gets the input stream value.

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

getOutputStream

public java.io.OutputStream getOutputStream()
                                     throws java.io.IOException
Description copied from class: CommPort
Gets the output stream value.

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

close

public void close()
Description copied from class: CommPort
Close.

Overrides:
close in class CommPort

finalize

protected void finalize()
                 throws java.io.IOException
Overrides:
finalize in class java.lang.Object
Throws:
java.io.IOException

enableReceiveThreshold

public void enableReceiveThreshold(int thresh)
                            throws UnsupportedCommOperationException
Description copied from class: CommPort
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:
CommPort.disableReceiveThreshold(), CommPort.getReceiveThreshold()

disableReceiveThreshold

public void disableReceiveThreshold()
Description copied from class: CommPort
Disable receive threshold.

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

isReceiveThresholdEnabled

public boolean isReceiveThresholdEnabled()
Description copied from class: CommPort
Gets the receive threshold enabled (boolean) value.

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

getReceiveThreshold

public int getReceiveThreshold()
Description copied from class: CommPort
Gets the receive threshold (int) value.

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

enableReceiveTimeout

public void enableReceiveTimeout(int rt)
                          throws UnsupportedCommOperationException
Description copied from class: CommPort
Enable receive timeout with the specified rcv timeout parameter.

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

disableReceiveTimeout

public void disableReceiveTimeout()
Description copied from class: CommPort
Disable receive timeout.

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

isReceiveTimeoutEnabled

public boolean isReceiveTimeoutEnabled()
Description copied from class: CommPort
Gets the receive timeout enabled (boolean) value.

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

getReceiveTimeout

public int getReceiveTimeout()
Description copied from class: CommPort
Gets the receive timeout (int) value.

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

enableReceiveFraming

public void enableReceiveFraming(int rcvFramingByte)
                          throws UnsupportedCommOperationException
Description copied from class: CommPort
Enable receive framing with the specified framing byte parameter.

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

disableReceiveFraming

public void disableReceiveFraming()
Description copied from class: CommPort
Disable receive framing.

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

isReceiveFramingEnabled

public boolean isReceiveFramingEnabled()
Description copied from class: CommPort
Gets the receive framing enabled (boolean) value.

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

getReceiveFramingByte

public int getReceiveFramingByte()
Description copied from class: CommPort
Gets the receive framing byte (int) value.

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

setInputBufferSize

public void setInputBufferSize(int size)
Description copied from class: CommPort
Sets the input buffer size value.

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

getInputBufferSize

public int getInputBufferSize()
Description copied from class: CommPort
Gets the input buffer size (int) value.

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

setOutputBufferSize

public void setOutputBufferSize(int size)
Description copied from class: CommPort
Sets the output buffer size value.

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

getOutputBufferSize

public int getOutputBufferSize()
Description copied from class: CommPort
Gets the output buffer size (int) value.

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

addEventListener

public void addEventListener(ParallelPortEventListener lst)
                      throws java.util.TooManyListenersException
Description copied from class: ParallelPort
Add event listener with the specified lsnr parameter.

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

removeEventListener

public void removeEventListener()
Description copied from class: ParallelPort
Remove event listener.

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

notifyOnError

public void notifyOnError(boolean notify)
Description copied from class: ParallelPort
Notify on error with the specified notify parameter.

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

notifyOnBuffer

public void notifyOnBuffer(boolean notify)
Description copied from class: ParallelPort
Notify on buffer with the specified notify parameter.

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

getOutputBufferFree

public int getOutputBufferFree()
Description copied from class: ParallelPort
Gets the output buffer free (int) value.

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

isPaperOut

public boolean isPaperOut()
Description copied from class: ParallelPort
Gets the paper out (boolean) value.

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

isPrinterBusy

public boolean isPrinterBusy()
Description copied from class: ParallelPort
Gets the printer busy (boolean) value.

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

isPrinterSelected

public boolean isPrinterSelected()
Description copied from class: ParallelPort
Gets the printer selected (boolean) value.

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

isPrinterTimedOut

public boolean isPrinterTimedOut()
Description copied from class: ParallelPort
Gets the printer timed out (boolean) value.

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

isPrinterError

public boolean isPrinterError()
Description copied from class: ParallelPort
Gets the printer error (boolean) value.

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

restart

public void restart()
Description copied from class: ParallelPort
Restart.

Specified by:
restart in class ParallelPort

suspend

public void suspend()
Description copied from class: ParallelPort
Suspend.

Specified by:
suspend in class ParallelPort

getMode

public int getMode()
Description copied from class: ParallelPort
Gets the mode (int) value.

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

setMode

public int setMode(int md)
            throws UnsupportedCommOperationException
Description copied from class: ParallelPort
Sets the mode value.

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

reportParallelEvent

void reportParallelEvent(int eventType,
                         boolean oldvalue,
                         boolean newvalue)

1.0.0

Copyright (c) 1999, 2007 IBM