org.ubicollab.X10Proxy
Class X10ProxyImpl

java.lang.Object
  extended by org.ubicollab.X10Proxy.X10ProxyImpl
All Implemented Interfaces:
X10Proxy

public class X10ProxyImpl
extends java.lang.Object
implements X10Proxy

The Class X10ProxyImpl implements the methods neccessary for a minimal x10 implementation.

Version:
0.1
Author:
Kim-Steve Johansen

Constructor Summary
X10ProxyImpl()
          This is an empty constructor.
 
Method Summary
 void dimDevice(java.lang.String house, int unit, int cmnd, int percentage)
          Send a brighten or dim command to the X10 device identified by house and unit.
 void sendCommand(java.lang.String house, int unit, boolean turnOn)
          Send a on/off command to an X10 device identified by house and unit.
 boolean startSerialConnection(java.lang.String comPort)
          Start serial connection to a CM11A X10 control device on the given COM port.
 void stopSerialConnection()
          Stop the ongiong serial connection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

X10ProxyImpl

public X10ProxyImpl()
This is an empty constructor.

Method Detail

sendCommand

public void sendCommand(java.lang.String house,
                        int unit,
                        boolean turnOn)
Send a on/off command to an X10 device identified by house and unit.

Specified by:
sendCommand in interface X10Proxy
Parameters:
house - the house address (A-P)
unit - the unit address (1-16)
turnOn - the turn on
See Also:
X10Proxy.sendCommand(java.lang.String, int, boolean)

startSerialConnection

public boolean startSerialConnection(java.lang.String comPort)
Start serial connection to a CM11A X10 control device on the given COM port.

Specified by:
startSerialConnection in interface X10Proxy
Parameters:
comPort - the com port to use (e.g. COM2)
Returns:
true, if serial connection is started successfully, false othervise.
See Also:
X10Proxy.startSerialConnection(java.lang.String)

stopSerialConnection

public void stopSerialConnection()
Stop the ongiong serial connection.

Specified by:
stopSerialConnection in interface X10Proxy
See Also:
X10Proxy.stopSerialConnection()

dimDevice

public void dimDevice(java.lang.String house,
                      int unit,
                      int cmnd,
                      int percentage)
Send a brighten or dim command to the X10 device identified by house and unit.

Specified by:
dimDevice in interface X10Proxy
Parameters:
house - the house address (A-P)
unit - the unit address (1-16)
cmnd - Either 0 for dim or 1 for brighten
percentage - the level to change between 1 and 100 (persentage).
See Also:
X10Proxy.dimDevice(java.lang.String, int, int, int)