|
SMSLib 3.5.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.smslib.helper.CommPortIdentifier
public class CommPortIdentifier
Communications port management.
Please note: This is a wrapper around
javax.comm.CommPortIdentifier
(and so
gnu.io.CommPortIdentifier
). The API definition is taken from
Sun. So honor them!
CommPortIdentifier
is the central class for controlling access
to communications ports. It includes methods for:
An application first uses methods in CommPortIdentifier
to
negotiate with the driver to discover which communication ports are available
and then select a port for opening. It then uses methods in other classes
like CommPort
, ParallelPort
and
SerialPort
to communicate through the port.
Field Summary | |
---|---|
static int |
PORT_SERIAL
|
Method Summary | |
---|---|
java.lang.String |
getName()
Returns the name of the port. |
static CommPortIdentifier |
getPortIdentifier(java.lang.String portName)
Obtains a CommPortIdentifier object by using a port name. |
static java.util.Enumeration<CommPortIdentifier> |
getPortIdentifiers()
Obtains an enumeration object that contains a CommPortIdentifier object for each port in the system. |
int |
getPortType()
Returns the port type. |
SerialPort |
open(java.lang.String appname,
int timeout)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int PORT_SERIAL
Method Detail |
---|
public int getPortType()
public java.lang.String getName()
public SerialPort open(java.lang.String appname, int timeout)
public static java.util.Enumeration<CommPortIdentifier> getPortIdentifiers()
CommPortIdentifier
object for each port in the system.
Enumeration
that can be used to enumerate all the
ports known to the systempublic static CommPortIdentifier getPortIdentifier(java.lang.String portName)
portName
- name of the port to open
CommPortIdentifier
object
java.lang.RuntimeException
- (wrapping a NoSuchPortException) if the port does not exist
|
SMSLib 3.5.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |