gnu.io
Interface CommDriver

All Known Implementing Classes:
RXTXCommDriver

public interface CommDriver

Author:
juangui TODO To change the template for this generated type comment go to Window - Preferences - Java - Code Style - Code Templates

Method Summary
 CommPort getCommPort(java.lang.String portName, int portType)
          getCommPort() will be called by CommPortIdentifier from its open() method.
 void initialize()
          initialize() will be called by the CommPortIdentifier's static initializer.
 

Method Detail

initialize

public void initialize()
initialize() will be called by the CommPortIdentifier's static initializer. The responsibility of this method is: 1) Ensure that that the hardware is present. 2) Load any required native libraries. 3) Register the port names with the CommPortIdentifier.


getCommPort

public CommPort getCommPort(java.lang.String portName,
                            int portType)
getCommPort() will be called by CommPortIdentifier from its open() method. portName is a string that was registered earlier using the CommPortIdentifier.addPortName() method. getCommPort() returns an object that extends either SerialPort or ParallelPort.

Parameters:
portName - - Name of the port
portType - - PORT_SERIAL or PORT_PARALLEL