|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.wcb.autohome.implementations.X10Module
Filename: $Id: X10Module.java,v 1.6 2004/02/28 00:21:49 wbogaardt Exp $ Abstract: Represents the X10 module which is either an appliance or light controller. There are 16 house codes represented with the characters A-P and 16 section codes represented by integers 1-16. The X10 module stores this and the type of device assigned to the alphanumeric combination so that information to the interfaces can be forwared accordingly. Since certain commands are restricted to certain modules. Such that a Light module is allowed to dim or brighten incrementally where as an appliance module which cares more load can simply be turned on or off.
Field Summary |
Fields inherited from interface org.wcb.autohome.interfaces.X10DeviceConstants |
APPLIANCE_MODULE_OFF, APPLIANCE_MODULE_ON, BAUD, BAUD_RATE_ARRAY, BRIGHT_ACTION, BROWSER, CM11A_TRANSMITTER, CM17A_TRANSMITTER, CONNECT_ON_START, COUNTRY, DATA_BIT, DATA_BITS_ARRAY, DEVICE_ARRAY, DIM_ACTION, EMAIL_AUTHORIZE, EMAIL_FREQUENCY, EMAIL_FROM, EMAIL_PASSWORD, EMAIL_SMTP, EMAIL_TO, EMAIL_USERNAME, FALSE, HOUSE_CODES_ARRAY, INTERFACE_TYPE, LAMP_MODULE_OFF, LAMP_MODULE_ON, LANGUAGE, LAST_FILE, LOCALHOST, LOOK_AND_FEEL, MAC, METAL, MOTIF, OFF_ACTION, ON_ACTION, PARITY, PARITY_ARRAY, RECOVER_CM11A, RMI_HOST, SEPARATOR, SERIAL_PORT, SPEECH_ENGINE, STOP_BIT, STOP_BITS_ARRAY, TEST_TRANSMITTER, TIMER_EVENT, TRIGGER_EVENT, TRUE, USER_HOME, WINDOWS |
Constructor Summary | |
X10Module()
Default constructor that creates a Lamp Module with an A1 identifier |
|
X10Module(char a,
int i,
java.lang.String sN,
java.lang.String desc,
int iType)
Full constructor to create the x10 module |
|
X10Module(IX10Module newO)
clone constructor using the interface class to create the object |
Method Summary | |
java.lang.String |
getDescription()
user defined description of the x10 module. |
int |
getDeviceCode()
X10 device code this is the numeric value in the x10 device modules. |
java.lang.String |
getFullDeviceCode()
The entire x10 module code, which is a combination of House code and device code. |
char |
getHouseCode()
Returns a character of 'A' to 'P' for valid house codes or module grouping of the x10 devices |
java.lang.String |
getName()
Get the name of the X10 Module |
int |
getType()
X10 module type either lamp or appliance module. |
void |
print()
print routine for debugging purpose |
void |
setDescription(java.lang.String sDesc)
Description of the X10 module such as location or purpose. |
void |
setDeviceCode(int iDevice)
Setter for x10 device code |
void |
setHouseCode(char cHouse)
Setter for house code. |
void |
setName(java.lang.String sNam)
Set the name of the device |
void |
setType(int iTyp)
X10 module type or purpose should be either a X10DeviceConstants.LAMP_MODULE_ON = 1 or X10DeviceConstants.APPLIANCE_MODULE_ON = 2 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public X10Module(char a, int i, java.lang.String sN, java.lang.String desc, int iType)
a
- House code A-Pi
- Device code 1-16sN
- Identifying name of moduledesc
- Description of the moduleiType
- Module type either Lamp - 1 or Appliance - 2public X10Module()
public X10Module(IX10Module newO)
newO
- The interface to clone an object fromMethod Detail |
public void print()
public void setHouseCode(char cHouse)
setHouseCode
in interface IX10Module
cHouse
- should be a value between 'A' and 'P'public void setDeviceCode(int iDevice)
setDeviceCode
in interface IX10Module
iDevice
- Should be a value between 1 and 15public void setName(java.lang.String sNam)
setName
in interface IX10Module
sNam
- The identifying name of the modulepublic void setDescription(java.lang.String sDesc)
setDescription
in interface IX10Module
sDesc
- Description of the modulepublic void setType(int iTyp)
setType
in interface IX10Module
iTyp
- Either 1 or 2public char getHouseCode()
getHouseCode
in interface IX10Module
public int getDeviceCode()
getDeviceCode
in interface IX10Module
public java.lang.String getName()
getName
in interface IX10Module
public java.lang.String getDescription()
getDescription
in interface IX10Module
public int getType()
getType
in interface IX10Module
public java.lang.String getFullDeviceCode()
getFullDeviceCode
in interface IX10Module
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |