Package jmri.jmrix.ecos
Class EcosLocoAddress
- java.lang.Object
-
- jmri.beans.UnboundBean
-
- jmri.beans.Bean
-
- jmri.jmrix.ecos.EcosLocoAddress
-
- All Implemented Interfaces:
BeanInterface
,PropertyChangeFirer
,PropertyChangeProvider
,LocoAddress
public class EcosLocoAddress extends Bean implements LocoAddress
Stores all the loco information from the ECoS into JMRI
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jmri.LocoAddress
LocoAddress.Protocol
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
_tempEntry
(package private) int
currentSpeed
(package private) java.util.HashMap<java.lang.Integer,java.lang.Integer>
cvValues
(package private) boolean
direction
static int
MFX_DCCAddressOffset
-
Fields inherited from class jmri.beans.Bean
propertyChangeSupport
-
-
Constructor Summary
Constructors Constructor Description EcosLocoAddress(int dCCAddress)
EcosLocoAddress(java.lang.String ecosObject, java.lang.String rosterAtt)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addToRoster()
void
allowAddToRoster()
void
dispose()
void
doNotAddToRoster()
int
getCV(int cv)
java.lang.String
getCVAsString(int cv)
boolean
getDirection()
(package private) boolean
getDirection(java.lang.String line)
java.lang.String
getDirectionAsString()
java.lang.String
getEcosDescription()
java.lang.String
getEcosObject()
int
getEcosObjectAsInt()
java.lang.String
getECOSProtocol()
boolean
getEcosTempEntry()
int
getNumber()
LocoAddress.Protocol
getProtocol()
java.lang.String
getRosterId()
int
getSpeed()
SpeedStepMode
getSpeedStepMode()
void
reply(EcosReply m)
void
setCV(int cv, int value)
protected void
setDirection(boolean dir)
protected void
setDirection(java.lang.String line)
void
setEcosDescription(java.lang.String description)
void
setEcosObject(java.lang.String ecosObject)
void
setEcosTempEntry(boolean boo)
void
setLocoAddress(int dCCAddress)
void
setProtocol(java.lang.String protocol)
void
setRosterId(java.lang.String roster)
protected void
setSpeed(int speed)
-
Methods inherited from class jmri.beans.Bean
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, isNotifyOnEDT, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class jmri.beans.UnboundBean
getIndexedProperty, getProperty, getPropertyNames, hasIndexedProperty, hasProperty, setIndexedProperty, setProperty
-
-
-
-
Field Detail
-
direction
boolean direction
-
currentSpeed
int currentSpeed
-
MFX_DCCAddressOffset
public static int MFX_DCCAddressOffset
-
cvValues
java.util.HashMap<java.lang.Integer,java.lang.Integer> cvValues
-
_tempEntry
boolean _tempEntry
-
-
Constructor Detail
-
EcosLocoAddress
public EcosLocoAddress(int dCCAddress)
-
EcosLocoAddress
public EcosLocoAddress(java.lang.String ecosObject, java.lang.String rosterAtt)
-
-
Method Detail
-
setCV
public void setCV(int cv, int value)
-
getCV
public int getCV(int cv)
-
getCVAsString
public java.lang.String getCVAsString(int cv)
-
setLocoAddress
public void setLocoAddress(int dCCAddress)
-
getNumber
public int getNumber()
- Specified by:
getNumber
in interfaceLocoAddress
- Returns:
- the loco address configured on the ECoS for this loco
-
getEcosObject
public java.lang.String getEcosObject()
- Returns:
- the loco object as a string on the ECOS for this loco
-
getEcosObjectAsInt
public int getEcosObjectAsInt()
- Returns:
- the loco object as a integer on the ECOS for this loco
-
doNotAddToRoster
public void doNotAddToRoster()
-
allowAddToRoster
public void allowAddToRoster()
-
addToRoster
public boolean addToRoster()
-
setSpeed
protected void setSpeed(int speed)
-
getSpeed
public int getSpeed()
-
setDirection
protected void setDirection(java.lang.String line)
-
setDirection
protected void setDirection(boolean dir)
-
getDirection
public boolean getDirection()
-
getDirectionAsString
public java.lang.String getDirectionAsString()
-
setEcosObject
public void setEcosObject(java.lang.String ecosObject)
-
getEcosDescription
public java.lang.String getEcosDescription()
- Returns:
- the loco object description held on the ECOS for this loco
-
setEcosDescription
public void setEcosDescription(java.lang.String description)
-
getRosterId
public java.lang.String getRosterId()
- Returns:
- the JMRI Roster ID for this loco
-
setRosterId
public void setRosterId(java.lang.String roster)
-
getECOSProtocol
public java.lang.String getECOSProtocol()
-
getSpeedStepMode
public SpeedStepMode getSpeedStepMode()
-
setProtocol
public void setProtocol(java.lang.String protocol)
-
getProtocol
public LocoAddress.Protocol getProtocol()
- Specified by:
getProtocol
in interfaceLocoAddress
-
setEcosTempEntry
public void setEcosTempEntry(boolean boo)
-
getEcosTempEntry
public boolean getEcosTempEntry()
-
getDirection
boolean getDirection(java.lang.String line)
-
dispose
public void dispose()
-
-