Class portio.TemplatePortDriver
All Packages Class Hierarchy This Package Previous Next Index
Class portio.TemplatePortDriver
java.lang.Object
|
+----portio.PortDriver
|
+----portio.TemplatePortDriver
- public class TemplatePortDriver
- extends PortDriver
- implements Runnable
This is a template serial/parallel driver.
This class must be instantiated before any
Port objects can be created.
Note that Runnable only needs to be implemented if a thread
must be created to handle incoming data from the device.
- Version:
- $Revision: 2.1 $ ($Date: 1997/02/19 18:00:00 $)
-
TemplatePortDriver()
- This creates a new instance of a PortDriver with default options (no messages).
-
TemplatePortDriver(int)
- This creates a new instance of a PortDriver with specified options.
-
run()
- The receive thread; manages incoming data from the device.
TemplatePortDriver
public TemplatePortDriver(int options) throws PortIOException
- This creates a new instance of a PortDriver with specified options.
For a driver that supports native (built-in) ports for the machine
Java(TM) is running on, nothing more than options need to be passed.
If the driver supports external ports, there may need to be some sort
of identifier passed as well. Since EtherLite devices are identified
by their TCP/IP host name, the EtherLiteDriver must be passed that
host name at startup.
- Parameters:
- options - lowest three bits set messageLevel defined in PortDriver
- Throws: PortIOException
- if communication with device not possible
TemplatePortDriver
public TemplatePortDriver() throws PortIOException
- This creates a new instance of a PortDriver with default options (no messages).
- Throws: PortIOException
- if communication with device not possible
run
public void run()
- The receive thread; manages incoming data from the device. This data may
come as a stream which this thread can wait() on, or this thread may need to
poll to receive the data.
All Packages Class Hierarchy This Package Previous Next Index