|
2008-09-10 1.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.soda.dk.core.EscObject
org.eclipse.soda.dk.connection.Connection
org.eclipse.soda.dk.connection.StreamConnection
org.eclipse.soda.dk.serial.connection.SerialConnection
public class SerialConnection
Serial Port (RS232) Connection. The SerialConnection class implements the SerialConnectionService and provides the controls for the connection.
The list of exported services:
SerialConnectionService,
ConnectionService| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.eclipse.soda.dk.serial.connection.service.SerialConnectionService |
|---|
SerialConnectionService.Hardwareflowcontrol, SerialConnectionService.Parity, SerialConnectionService.Softwareflowcontrol, SerialConnectionService.Stopbits |
| Field Summary | |
|---|---|
static java.lang.String |
CLASS_NAME
Defines the full class name. |
protected static char[] |
TOSTRING_NAME
Define the to string name (char[]) constant. |
| Constructor Summary | |
|---|---|
SerialConnection(ConfigurationService configuration)
Constructs an instance of this class from the specified configuration parameter. |
|
SerialConnection(java.util.Dictionary properties)
|
|
SerialConnection(int portNumber,
int baudRate,
int dataBits,
int parity,
int stopBits,
int hardwareFlowControl,
int softwareFlowControl,
int readTotalTimeout,
int readIntervalTimeout,
int writeTotalTimeout)
Constructs an SerialConnection object using the input parameter(s). |
|
SerialConnection(java.lang.String portName,
int baudRate,
int dataBits,
int parity,
int stopBits,
int hardwareFlowControl,
int softwareFlowControl,
int readTotalTimeout,
int readIntervalTimeout,
int writeTotalTimeout)
Constructs an instance of this class from the specified port name, baud rate, data bits, parity, stop bits, hardware flow control, software flow control, read total timeout, read interval timeout and write total timeout parameters. |
|
| Method Summary | |
|---|---|
void |
changeBaudRate(int baudRate)
Perform the changeBaudRate action method. |
void |
close()
Perform the close action method. |
java.lang.String |
getOutputName()
Gets the output name (String) value. |
static java.lang.String |
getPortName(int portNumber)
|
long |
getReceivedTotalTimeout()
Gets the received total timeout (long) value. |
java.lang.String |
getType()
Gets the String type property value. |
void |
open()
Perform the open action method. |
int |
read(byte[] bytes)
Read bytes. |
int |
read(byte[] bytes,
int offset,
int length)
Read bytes. |
void |
setReceivedTotalTimeout(long timeout)
|
| Methods inherited from class org.eclipse.soda.dk.connection.StreamConnection |
|---|
flush, getInputStream, getOutputStream, setInputStream, setOutputStream, write, write |
| Methods inherited from class org.eclipse.soda.dk.connection.Connection |
|---|
attemptRecoveryFromError, exit, finalize, getConfigurationService, getDefaultResource, getErrorSeverity, getLogDetails4, getLogDetails5, getLogLevel, getReadByteCount, getResource, getWriteByteCount, isOpen, setConfigurationInformation, setConfigurationService, setLogLevel, setOpen, setReadByteCount, setWriteByteCount, toStringInfo, updateReadByteCount, updateWriteByteCount |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CLASS_NAME
protected static final char[] TOSTRING_NAME
| Constructor Detail |
|---|
public SerialConnection(ConfigurationService configuration)
ConfigurationService) parameter.
configuration - The configuration (ConfigurationService) parameter.SerialConnection(int,int,int,int,int,int,int,int,int,int),
SerialConnection(String,int,int,int,int,int,int,int,int,int),
SerialConnection(Dictionary)public SerialConnection(java.util.Dictionary properties)
properties - The properties (Dictionary) parameter.SerialConnection(int,int,int,int,int,int,int,int,int,int),
SerialConnection(String,int,int,int,int,int,int,int,int,int),
SerialConnection(ConfigurationService)
public SerialConnection(int portNumber,
int baudRate,
int dataBits,
int parity,
int stopBits,
int hardwareFlowControl,
int softwareFlowControl,
int readTotalTimeout,
int readIntervalTimeout,
int writeTotalTimeout)
throws java.lang.IllegalArgumentException
SerialConnection object using the input parameter(s). int int int int int int int int int int The exception description.
portNumber - The port number (int) parameter.baudRate - The baud rate (int) parameter.dataBits - The data bits (int) parameter.parity - The parity (int) parameter.stopBits - The stop bits (int) parameter.hardwareFlowControl - The hardware flow control (int) parameter.softwareFlowControl - The software flow control (int) parameter.readTotalTimeout - The read total timeout (int) parameter.readIntervalTimeout - The read interval timeout (int) parameter.writeTotalTimeout - The write total timeout (int) parameter.
java.lang.IllegalArgumentException - Illegal Argument Exception.SerialConnection(String,int,int,int,int,int,int,int,int,int),
SerialConnection(Dictionary),
SerialConnection(ConfigurationService)
public SerialConnection(java.lang.String portName,
int baudRate,
int dataBits,
int parity,
int stopBits,
int hardwareFlowControl,
int softwareFlowControl,
int readTotalTimeout,
int readIntervalTimeout,
int writeTotalTimeout)
throws java.lang.IllegalArgumentException
String) parameter. The baud rate (int) parameter. The data bits (int) parameter. The parity (int) parameter. The stop bits (int) parameter. The hardware flow control (int
) parameter. The software flow control (int) parameter. The read total timeout (int) parameter. The read interval timeout (int) parameter. The write total timeout (int) parameter. Illegal Argument
Exception.
portName - The port name (String) parameter.baudRate - The baud rate (int) parameter.dataBits - The data bits (int) parameter.parity - The parity (int) parameter.stopBits - The stop bits (int) parameter.hardwareFlowControl - The hardware flow control (int) parameter.softwareFlowControl - The software flow control (int) parameter.readTotalTimeout - The read total timeout (int) parameter.readIntervalTimeout - The read interval timeout (int) parameter.writeTotalTimeout - The write total timeout (int) parameter.
java.lang.IllegalArgumentException - Illegal Argument Exception.SerialConnection(int,int,int,int,int,int,int,int,int,int),
SerialConnection(Dictionary),
SerialConnection(ConfigurationService)| Method Detail |
|---|
public static java.lang.String getPortName(int portNumber)
portNumber - The port number (int) parameter.
String) value.
public void changeBaudRate(int baudRate)
throws java.lang.RuntimeException
int Runtime Exception.
baudRate - The baud rate (int) parameter.
java.lang.RuntimeException - Runtime Exception.
public void close()
throws java.io.IOException
close in interface ConnectionServiceclose in class StreamConnectionjava.io.IOException - Thrown if the IOException exception condition occurs.ConnectionService.close()public java.lang.String getOutputName()
getOutputName in class EscObjectString) value.public long getReceivedTotalTimeout()
long) value.setReceivedTotalTimeout(long)public java.lang.String getType()
String type property value.
String) value.
public void open()
throws java.io.IOException
open in interface ConnectionServiceopen in class Connectionjava.io.IOException - Thrown if the IOException exception condition occurs.ConnectionService.open()
public int read(byte[] bytes)
throws java.io.IOException
StreamConnection
read in interface ConnectionServiceread in class StreamConnectionbytes - The bytes (byte[]) parameter.
int) value.
java.io.IOException - IOException.read(byte[],int,int)
public int read(byte[] bytes,
int offset,
int length)
throws java.io.IOException
StreamConnection
read in interface ConnectionServiceread in class StreamConnectionbytes - The bytes (byte[]) parameter.offset - The offset (int) parameter.length - The length (int) parameter.
int) value.
java.io.IOException - IOException.read(byte[])public void setReceivedTotalTimeout(long timeout)
timeout - The timeout (long) parameter.getReceivedTotalTimeout()
|
2008-09-10 1.1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||