Package jmri.jmrix.lenz
Class XNetAddress
- java.lang.Object
- 
- jmri.jmrix.lenz.XNetAddress
 
- 
 public class XNetAddress extends java.lang.Object Utility Class supporting parsing and testing of addresses for Lenz XpressNetTwo address format are supported: - Xtxxxx where: t is the type code, 'T' for turnouts, 'S' for sensors, and 'L' for lights xxxx is a int for the hardware address (1-1024) examples: XT2 (address 2), XS1003 (address 1003), XL134 (address 134)
- XSmm:pp where mm is the module address (1-128) and pp is the contact pin number (1-8).
 
- 
- 
Field SummaryFields Modifier and Type Field Description (package private) static intMAXSENSORADDRESS(package private) static intMINSENSORADDRESS
 - 
Constructor SummaryConstructors Constructor Description XNetAddress()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetBitFromSystemName(java.lang.String systemName, java.lang.String prefix)Public static method to parse a Lenz XpressNet system name.static java.lang.StringgetUserNameFromSystemName(java.lang.String systemName, java.lang.String prefix)Public static method to check the user name for a valid system name.static Manager.NameValidityvalidSystemNameFormat(java.lang.String systemName, char type, java.lang.String prefix)Public static method to validate system name format.
 
- 
- 
- 
Field Detail- 
MINSENSORADDRESSstatic final int MINSENSORADDRESS - See Also:
- Constant Field Values
 
 - 
MAXSENSORADDRESSstatic final int MAXSENSORADDRESS - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
XNetAddresspublic XNetAddress() 
 
- 
 - 
Method Detail- 
getBitFromSystemNamepublic static int getBitFromSystemName(java.lang.String systemName, java.lang.String prefix) Public static method to parse a Lenz XpressNet system name. Note: Bits are numbered from 1.- Parameters:
- systemName- system name to parse.
- prefix- system prefix.
- Returns:
- the hardware address number, return -1 if an error is found
 
 - 
validSystemNameFormatpublic static Manager.NameValidity validSystemNameFormat(@Nonnull java.lang.String systemName, char type, java.lang.String prefix) Public static method to validate system name format. Logging of handled cases no higher than WARN.- Parameters:
- systemName- system name.
- type- bean type, S for Sensor, T for Turnout, L for Light.
- prefix- system prefix.
- Returns:
- VALID if system name has a valid format, else return INVALID
 
 - 
getUserNameFromSystemNamepublic static java.lang.String getUserNameFromSystemName(java.lang.String systemName, java.lang.String prefix) Public static method to check the user name for a valid system name.- Parameters:
- systemName- system name to check.
- prefix- system prefix.
- Returns:
- "" (null string) if the system name is not valid or does not exist
 
 
- 
 
-