|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.powerline.SerialAddress
public class SerialAddress
Utility Class supporting parsing and testing of addresses
Two address formats are supported: For X10: Ptnxx where: t is the type code, 'S' for sensors, and 'L' for lights n is the house code of the input or output bit (A - P) xx is a bit number of the input or output bit (1-16) examples: PLA2 (House Code A, Unit 2), PSK1 (House Code K, Unit 1) For Insteon: Pthh.hh.hh where: t is the type code, 'S' for sensors, and 'L' for lights aa is two hexadecimal digits examples: PLA2.43.CB
| Constructor Summary | |
|---|---|
SerialAddress(SerialSystemConnectionMemo m)
|
|
| Method Summary | |
|---|---|
int |
deviceCodeAsValueFromSystemName(String systemName)
Extract devicecode from system name, as a value 1-16 If the supplied system name does not have a valid format, an -1 is returned. |
String |
deviceCodeFromSystemName(String systemName)
Extract devicecode from system name, as a string 1-16 If the supplied system name does not have a valid format, an empty string is returned. |
int |
houseCodeAsValueFromSystemName(String systemName)
Extract housecode from system name, as a value 1-16 If the supplied system name does not have a valid format, an -1 is returned. |
String |
houseCodeFromSystemName(String systemName)
Extract housecode from system name, as a letter A-P If the supplied system name does not have a valid format, an empty string is returned. |
int |
idHighCodeAsValueFromSystemName(String systemName)
Extract Insteon high device id from system name If the supplied system name does not have a valid format, an empty string is returned. |
int |
idLowCodeAsValueFromSystemName(String systemName)
Extract Insteon low device id from system name If the supplied system name does not have a valid format, an empty string is returned. |
int |
idMiddleCodeAsValueFromSystemName(String systemName)
Extract Insteon middle device id from system name If the supplied system name does not have a valid format, an empty string is returned. |
boolean |
isInsteon(String systemName)
Public static method determines whether a systemName names an Insteon device. |
String |
normalizeSystemName(String systemName)
Public static method to normalize a system name This routine is used to ensure that each system name is uniquely linked to one bit, by removing extra zeros inserted by the user. |
boolean |
validSystemNameConfig(String systemName,
char type)
Public static method to validate system name for configuration returns 'true' if system name has a valid meaning in current configuration, else returns 'false' |
boolean |
validSystemNameFormat(String systemName,
char type)
Public static method to validate system name format |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SerialAddress(SerialSystemConnectionMemo m)
| Method Detail |
|---|
public boolean validSystemNameFormat(String systemName,
char type)
type - Letter indicating device type expected
public boolean validSystemNameConfig(String systemName,
char type)
public boolean isInsteon(String systemName)
public String normalizeSystemName(String systemName)
This routine is used to ensure that each system name is uniquely linked to one bit, by removing extra zeros inserted by the user.
If the supplied system name does not have a valid format, an empty string is returned. Otherwise a normalized name is returned in the same format as the input name.
public String houseCodeFromSystemName(String systemName)
If the supplied system name does not have a valid format, an empty string is returned.
public String deviceCodeFromSystemName(String systemName)
If the supplied system name does not have a valid format, an empty string is returned.
public int houseCodeAsValueFromSystemName(String systemName)
If the supplied system name does not have a valid format, an -1 is returned.
public int deviceCodeAsValueFromSystemName(String systemName)
If the supplied system name does not have a valid format, an -1 is returned.
public int idHighCodeAsValueFromSystemName(String systemName)
If the supplied system name does not have a valid format, an empty string is returned.
public int idMiddleCodeAsValueFromSystemName(String systemName)
If the supplied system name does not have a valid format, an empty string is returned.
public int idLowCodeAsValueFromSystemName(String systemName)
If the supplied system name does not have a valid format, an empty string is returned.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||