BakeoutController-Basic  0.1
A Controller for the Omicron vacuum chamber
Public Member Functions | List of all members
kernel.serial_ports.RXTXPortDriver Class Reference
Inheritance diagram for kernel.serial_ports.RXTXPortDriver:
Inheritance graph
[legend]
Collaboration diagram for kernel.serial_ports.RXTXPortDriver:
Collaboration graph
[legend]

Public Member Functions

 RXTXPortDriver (String applicationName, PortIdentifierGetter portWrapper)
 
String getApplicationName ()
 
List< String > getSerialPortNames ()
 
SerialPort getPortByName (String portName)
 

Detailed Description

Driver responsible for managing serial port names

Definition at line 16 of file RXTXPortDriver.java.

Constructor & Destructor Documentation

kernel.serial_ports.RXTXPortDriver.RXTXPortDriver ( String  applicationName,
PortIdentifierGetter  portWrapper 
)
Parameters
applicationNameThe name to use when signing out ports
portWrapperAn object capable of retrieving port names

Definition at line 35 of file RXTXPortDriver.java.

37  {
38  this.applicationName = applicationName;
39  this.portWrapper = portWrapper;
40  }

Member Function Documentation

String kernel.serial_ports.RXTXPortDriver.getApplicationName ( )
Returns
The name of the application

Implements kernel.serial_ports.PortDriver.

Definition at line 45 of file RXTXPortDriver.java.

45  {
46  return this.applicationName;
47  }
SerialPort kernel.serial_ports.RXTXPortDriver.getPortByName ( String  portName)
Parameters
portNameThe name of the port that needs to be retrieved. An example of a valid name is "/dev/ttyUSB0"
Returns
A wrapper for gnu.io.RXTXPort which can be used to communicate with the required port

Implements kernel.serial_ports.PortDriver.

Definition at line 69 of file RXTXPortDriver.java.

69  {
70  return new RXTXPortWrapper(portName);
71  }
List<String> kernel.serial_ports.RXTXPortDriver.getSerialPortNames ( )
Returns
The names of all serial ports accessible to the system

Implements kernel.serial_ports.PortDriver.

Definition at line 52 of file RXTXPortDriver.java.

52  {
53  Enumeration portIdentifiers = this.portWrapper.getPortIdentifiers();
54  List<CommPortIdentifier> identifierList = castPortIdentifiersToList(
55  portIdentifiers
56  );
57  List<CommPortIdentifier> serialPortList = filterForSerialPorts(
58  identifierList
59  );
60  return getPortNamesForList(serialPortList);
61  }

The documentation for this class was generated from the following file:
Git Repo