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 booleangetAddCommandStations()Get if should add new command stations heard on network to CBUS Node Manager tablebooleangetAddNodes()Get if should add new nodes heard on network to CBUS Node Manager tablebooleangetAllocateNNListener()Get if should listen on network for new node number requestsintgetBootWriteDelay()Get delay between bootloader data writesintgetMinimumNumBackupsToKeep()Get minimum number of CbusNode XML backups to retainlonggetNodeBackgroundFetchDelay()Get Background delay between CBUS Node Manager data fetch from nodesintgetNodeTableSplit()Get the position of the node table splitintgetProgTrackMode()Get the programming track modebooleangetSaveRestoreEventTable()Get Save Restore CBUS Event TablebooleangetSearchForNodesBackupXmlOnStartup()Get search CBUS node backup directory on startup for node xml filesbooleangetStartupSearchForCs()Get Search for Command stations on CBUS Node Table StartupbooleangetStartupSearchForNodes()Get Search for Nodes on CBUS Node Table StartupbooleanisAddressedModePossible()Get the addressed programmer statebooleanisGlobalProgrammerAvailable()Get the global programmer state(package private) booleanisPreferencesValid()voidsavePreferences()voidsetAddCommandStations(boolean newVal)Set if should add new command stations heard on network to CBUS Node Manager tablevoidsetAddNodes(boolean newVal)Set if should add new nodes heard on network to CBUS Node Manager tablevoidsetAddressedModePossible(boolean state)Set global (service mode) programmer availabilityvoidsetAllocateNNListener(boolean newVal)Set if should listen on network for new node number requestsvoidsetBootWriteDelay(int newVal)Set delay between bootloader data writesvoidsetGlobalProgrammerAvailable(boolean state)Set global (service mode) programmer availabilityvoidsetMinimumNumBackupsToKeep(int newVal)Set minimum number of CbusNode XML backups to retainvoidsetNodeBackgroundFetchDelay(long newVal)Set Background delay between CBUS Node Manager data fetch from nodesvoidsetNodeTableSplit(int pixels)Set the position of the node table split from the top of thw windowvoidsetProgrammersAvailable(boolean global, boolean addressed)Set the programmer typevoidsetProgTrackMode(int mode)Set programming track modevoidsetSaveRestoreEventTable(boolean newVal)Set Save Restore CBUS Event TablevoidsetSearchForNodesBackupXmlOnStartup(boolean newVal)Set search CBUS node backup directory on startup for node xml filesvoidsetStartupSearchForCs(boolean newVal)Set Search for Command stations on CBUS Node Table StartupvoidsetStartupSearchForNodes(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
-
-