Class LncvDevicesManager
- All Implemented Interfaces:
EventListener,PropertyChangeFirer,PropertyChangeProvider,Disposable,LocoNetListener
A centralized resource to help identify LocoNet "LNCV Format" devices and "manage" them.
Supports the following features: - LNCV "discovery" process supported via PROG_START_ALL call - LNCV Device "destination address" change supported by writing a new value to LNCV 0 (close session next) - LNCV Device "reconfigure/reset" not supported/documented - identification of devices with conflicting "destination address"es (warning before program start) - identification of a matching JMRI "decoder definition" for each discovered device, if an appropriate definition exists (only 1 value is matched, checks for LNCV protocol support) - identification of matching JMRI "roster entry" which matches each discovered device, if an appropriate roster entry exists - ability to open a symbolic programmer for a given discovered device, if an appropriate roster entry exists
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupport -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddispose()Called when disposing of a disposable.getDevice(int art, int addr) intvoidExtract module information from LNCV READREPLY/READREPLY2 message, if not already in the lncvDevices list, try to find a matching decoder definition (by article number) and add it.Methods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
Field Details
-
ROSTER_THREAD_NAME
- See Also:
-
-
Constructor Details
-
LncvDevicesManager
-
-
Method Details
-
getDeviceList
-
getDeviceCount
-
clearDevicesList
-
message
Extract module information from LNCV READREPLY/READREPLY2 message, if not already in the lncvDevices list, try to find a matching decoder definition (by article number) and add it. Skip if already in the list.- Specified by:
messagein interfaceLocoNetListener- Parameters:
m- The received LocoNet message. Note that this same object may be presented to multiple users. It should not be modified here.
-
getDevice
-
prepareForSymbolicProgrammer
-
dispose
Description copied from interface:DisposableCalled when disposing of a disposable.Note there are no assurances this method will not be called multiple times against a single instance of this Disposable. It is the responsibility of this Disposable to protect itself and the application from ensuring that calling this method multiple times has no unwanted side effects.
- Specified by:
disposein interfaceDisposable
-