agentland.output
Class X10Data
java.lang.Object
|
+--agentland.device.DeviceData
|
+--agentland.output.X10Data
- public class X10Data
- extends DeviceData
- implements Serializable, Cloneable
- See Also:
- Serialized Form
X10Data
public X10Data()
X10Data
public X10Data(char houseCode,
int moduleCode)
X10Data
public X10Data(String houseCode,
int moduleCode)
X10Data
public X10Data(String name,
char houseCode,
int moduleCode)
X10Data
public X10Data(String name,
String houseCode,
int moduleCode)
getHouseCode
public char getHouseCode()
getHouseCodeInt
public int getHouseCodeInt()
- Returns house code as an int; 0 for 'a', and so on...
getModuleCode
public int getModuleCode()
setHouseCode
public void setHouseCode(char houseCode)
setModuleCode
public void setModuleCode(int moduleCode)
fromString
public static X10Data fromString(String str)
- Parses a string to create an X10 object
- Parameters:
str
- the string to be parsed- Returns:
- an X10Data object or null if failed
stringToChar
public static char stringToChar(String str)
- converts a string to char. if the string is of length other
than 1, it will throw IllegalArgumentException
charToInt
public static int charToInt(char ch)
- Takes a char like "a", "b", etc and converts them to ints like
0 for a, 1 for b, etc
charToByte
public static byte charToByte(char ch)