jmri.jmrix.openlcb
Class OlcbAddress

java.lang.Object
  extended by jmri.jmrix.openlcb.OlcbAddress

public class OlcbAddress
extends Object

Utilities for handling OpenLCB event messages as addresses.

OpenLCB event messages have header information, plus an EventID in the data part. JMRI maps these into address strings.

Forms:

Full hex string preceeded by "x"
Needs to be pairs of digits: 0123, not 123
Full 8 byte ID as pairs separated by "."

Author:
Bob Jacobsen Copyright (C) 2008, 2010

Constructor Summary
OlcbAddress(String s)
          Construct from string without leading system or type letters
 
Method Summary
 boolean check()
           
 boolean checkSplit()
           
 boolean equals(Object r)
          Two addresses are equal if they result in the same numeric contents
 int hashCode()
           
 CanMessage makeMessage()
           
 OlcbAddress[] split()
          Split a string containing one or more addresses into individual ones.
 String toCanonicalString()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OlcbAddress

public OlcbAddress(String s)
Construct from string without leading system or type letters

Method Detail

equals

public boolean equals(Object r)
Two addresses are equal if they result in the same numeric contents

Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

makeMessage

public CanMessage makeMessage()

check

public boolean check()

split

public OlcbAddress[] split()
Split a string containing one or more addresses into individual ones.

Returns:
null if entire string can't be parsed.

checkSplit

public boolean checkSplit()

toString

public String toString()
Overrides:
toString in class Object

toCanonicalString

public String toCanonicalString()


Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads