org.ubicollab.X10Proxy
Class X10Impl

java.lang.Object
  extended by org.ubicollab.X10Proxy.X10Impl

public class X10Impl
extends java.lang.Object

The Class X10Impl implements the methods neccessary to connect to, disconnect and send on/off/dimming/brighten commands with an CM11A serial RS232 X10 controller. TODO: More x10 functions should be implemented here.

Version:
0.1
Author:
Kim-Steve Johansen

Constructor Summary
X10Impl(java.lang.String port)
          The Constructor.
 
Method Summary
 void close()
          Close the serial connection and release resources used.
 void dimDevice(char house, int unit, int cmnd, int percentage)
          This method sends dim or brighten events to the given X10 device.
 boolean isStarted()
          Checks if start result is ok.
 void turnOffDevice(char house, int unit)
          Turn off device.
 void turnOnDevice(char house, int unit)
          Turn on a device.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

X10Impl

public X10Impl(java.lang.String port)
The Constructor.

Parameters:
port - the port
Method Detail

dimDevice

public void dimDevice(char house,
                      int unit,
                      int cmnd,
                      int percentage)
This method sends dim or brighten events to the given X10 device.

Parameters:
cmnd - Either 0 for dim or 1 for brighten
unit - the unit
house - the house
percentage - percentage to change between 1 and 100.

turnOnDevice

public void turnOnDevice(char house,
                         int unit)
Turn on a device.

Parameters:
unit - the unit to send comand to
house - the house to send command to

turnOffDevice

public void turnOffDevice(char house,
                          int unit)
Turn off device.

Parameters:
unit - the unit
house - the house

close

public void close()
Close the serial connection and release resources used.


isStarted

public boolean isStarted()
Checks if start result is ok.

Returns:
true, if start succeded or false othervise