Package org.bidib.wizard.mvc.loco.model
Class LocoModel
- java.lang.Object
-
- com.jgoodies.common.bean.Bean
-
- org.bidib.wizard.mvc.loco.model.LocoModel
-
- All Implemented Interfaces:
com.jgoodies.common.bean.ObservableBean,com.jgoodies.common.bean.ObservableBean2,Serializable
public class LocoModel extends com.jgoodies.common.bean.Bean- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringPROPERTYNAME_ACTIVE_BASEstatic StringPROPERTYNAME_ADDRESSstatic StringPROPERTYNAME_CARCONTROLENABLEDstatic StringPROPERTYNAME_COUNTER_CS_BIN_STATEstatic StringPROPERTYNAME_COUNTER_CS_DRIVEstatic StringPROPERTYNAME_COUNTER_CS_DRIVE_ACKstatic StringPROPERTYNAME_DEV_BINSTATE_NUMBERstatic StringPROPERTYNAME_DEV_BINSTATE_VALUEstatic StringPROPERTYNAME_REPORTED_CELLNUMBERstatic StringPROPERTYNAME_REPORTED_SPEEDstatic StringPROPERTYNAME_SPEED
-
Constructor Summary
Constructors Constructor Description LocoModel()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLocoModelListener(LocoModelListener l)RfBasisModegetActiveBase()IntegergetAddress()intgetCounterCsBinState()intgetCounterCsDrive()intgetCounterCsDriveAck()IntegergetDevBinStateNumber()BinStateValuegetDevBinStateValue()org.bidib.wizard.model.status.DirectionStatusgetDirection()intgetDynStateEnergy()booleangetFunction(int index)BitSetgetFunctions()RfBasisModegetPrevActiveBase()IntegergetReportedCellNumber()IntegergetReportedSpeed()IntegergetSpeed()org.bidib.wizard.model.status.SpeedStepsgetSpeedSteps()intincCounterCsBinState()Increment the CS binState counter by 1.intincCounterCsDrive()Increment the CS drive counter by 1.intincCounterCsDriveAck()Increment the CS drive ack counter by 1.booleanisCarControlEnabled()voidremoveLocoModelListener(LocoModelListener l)voidresetCounterCsAckDrive()Reset the CS drive ack counter.voidresetCounterCsBinState()Reset the CS binState counter.voidresetCounterCsDrive()Reset the CS drive counter.voidresetPrevActiveBase()Reset the prev active base.voidsetActiveBase(RfBasisMode activeBase)voidsetAddress(Integer address)voidsetBinaryState(int state, boolean value)voidsetCarControlEnabled(boolean carControlEnabled)voidsetDevBinStateNumber(Integer devBinStateNumber)voidsetDevBinStateValue(BinStateValue devBinStateValue)voidsetDirection(org.bidib.wizard.model.status.DirectionStatus direction)voidsetDynStateEnergy(int dynStateEnergy)voidsetFunction(int index, boolean value)voidsetReportedCellNumber(Integer reportedCellNumber)voidsetReportedSpeed(Integer reportedSpeed)voidsetSpeed(Integer speed)voidsetSpeedSteps(org.bidib.wizard.model.status.SpeedSteps speedSteps)-
Methods inherited from class com.jgoodies.common.bean.Bean
addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, createPropertyChangeSupport, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, fireMultiplePropertiesChanged, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, fireVetoableChange, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener
-
-
-
-
Field Detail
-
PROPERTYNAME_SPEED
public static final String PROPERTYNAME_SPEED
- See Also:
- Constant Field Values
-
PROPERTYNAME_ADDRESS
public static final String PROPERTYNAME_ADDRESS
- See Also:
- Constant Field Values
-
PROPERTYNAME_ACTIVE_BASE
public static final String PROPERTYNAME_ACTIVE_BASE
- See Also:
- Constant Field Values
-
PROPERTYNAME_REPORTED_CELLNUMBER
public static final String PROPERTYNAME_REPORTED_CELLNUMBER
- See Also:
- Constant Field Values
-
PROPERTYNAME_REPORTED_SPEED
public static final String PROPERTYNAME_REPORTED_SPEED
- See Also:
- Constant Field Values
-
PROPERTYNAME_CARCONTROLENABLED
public static final String PROPERTYNAME_CARCONTROLENABLED
- See Also:
- Constant Field Values
-
PROPERTYNAME_DEV_BINSTATE_NUMBER
public static final String PROPERTYNAME_DEV_BINSTATE_NUMBER
- See Also:
- Constant Field Values
-
PROPERTYNAME_DEV_BINSTATE_VALUE
public static final String PROPERTYNAME_DEV_BINSTATE_VALUE
- See Also:
- Constant Field Values
-
PROPERTYNAME_COUNTER_CS_DRIVE
public static final String PROPERTYNAME_COUNTER_CS_DRIVE
- See Also:
- Constant Field Values
-
PROPERTYNAME_COUNTER_CS_DRIVE_ACK
public static final String PROPERTYNAME_COUNTER_CS_DRIVE_ACK
- See Also:
- Constant Field Values
-
PROPERTYNAME_COUNTER_CS_BIN_STATE
public static final String PROPERTYNAME_COUNTER_CS_BIN_STATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
addLocoModelListener
public void addLocoModelListener(LocoModelListener l)
-
removeLocoModelListener
public void removeLocoModelListener(LocoModelListener l)
-
getAddress
public Integer getAddress()
-
setAddress
public void setAddress(Integer address)
-
getReportedSpeed
public Integer getReportedSpeed()
-
setReportedSpeed
public void setReportedSpeed(Integer reportedSpeed)
-
getDirection
public org.bidib.wizard.model.status.DirectionStatus getDirection()
-
setDirection
public void setDirection(org.bidib.wizard.model.status.DirectionStatus direction)
-
getFunction
public boolean getFunction(int index)
-
getFunctions
public BitSet getFunctions()
-
setFunction
public void setFunction(int index, boolean value)
-
getDynStateEnergy
public int getDynStateEnergy()
-
setDynStateEnergy
public void setDynStateEnergy(int dynStateEnergy)
-
getSpeedSteps
public org.bidib.wizard.model.status.SpeedSteps getSpeedSteps()
-
setSpeedSteps
public void setSpeedSteps(org.bidib.wizard.model.status.SpeedSteps speedSteps)
-
getSpeed
public Integer getSpeed()
-
setSpeed
public void setSpeed(Integer speed)
-
setBinaryState
public void setBinaryState(int state, boolean value)
-
isCarControlEnabled
public boolean isCarControlEnabled()
- Returns:
- the carControlEnabled
-
setCarControlEnabled
public void setCarControlEnabled(boolean carControlEnabled)
- Parameters:
carControlEnabled- the carControlEnabled to set
-
getActiveBase
public RfBasisMode getActiveBase()
- Returns:
- the activeBase
-
setActiveBase
public void setActiveBase(RfBasisMode activeBase)
- Parameters:
activeBase- the activeBase to set
-
getPrevActiveBase
public RfBasisMode getPrevActiveBase()
- Returns:
- the previous activeBase
-
resetPrevActiveBase
public void resetPrevActiveBase()
Reset the prev active base.
-
getReportedCellNumber
public Integer getReportedCellNumber()
- Returns:
- the reportedCellNumber
-
setReportedCellNumber
public void setReportedCellNumber(Integer reportedCellNumber)
- Parameters:
reportedCellNumber- the reportedCellNumber to set
-
getDevBinStateNumber
public Integer getDevBinStateNumber()
- Returns:
- the devBinStateNumber
-
setDevBinStateNumber
public void setDevBinStateNumber(Integer devBinStateNumber)
- Parameters:
devBinStateNumber- the devBinStateNumber to set
-
getDevBinStateValue
public BinStateValue getDevBinStateValue()
- Returns:
- the devBinStateValue
-
setDevBinStateValue
public void setDevBinStateValue(BinStateValue devBinStateValue)
- Parameters:
devBinStateValue- the devBinStateValue to set
-
getCounterCsDrive
public int getCounterCsDrive()
- Returns:
- the counterCsDrive
-
incCounterCsDrive
public int incCounterCsDrive()
Increment the CS drive counter by 1.
-
resetCounterCsDrive
public void resetCounterCsDrive()
Reset the CS drive counter.
-
getCounterCsDriveAck
public int getCounterCsDriveAck()
- Returns:
- the counterCsDriveAck
-
incCounterCsDriveAck
public int incCounterCsDriveAck()
Increment the CS drive ack counter by 1.
-
resetCounterCsAckDrive
public void resetCounterCsAckDrive()
Reset the CS drive ack counter.
-
getCounterCsBinState
public int getCounterCsBinState()
- Returns:
- the counterCsBinState
-
incCounterCsBinState
public int incCounterCsBinState()
Increment the CS binState counter by 1.
-
resetCounterCsBinState
public void resetCounterCsBinState()
Reset the CS binState counter.
-
-