Package jmri.jmrix.ecos
Class EcosReporter
- java.lang.Object
-
- jmri.implementation.AbstractNamedBean
-
- jmri.implementation.AbstractReporter
-
- jmri.jmrix.ecos.EcosReporter
-
- All Implemented Interfaces:
java.lang.Comparable<NamedBean>
,PropertyChangeProvider
,NamedBean
,PhysicalLocationReporter
,Reporter
public class EcosReporter extends AbstractReporter implements PhysicalLocationReporter
Extend jmri.AbstractReporter for Ecos Reporters Implemenation for providing status of rail com decoders at this reporter location.The reporter will decode the rail com packets and add the information to the rail com tag.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.NamedBean
NamedBean.BadNameException, NamedBean.BadSystemNameException, NamedBean.BadUserNameException, NamedBean.DisplayOptions, NamedBean.DuplicateSystemNameException
-
Nested classes/interfaces inherited from interface jmri.PhysicalLocationReporter
PhysicalLocationReporter.Direction
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
lastLoco
-
Fields inherited from class jmri.implementation.AbstractReporter
_currentReport, _lastReport
-
Fields inherited from class jmri.implementation.AbstractNamedBean
listenerRefs, mSystemName, register
-
Fields inherited from interface jmri.NamedBean
DISPLAY_NAME_FORMAT, INCONSISTENT, PROPERTY_STATE, QUOTED_NAME_FORMAT, UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description EcosReporter(java.lang.String systemName, java.lang.String userName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
decodeDetails(java.lang.String msg)
PhysicalLocationReporter.Direction
getDirection(java.lang.String rep)
Get the direction (ENTER/EXIT) of the report.LocoAddress
getLocoAddress(java.lang.String rep)
Get the locomotive address we're reporting about from the current report.int
getObjectId()
PhysicalLocation
getPhysicalLocation()
Get the PhysicalLocation of the ReporterPhysicalLocation
getPhysicalLocation(java.lang.String s)
Get the PhysicalLocation of the Reporter.int
getPort()
int
getState()
Provide an int value for use in scripts, etc.void
setObjectPort(int object, int port)
void
setState(int s)
Provide generic access to internal state.-
Methods inherited from class jmri.implementation.AbstractReporter
getBeanType, getCurrentReport, getLastReport, setReport
-
Methods inherited from class jmri.implementation.AbstractNamedBean
addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, describeState, dispose, equals, firePropertyChange, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeListenersByReference, getPropertyKeys, getSystemName, getUserName, hashCode, removeProperty, removePropertyChangeListener, removePropertyChangeListener, setComment, setProperty, setUserName, toString, toStringSuffix, updateListenerRef, vetoableChange
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jmri.NamedBean
addPropertyChangeListener, addPropertyChangeListener, compareSystemNameSuffix, compareTo, describeState, dispose, getComment, getDisplayName, getDisplayName, getListenerRef, getListenerRefs, getNumPropertyChangeListeners, getProperty, getPropertyChangeListenersByReference, getPropertyKeys, getSystemName, getUsageReport, getUserName, removeProperty, setComment, setProperty, setUserName, toString, updateListenerRef, vetoableChange
-
Methods inherited from interface jmri.beans.PropertyChangeProvider
addPropertyChangeListener, addPropertyChangeListener, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Field Detail
-
lastLoco
int lastLoco
-
-
Constructor Detail
-
EcosReporter
public EcosReporter(java.lang.String systemName, java.lang.String userName)
-
-
Method Detail
-
getState
public int getState()
Provide an int value for use in scripts, etc. This will be the numeric locomotive address last seen, unless the last message said the loco was exiting. Note that there may still some other locomotive in the transponding zone!
-
setState
public void setState(int s)
Description copied from interface:NamedBean
Provide generic access to internal state.This generally shouldn't be used by Java code; use the class-specific form instead (e.g. setCommandedState in Turnout). This is provided to make scripts access easier to read.
-
getObjectId
public int getObjectId()
-
getPort
public int getPort()
-
setObjectPort
public void setObjectPort(int object, int port)
-
decodeDetails
public void decodeDetails(java.lang.String msg)
-
getLocoAddress
public LocoAddress getLocoAddress(java.lang.String rep)
Get the locomotive address we're reporting about from the current report. Note: We ignore the string passed in, because Ecos Reporters don't send String type reports.- Specified by:
getLocoAddress
in interfacePhysicalLocationReporter
-
getDirection
public PhysicalLocationReporter.Direction getDirection(java.lang.String rep)
Get the direction (ENTER/EXIT) of the report. Because of the way Ecos. Reporters work (or appear to), all reports are ENTER type.- Specified by:
getDirection
in interfacePhysicalLocationReporter
-
getPhysicalLocation
public PhysicalLocation getPhysicalLocation()
Get the PhysicalLocation of the ReporterReports its own location, for now. Not sure if that's the right thing or not. NOT DONE YET
- Specified by:
getPhysicalLocation
in interfacePhysicalLocationReporter
-
getPhysicalLocation
public PhysicalLocation getPhysicalLocation(java.lang.String s)
Get the PhysicalLocation of the Reporter.- Specified by:
getPhysicalLocation
in interfacePhysicalLocationReporter
- Parameters:
s
- is not used
-
-