|
|||||||||
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 | +--com.jpeterson.x10.module.CM17A
Gateway to X10 CM17A serial interface unit. The CM17A is purely a transmitter of X10Events. It is a very small device that connects to a serial port and transmitts X10 commands via an RF link to an X10 RF receiver. It is only able to send On, Off, Dim, and Bright commands. The Dim and Bright commands can only be sent in multiples of 5%. The CM17A is controlled by toggling the UART's RTS and DTR signals. Because of this fact, the CM17A device provides a passthrough capability, allowing a serial device to be connected to the CM17A.
Fields inherited from class com.jpeterson.x10.SerialGateway |
baudRate,
dataBits,
parity,
portName,
stopBits |
Fields inherited from class com.jpeterson.x10.GatewayImpl |
gatewayListeners,
gatewayQueue |
Fields inherited from interface com.jpeterson.x10.Transmitter |
QUEUE_EMPTY,
QUEUE_NOT_EMPTY |
Constructor Summary | |
CM17A()
Construct a new CM17A object. |
Method Summary | |
void |
allocate()
Start the serial link between the computer and the actual CM11A module. |
void |
deallocate()
Stop the serial link between the computer and the actual CM11A module. |
void |
dispatchControlEvent(ControlEvent event)
Calls TransmitterListener methods. |
boolean |
isRunning()
Indicates if the the interface to the CM11A is up. |
protected void |
logical0()
Set the CM17A to logical '0' state. |
protected void |
logical1()
Set the CM17A to logical '1' state. |
void |
processTransmissionQueue()
Process the queue of events to be processed by the CM11A. |
protected void |
reset()
Set the CM17A to reset state. |
void |
run()
Process CM11A events. |
protected void |
standby()
Set the CM17A to standby state. |
void |
stateTransition(long state)
Encapsulates state transition rules. |
void |
transmit(X10Event evt)
Implementation of Transmitter. |
Methods inherited from class com.jpeterson.x10.SerialGateway |
getBaudRate,
getDataBits,
getParity,
getPortName,
getStopBits,
setBaudRate,
setDataBits,
setParity,
setPortName,
setStopBits |
Methods inherited from class com.jpeterson.x10.GatewayImpl |
addGatewayListener,
fireControlEvent,
getGatewayQueue,
getGatewayState,
pause,
removeGatewayListener,
resume,
setGatewayQueue,
setGatewayState,
testGatewayState,
waitGatewayState |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public CM17A()
Method Detail |
public void stateTransition(long state)
public void transmit(X10Event evt) throws GatewayStateError
evt
- X10 event to transmit. Should be either an AddressEvent
or an OnEvent, OffEvent, DimEvent, or BrightEvent. All other
events are ignored.public boolean isRunning()
public void allocate() throws GatewayException, GatewayStateError
DEALLOCATING_RESOURCES
stategetGatewayState
,
deallocate
,
ALLOCATED
,
GATEWAY_ALLOCATED
public void deallocate()
ALLOCATING_RESOURCES
stateallocate
,
GATEWAY_DEALLOCATED
,
QUEUE_EMPTY
protected void reset() throws GatewayStateError
protected void standby() throws GatewayStateError
protected void logical1() throws GatewayStateError
protected void logical0() throws GatewayStateError
public void dispatchControlEvent(ControlEvent event)
event
- the ControlEvent to be propagated to the listenersfireControlEvent
public void run()
public void processTransmissionQueue()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |