Package serialComms
Class SerialPortParameters
java.lang.Object
serialComms.SerialPortParameters
- All Implemented Interfaces:
Serializable
,Cloneable
,ManagedParameters
public class SerialPortParameters
extends Object
implements Serializable, Cloneable, ManagedParameters
- Author:
- David McLaren, Paul Redmond
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
void
int
char
getChar()
int
int
Get a set of data that describes all of the parameters in a classint
int
void
sendChar
(char charToSend) void
sendString
(String stringToSend) void
setBitsPerSecond
(int bitsPerSecond) void
setCommPortName
(String commPortName) void
setDataBits
(int dataBits) void
setFlowControl
(int flowControl) void
setParity
(int parity) void
setStopBits
(int stopBits)
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
-
Constructor Details
-
SerialPortParameters
public SerialPortParameters()
-
-
Method Details
-
connect
- Parameters:
port
-bitsPerSecond
-parity
-- Returns:
- true if connection sucessful
-
disconnect
public void disconnect() -
sendChar
public void sendChar(char charToSend) - Parameters:
charToSend
-
-
sendString
-
getChar
public char getChar() -
getString
-
getPortList
-
getBitsPerSecond
public int getBitsPerSecond() -
setBitsPerSecond
public void setBitsPerSecond(int bitsPerSecond) -
getCommPortName
-
setCommPortName
-
getDataBits
public int getDataBits() -
setDataBits
public void setDataBits(int dataBits) -
getParity
public int getParity() -
setParity
public void setParity(int parity) -
getStopBits
public int getStopBits() -
setStopBits
public void setStopBits(int stopBits) -
clone
-
getFlowControl
public int getFlowControl()- Returns:
- the flowControl
-
setFlowControl
public void setFlowControl(int flowControl) - Parameters:
flowControl
- the flowControl to set
-
getParameterSet
Description copied from interface:ManagedParameters
Get a set of data that describes all of the parameters in a class- Specified by:
getParameterSet
in interfaceManagedParameters
- Returns:
- description of the parameters in a class.
-