IdTag is a pre-parsed representation of an identification message from the layout. One use of an IdTag is a device that might be attached to any specific piece of rolling stock to uniquely identify it.
- Digitrax Transponding Decoders
- RailCom tags
Each IdTag contains the following information:
- A System Name
- A User Name (which may be null)
- A TagID
- A reference to the last reporter to see the tag, which may be null
- The date and time the last reporter saw the tag, which may be null
- A list of key/value pairs holding properties
"Seen" is defined as a Reporter has indicated that the IdTag is within the area served by that Reporter. "Seen" is not updated to a Reporter reports that the IdTag is leaving that area.
The system name is of the form "sDxxxx" where "xxxx" is the same value as the TagID and "s" is the system prefix for the relevant Reporter (for Reporter-type-specific tags) or "I" in the more general case.
The list of key value pairs is maintained by the reporters parsing and updating the list. This information may vary between implementations.
This file is part of JMRI.
JMRI is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation. See the "COPYING" file for a copy of this license.
JMRI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Fields Modifier and Type Field Description
SEENConstant representing a "seen" state, indicating that the tag has been seen.
UNSEENConstant representing an "unseen" state, indicating that the ID tag has not yet been seen.
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
getTagID()Retrieve a string representation of this tag ID
getWhenLastSeen()Return the Date/Time when this tag was last seen, or null if not yet seen
getWhereLastSeen()Return the Reporter that last saw this tag, or null if not yet seen
load(Element e)Load contents of IdTag object from an XML element
setWhereLastSeen(Reporter reporter)Set the Reporter that last saw this tag.
store(boolean storeState)Store the contents of this IdTag object as an XML element
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, dispose, getBeanType, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getState, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setState, setUserName, toString, updateListenerRef, vetoableChange
static final int UNSEENConstant representing an "unseen" state, indicating that the ID tag has not yet been seen.
- See Also:
- Constant Field Values
getTagIDRetrieve a string representation of this tag ID
This is the system name without the identifier
- the tag ID
void setWhereLastSeen(Reporter reporter)Set the Reporter that last saw this tag.
Also sets the Date/Time when last seen
getWhereLastSeenReturn the Reporter that last saw this tag, or null if not yet seen
- Reporter object where last seen, or null
@CheckForNull java.util.Date getWhenLastSeen()Return the Date/Time when this tag was last seen, or null if not yet seen
- Date object when last seen, or null
storeStore the contents of this IdTag object as an XML element
storeState- Determine if the state of this IdTag should be stored
- Element with IdTag contents