|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.jpeterson.x10.GatewayImpl | +--com.jpeterson.x10.SerialGateway
This class provides a base for gateway modules that are based on the serial port. This base class provides methods to set and get the serial port parameters.
Field Summary | |
protected int |
baudRate
|
protected int |
dataBits
|
protected int |
parity
|
protected java.lang.String |
portName
|
protected int |
stopBits
|
Fields inherited from class com.jpeterson.x10.GatewayImpl |
gatewayListeners,
gatewayQueue |
Constructor Summary | |
protected |
SerialGateway()
Constructor only calls parent's constructor. |
Method Summary | |
int |
getBaudRate()
Get the serial port communication rate. |
int |
getDataBits()
Get the number of data bits to use. |
int |
getParity()
Get the serial port parity. |
java.lang.String |
getPortName()
Get the serial port to use. |
int |
getStopBits()
Get the serial port stop bits. |
void |
setBaudRate(int baudRate)
Set the serial port communication rate. |
void |
setDataBits(int dataBits)
Set the number of serial port data bits to use. |
void |
setParity(int parity)
Set the serial port parity. |
void |
setPortName(java.lang.String portName)
Set the serial port to use. |
void |
setStopBits(int stopBits)
Set the serial port stop bits. |
Methods inherited from class com.jpeterson.x10.GatewayImpl |
addGatewayListener,
allocate,
deallocate,
dispatchControlEvent,
fireControlEvent,
getGatewayQueue,
getGatewayState,
pause,
removeGatewayListener,
resume,
setGatewayQueue,
setGatewayState,
stateTransition,
testGatewayState,
waitGatewayState |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.lang.String portName
protected int baudRate
protected int dataBits
protected int stopBits
protected int parity
Constructor Detail |
protected SerialGateway()
Method Detail |
public void setPortName(java.lang.String portName)
portName
- the name of the serial portpublic java.lang.String getPortName()
public void setBaudRate(int baudRate)
baudRate
- the serial port communication ratepublic int getBaudRate()
public void setDataBits(int dataBits)
dataBits
- the number of data bits to usepublic int getDataBits()
public void setStopBits(int stopBits)
stopBits
- the serial port stop bits.public int getStopBits()
public void setParity(int parity)
parity
- the serial port parity.public int getParity()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |