Package jmri.jmrix.can.cbus
Class CbusPreferences
- java.lang.Object
-
- jmri.beans.UnboundBean
-
- jmri.beans.Bean
-
- jmri.beans.PreferencesBean
-
- jmri.jmrix.can.cbus.CbusPreferences
-
- All Implemented Interfaces:
BeanInterface
,PropertyChangeFirer
,PropertyChangeProvider
public class CbusPreferences extends PreferencesBean
Preferences for the MERG CBUS connections.
-
-
Field Summary
-
Fields inherited from class jmri.beans.PreferencesBean
DIRTY, RESTART_REQUIRED
-
Fields inherited from class jmri.beans.Bean
propertyChangeSupport
-
-
Constructor Summary
Constructors Constructor Description CbusPreferences()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getAddCommandStations()
Get if should add new command stations heard on network to CBUS Node Manager tableboolean
getAddNodes()
Get if should add new nodes heard on network to CBUS Node Manager tableboolean
getAllocateNNListener()
Get if should listen on network for new node number requestsint
getBootWriteDelay()
Get delay between bootloader data writesint
getMinimumNumBackupsToKeep()
Get minimum number of CbusNode XML backups to retainlong
getNodeBackgroundFetchDelay()
Get Background delay between CBUS Node Manager data fetch from nodesint
getNodeTableSplit()
Get the position of the node table splitint
getProgTrackMode()
Get the programming track modeboolean
getSaveRestoreEventTable()
Get Save Restore CBUS Event Tableboolean
getSearchForNodesBackupXmlOnStartup()
Get search CBUS node backup directory on startup for node xml filesboolean
getStartupSearchForCs()
Get Search for Command stations on CBUS Node Table Startupboolean
getStartupSearchForNodes()
Get Search for Nodes on CBUS Node Table Startupboolean
isAddressedModePossible()
Get the addressed programmer stateboolean
isGlobalProgrammerAvailable()
Get the global programmer state(package private) boolean
isPreferencesValid()
void
savePreferences()
void
setAddCommandStations(boolean newVal)
Set if should add new command stations heard on network to CBUS Node Manager tablevoid
setAddNodes(boolean newVal)
Set if should add new nodes heard on network to CBUS Node Manager tablevoid
setAddressedModePossible(boolean state)
Set global (service mode) programmer availabilityvoid
setAllocateNNListener(boolean newVal)
Set if should listen on network for new node number requestsvoid
setBootWriteDelay(int newVal)
Set delay between bootloader data writesvoid
setGlobalProgrammerAvailable(boolean state)
Set global (service mode) programmer availabilityvoid
setMinimumNumBackupsToKeep(int newVal)
Set minimum number of CbusNode XML backups to retainvoid
setNodeBackgroundFetchDelay(long newVal)
Set Background delay between CBUS Node Manager data fetch from nodesvoid
setNodeTableSplit(int pixels)
Set the position of the node table split from the top of thw windowvoid
setProgrammersAvailable(boolean global, boolean addressed)
Set the programmer typevoid
setProgTrackMode(int mode)
Set programming track modevoid
setSaveRestoreEventTable(boolean newVal)
Set Save Restore CBUS Event Tablevoid
setSearchForNodesBackupXmlOnStartup(boolean newVal)
Set search CBUS node backup directory on startup for node xml filesvoid
setStartupSearchForCs(boolean newVal)
Set Search for Command stations on CBUS Node Table Startupvoid
setStartupSearchForNodes(boolean newVal)
Set Search for Nodes on CBUS Node Table Startup-
Methods inherited from class jmri.beans.PreferencesBean
firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getProfile, isDirty, isRestartRequired, setIsDirty, setRestartRequired
-
Methods inherited from class jmri.beans.Bean
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, isNotifyOnEDT, removePropertyChangeListener, removePropertyChangeListener
-
Methods inherited from class jmri.beans.UnboundBean
getIndexedProperty, getProperty, getPropertyNames, hasIndexedProperty, hasProperty, setIndexedProperty, setProperty
-
-
-
-
Constructor Detail
-
CbusPreferences
public CbusPreferences()
-
-
Method Detail
-
savePreferences
public void savePreferences()
-
isPreferencesValid
boolean isPreferencesValid()
-
getAddCommandStations
public boolean getAddCommandStations()
Get if should add new command stations heard on network to CBUS Node Manager table- Returns:
- true if adding command stations, else false
-
setAddCommandStations
public void setAddCommandStations(boolean newVal)
Set if should add new command stations heard on network to CBUS Node Manager table- Parameters:
newVal
- true if adding command stations, else false
-
getAddNodes
public boolean getAddNodes()
Get if should add new nodes heard on network to CBUS Node Manager table- Returns:
- true if adding nodes, else false
-
setAddNodes
public void setAddNodes(boolean newVal)
Set if should add new nodes heard on network to CBUS Node Manager table- Parameters:
newVal
- true if adding nodes, else false
-
getAllocateNNListener
public boolean getAllocateNNListener()
Get if should listen on network for new node number requests- Returns:
- true if should listen, else false
-
setAllocateNNListener
public void setAllocateNNListener(boolean newVal)
Set if should listen on network for new node number requests- Parameters:
newVal
- true if should listen, else false
-
getNodeBackgroundFetchDelay
public long getNodeBackgroundFetchDelay()
Get Background delay between CBUS Node Manager data fetch from nodes- Returns:
- the delay
-
setNodeBackgroundFetchDelay
public void setNodeBackgroundFetchDelay(long newVal)
Set Background delay between CBUS Node Manager data fetch from nodes- Parameters:
newVal
- in ms can be 0 but defaults to 100ms
-
getStartupSearchForCs
public boolean getStartupSearchForCs()
Get Search for Command stations on CBUS Node Table Startup- Returns:
- true to send CBUS search for CS, else false
-
setStartupSearchForCs
public void setStartupSearchForCs(boolean newVal)
Set Search for Command stations on CBUS Node Table Startup- Parameters:
newVal
- true to send CBUS search for CS, else false
-
getStartupSearchForNodes
public boolean getStartupSearchForNodes()
Get Search for Nodes on CBUS Node Table Startup- Returns:
- true to send CBUS search for nodes, else false
-
setStartupSearchForNodes
public void setStartupSearchForNodes(boolean newVal)
Set Search for Nodes on CBUS Node Table Startup- Parameters:
newVal
- true to send CBUS search for nodes, else false
-
getSaveRestoreEventTable
public boolean getSaveRestoreEventTable()
Get Save Restore CBUS Event TableIf enabled loads CBUS event table data from xml on table startup, and saves data to xml on shutdown.
- Returns:
- true to save and restore, else false
-
setSaveRestoreEventTable
public void setSaveRestoreEventTable(boolean newVal)
Set Save Restore CBUS Event Table- Parameters:
newVal
- true to save and restore, else false
-
getSearchForNodesBackupXmlOnStartup
public boolean getSearchForNodesBackupXmlOnStartup()
Get search CBUS node backup directory on startup for node xml files- Returns:
- true to search, else false
-
setSearchForNodesBackupXmlOnStartup
public void setSearchForNodesBackupXmlOnStartup(boolean newVal)
Set search CBUS node backup directory on startup for node xml files- Parameters:
newVal
- true to lookup node xml files, else false
-
getMinimumNumBackupsToKeep
public int getMinimumNumBackupsToKeep()
Get minimum number of CbusNode XML backups to retain- Returns:
- number of backups, defaults to 10
-
setMinimumNumBackupsToKeep
public void setMinimumNumBackupsToKeep(int newVal)
Set minimum number of CbusNode XML backups to retain- Parameters:
newVal
- the new number of backups
-
getBootWriteDelay
public int getBootWriteDelay()
Get delay between bootloader data writes- Returns:
- delay, in ms, defaults to CbusNode.BOOT_PROG_TIMEOUT_FAST
-
setBootWriteDelay
public void setBootWriteDelay(int newVal)
Set delay between bootloader data writes- Parameters:
newVal
- the delay in ms
-
isGlobalProgrammerAvailable
public boolean isGlobalProgrammerAvailable()
Get the global programmer state- Returns:
- global programmer state
-
isAddressedModePossible
public boolean isAddressedModePossible()
Get the addressed programmer state- Returns:
- addressed programmer state
-
setGlobalProgrammerAvailable
public void setGlobalProgrammerAvailable(boolean state)
Set global (service mode) programmer availability- Parameters:
state
- true if available
-
setAddressedModePossible
public void setAddressedModePossible(boolean state)
Set global (service mode) programmer availability- Parameters:
state
- true if available
-
setProgrammersAvailable
public void setProgrammersAvailable(boolean global, boolean addressed)
Set the programmer type- Parameters:
global
- true if global (service mode) programmer is availableaddressed
- thru if addressed (ops mode) programmer is available
-
getProgTrackMode
public int getProgTrackMode()
Get the programming track mode- Returns:
- the mode
-
setProgTrackMode
public void setProgTrackMode(int mode)
Set programming track mode- Parameters:
mode
- to be set
-
getNodeTableSplit
public int getNodeTableSplit()
Get the position of the node table split- Returns:
- position in pixels
-
setNodeTableSplit
public void setNodeTableSplit(int pixels)
Set the position of the node table split from the top of thw window- Parameters:
pixels
- new position
-
-