Class SerialAddress

java.lang.Object
jmri.jmrix.grapevine.SerialAddress

public class SerialAddress
extends Object
Utility Class supporting parsing and testing of Grapevine addresses.

Multiple address formats are supported:

  • Gtnnnxxx where: G is the (multichar) system connection prefix, t is the type code: 'T' for turnouts, 'S' for sensors, 'H' for signal heads and 'L' for lights; nnn is the node address (1-127); xxx is a bit number of the input or output bit (001-999)
  • Gtnnnxxx = (node address x 1000) + bit number.
    Examples: GT1002 (node address 1, bit 2), G1S1003 (node address 1, bit 3), GL11234 (node address 11, bit234)
  • Gtnnnaxxxx where: t is the type code, 'T' for turnouts, 'S' for sensors, 'H' for signal heads and 'L' for lights; nnn is the node address of the input or output bit (1-127); xxxx is a bit number of the input or output bit (1-2048); a is a subtype-specific letter:
    • 'B' for a bit number (e.g. GT12B3 is a shorter form of GT12003)
    • 'a' is for advanced serial occupancy sensors (only valid t = S)
    • 'm' is for advanced serial motion sensors (only valid t = S)
    • 'pattern' is for parallel sensors (only valid t = S)
    • 's' is for serial occupancy sensors (only valid t = S)
    Examples: GT1B2 (node address 1, bit 2), G1S1B3 (node address 1, bit 3), G22L11B234 (node address 11, bit 234)