Class SerialAddress
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
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeviceCodeFromSystemName(String systemName) Extract devicecode from system name, as a string 1-16.intdmxUnitIdCodeAsValueFromSystemName(String systemName) Extract DMX unit id from system name.houseCodeFromSystemName(String systemName) Extract housecode from system name, as a letter A-P.intinsteonIdHighCodeAsValueFromSystemName(String systemName) Extract Insteon high device id from system name.intinsteonIdLowCodeAsValueFromSystemName(String systemName) Extract Insteon low device id from system name.intinsteonIdMiddleCodeAsValueFromSystemName(String systemName) Extract Insteon middle device id from system name.booleanPublic static method determines whether a systemName names an Insteon device.normalizeSystemName(String systemName) Public static method to normalize a system name.(package private) StringvalidateSystemNameFormat(String name, char type, Locale locale) Validate the format for a system name.booleanvalidSystemNameConfig(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'.validSystemNameFormat(String systemName, char type) Public static method to validate system name format.intx10DeviceCodeAsValueFromSystemName(String systemName) Extract devicecode from system name, as a value 1-16.intx10HouseCodeAsValueFromSystemName(String systemName) Extract housecode from system name, as a value 1-16.
-
Field Details
-
memo
-
-
Constructor Details
-
SerialAddress
-
-
Method Details
-
validateSystemNameFormat
Validate the format for a system name.- Parameters:
name- the name to validatetype- the type letter for the namelocale- the locale for messages to the user- Returns:
- the name, unchanged
-
validSystemNameFormat
Public static method to validate system name format.- Parameters:
systemName- name to testtype- Letter indicating device type expected- Returns:
- VALID if system name has a valid format, else return INVALID
-
validSystemNameConfig
Public static method to validate system name for configuration returns 'true' if system name has a valid meaning in current configuration, else returns 'false'.- Parameters:
systemName- name to testtype- type to test- Returns:
- true for valid names
-
isInsteon
Public static method determines whether a systemName names an Insteon device.- Parameters:
systemName- name to test- Returns:
- true if system name corresponds to Insteon device
-
normalizeSystemName
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.
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.
- Parameters:
systemName- name to process- Returns:
- 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.
-
houseCodeFromSystemName
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.
- Parameters:
systemName- system name- Returns:
- house code letter
-
deviceCodeFromSystemName
Extract devicecode from system name, as a string 1-16.- Parameters:
systemName- name- Returns:
- If the supplied system name does not have a valid format, an empty string is returned. X10 type device code
-
x10HouseCodeAsValueFromSystemName
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.
- Parameters:
systemName- name- Returns:
- valid 1-16, invalid, return -1
-
x10DeviceCodeAsValueFromSystemName
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.
- Parameters:
systemName- name- Returns:
- value of X10 device code, -1 if invalid
-
insteonIdHighCodeAsValueFromSystemName
Extract Insteon high device id from system name.If the supplied system name does not have a valid format, an empty string is returned.
- Parameters:
systemName- name- Returns:
- Insteon high byte value
-
insteonIdMiddleCodeAsValueFromSystemName
Extract Insteon middle device id from system name.If the supplied system name does not have a valid format, an empty string is returned.
- Parameters:
systemName- name- Returns:
- Insteon middle id value, -1 if invalid
-
insteonIdLowCodeAsValueFromSystemName
Extract Insteon low device id from system name.If the supplied system name does not have a valid format, an empty string is returned.
- Parameters:
systemName- name- Returns:
- Insteon low value id, -1 if invalid
-
dmxUnitIdCodeAsValueFromSystemName
Extract DMX unit id from system name.If the supplied system name does not have a valid format, an empty string is returned.
- Parameters:
systemName- name- Returns:
- dmx unit id, -1 if invalid
-