|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectserialPort.rxtx.CommPortIdentifier
public class CommPortIdentifier
Field Summary | |
---|---|
static int |
PORT_I2C
|
static int |
PORT_PARALLEL
IEEE 1284 parallel port. |
static int |
PORT_RAW
|
static int |
PORT_RS485
|
static int |
PORT_SERIAL
RS-232 serial port. |
Method Summary | |
---|---|
static void |
addPortName(java.lang.String s,
int type,
CommDriver c)
|
void |
addPortOwnershipListener(CommPortOwnershipListener c)
Adds the specified listener to the list of ownership listeners for this port. |
java.lang.String |
getCurrentOwner()
|
java.lang.String |
getName()
|
static CommPortIdentifier |
getPortIdentifier(CommPortInterface p)
|
static CommPortIdentifier |
getPortIdentifier(java.lang.String s)
|
static CommPortIdentifier |
getPortIdentifierNew(java.lang.String s)
|
static java.util.Enumeration |
getPortIdentifiers()
|
static java.util.Enumeration |
getPortIdentifiersNew()
|
int |
getPortType()
|
boolean |
isCurrentlyOwned()
|
static void |
main(java.lang.String[] args)
|
CommPortInterface |
open(java.io.FileDescriptor f)
|
CommPortInterface |
open(java.lang.String TheOwner,
int i)
|
void |
removePortOwnershipListener(CommPortOwnershipListener c)
Removes the specified listener from the list of ownership listeners for this port. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int PORT_SERIAL
public static final int PORT_PARALLEL
public static final int PORT_I2C
public static final int PORT_RS485
public static final int PORT_RAW
Method Detail |
---|
public static void addPortName(java.lang.String s, int type, CommDriver c)
public void addPortOwnershipListener(CommPortOwnershipListener c)
CommPortIdentifierInterface
addPortOwnershipListener
in interface CommPortIdentifierInterface
c
- the ownership listener to addpublic java.lang.String getCurrentOwner()
getCurrentOwner
in interface CommPortIdentifierInterface
public java.lang.String getName()
getName
in interface CommPortIdentifierInterface
public static CommPortIdentifier getPortIdentifierNew(java.lang.String s) throws NoSuchPortException
NoSuchPortException
public static CommPortIdentifier getPortIdentifier(java.lang.String s) throws NoSuchPortException
NoSuchPortException
public static CommPortIdentifier getPortIdentifier(CommPortInterface p) throws NoSuchPortException
NoSuchPortException
public static java.util.Enumeration getPortIdentifiersNew()
public static java.util.Enumeration getPortIdentifiers()
public int getPortType()
getPortType
in interface CommPortIdentifierInterface
public boolean isCurrentlyOwned()
isCurrentlyOwned
in interface CommPortIdentifierInterface
public CommPortInterface open(java.io.FileDescriptor f) throws UnsupportedCommOperationException
open
in interface CommPortIdentifierInterface
f
- the file descriptor
UnsupportedCommOperationException
- if the platform does not
support this functionalitypublic CommPortInterface open(java.lang.String TheOwner, int i) throws PortInUseException
open
in interface CommPortIdentifierInterface
TheOwner
- the name of the application requesting the porti
- number of miliseconds to wait for the port to open
PortInUseException
public void removePortOwnershipListener(CommPortOwnershipListener c)
CommPortIdentifierInterface
removePortOwnershipListener
in interface CommPortIdentifierInterface
c
- the ownership listener to removepublic java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |