public class SerialPortManager extends PortManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
cvsRev |
static int |
defaultBaudRate
The default baud rate.
|
allIDsValid
Constructor and Description |
---|
SerialPortManager(int portNumber,
int baudRate)
Creates the SECS1 port manager.
|
SerialPortManager(int portNumber,
java.lang.String connectionId)
Creates the SECS1 port manager.
|
Modifier and Type | Method and Description |
---|---|
int |
available()
Returns the number of bytes available.
|
void |
close()
Close the socket manager.
|
void |
configurePort()
Open the port and set up the object to receive events.
|
int |
getBaudRate()
Gets the port value of the server.
|
java.lang.String |
getName()
Gets the name of this serial port on this computer.
|
int |
getPort()
Gets the port value of the server.
|
int |
read(byte[] b,
int off,
int len)
Read the socket.
|
void |
setBaudRate(int newValue)
Sets the baud rate for the server.
|
void |
setPort(int newValue)
Sets the port number of the server.
|
java.lang.String |
toString()
Return the string representation of this object.
|
void |
write(byte[] b)
Writes the array to the socket.
|
addDeviceId, addPortManager, getConnectionManager, getConnectionManagerForId, getId, getLogger, getMessageHandlersForId, getPortManagerForId, getPortManagers, read, removeDeviceId, removePortManager, removeSessionId, setConnectionManager, setLogger, write
public static final java.lang.String cvsRev
public static int defaultBaudRate
public SerialPortManager(int portNumber, int baudRate) throws java.io.IOException
portNumber
- serial port enumerationbaudRate
- a valid baud ratejava.io.IOException
public SerialPortManager(int portNumber, java.lang.String connectionId) throws java.io.IOException
java.io.IOException
SessionManager.getSessionManager(int, java.lang.String, int, int, boolean, java.lang.Class)
public int available() throws java.io.IOException
available
in class PortManager
java.io.IOException
public void close() throws java.io.IOException
close
in class PortManager
java.io.IOException
public void configurePort() throws java.io.IOException
java.io.IOException
public int getBaudRate()
public java.lang.String getName()
public int getPort()
getPort
in class PortManager
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class PortManager
java.io.IOException
read
public void setBaudRate(int newValue) throws java.io.IOException
newValue
- The new baud ratejava.io.IOException
public void setPort(int newValue) throws java.io.IOException
setPort
in class PortManager
newValue
- the new port numberjava.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object
public void write(byte[] b) throws java.io.IOException
write
in class PortManager
java.io.IOException
Copyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.