Class Lnsv1DevicesManager
- java.lang.Object
-
- jmri.beans.PropertyChangeSupport
-
- jmri.jmrix.loconet.Lnsv1DevicesManager
-
- All Implemented Interfaces:
java.util.EventListener
,PropertyChangeFirer
,PropertyChangeProvider
,LocoNetListener
public class Lnsv1DevicesManager extends PropertyChangeSupport implements LocoNetListener
LocoNet LNSV1 Devices ManagerA centralized resource to help identify LocoNet "LNSV1 Format" devices and "manage" them.
Supports the following features: - LNSV1 "discovery" process supported via BROADCAST call - LNSV1 Device "destination address" change supported by writing a new value to LNSV 0 (close session next) - LNSV1 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 LNSVf1 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 Modifier and Type Class Description static class
Lnsv1DevicesManager.ProgrammingResult
-
Field Summary
-
Fields inherited from class jmri.beans.PropertyChangeSupport
propertyChangeSupport
-
-
Constructor Summary
Constructors Constructor Description Lnsv1DevicesManager(LocoNetSystemConnectionMemo memo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearDevicesList()
Lnsv1Device
getDevice(int vrs, int addr)
int
getDeviceCount()
Lnsv1Devices
getDeviceList()
void
message(LocoNetMessage m)
Extract module information from a LNSVf1 READ_ONE REPLY message.Lnsv1DevicesManager.ProgrammingResult
prepareForSymbolicProgrammer(Lnsv1Device dev, ProgrammingTool t)
-
Methods inherited from class jmri.beans.PropertyChangeSupport
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
-
-
-
-
Constructor Detail
-
Lnsv1DevicesManager
public Lnsv1DevicesManager(LocoNetSystemConnectionMemo memo)
-
-
Method Detail
-
getDeviceList
public Lnsv1Devices getDeviceList()
-
getDeviceCount
public int getDeviceCount()
-
clearDevicesList
public void clearDevicesList()
-
message
public void message(LocoNetMessage m)
Extract module information from a LNSVf1 READ_ONE REPLY message. If not already in the lnsv1Devices list, try to find a matching decoder definition (by address number and programming mode) and add it. Skip if already in the list.- Specified by:
message
in 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
public Lnsv1Device getDevice(int vrs, int addr)
-
prepareForSymbolicProgrammer
public Lnsv1DevicesManager.ProgrammingResult prepareForSymbolicProgrammer(Lnsv1Device dev, ProgrammingTool t)
-
-