jmri.jmrix.loconet
Class LnSensorManager

java.lang.Object
  extended by jmri.implementation.AbstractManager
      extended by jmri.managers.AbstractSensorManager
          extended by jmri.jmrix.loconet.LnSensorManager
All Implemented Interfaces:
PropertyChangeListener, EventListener, LocoNetListener, Manager, SensorManager

public class LnSensorManager
extends AbstractSensorManager
implements LocoNetListener

Manage the LocoNet-specific Sensor implementation. System names are "LSnnn", where nnn is the sensor number without padding.

Author:
Bob Jacobsen Copyright (C) 2001

Field Summary
 
Fields inherited from class jmri.implementation.AbstractManager
_tsys, _tuser
 
Constructor Summary
LnSensorManager()
           
 
Method Summary
 Sensor createNewSensor(String systemName, String userName)
          Internal method to invoke the factory, after all the logic for returning an existing method has been invoked.
 void dispose()
          Free resources when no longer used.
static LnSensorManager instance()
           
 void message(LocoNetMessage l)
          Member function that will be invoked by a LocoNetInterface implementation to forward a LocoNet message from the layout.
 void setUpdateBusy()
          Method to set Route busy when commands are being issued to Route turnouts
 void setUpdateNotBusy()
          Method to set Route not busy when all commands have been issued to Route turnouts
 char systemLetter()
           
 void updateAll()
          Requests status updates from all layout sensors.
 
Methods inherited from class jmri.managers.AbstractSensorManager
getBySystemName, getByUserName, getSensor, newSensor, normalizeSystemName, provideSensor, typeLetter
 
Methods inherited from class jmri.implementation.AbstractManager
addPropertyChangeListener, deregister, firePropertyChange, getInstanceBySystemName, getInstanceByUserName, getSystemNameArray, getSystemNameList, makeSystemName, propertyChange, register, registerSelf, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jmri.SensorManager
getSystemNameList
 
Methods inherited from interface jmri.Manager
addPropertyChangeListener, deregister, getSystemNameArray, makeSystemName, register, removePropertyChangeListener
 

Constructor Detail

LnSensorManager

public LnSensorManager()
Method Detail

systemLetter

public char systemLetter()
Specified by:
systemLetter in interface Manager
Returns:
The system-specific prefix letter for a specific implementation

instance

public static LnSensorManager instance()

dispose

public void dispose()
Description copied from interface: Manager
Free resources when no longer used. Specifically, remove all references to and from this object, so it can be garbage-collected.

Specified by:
dispose in interface Manager
Specified by:
dispose in interface SensorManager
Overrides:
dispose in class AbstractManager

createNewSensor

public Sensor createNewSensor(String systemName,
                              String userName)
Description copied from class: AbstractSensorManager
Internal method to invoke the factory, after all the logic for returning an existing method has been invoked.

Specified by:
createNewSensor in class AbstractSensorManager
Returns:
new null

message

public void message(LocoNetMessage l)
Description copied from interface: LocoNetListener
Member function that will be invoked by a LocoNetInterface implementation to forward a LocoNet message from the layout.

Specified by:
message in interface LocoNetListener
Parameters:
l - The received LocoNet message. Note that this same object may be presented to multiple users. It should not be modified here.

updateAll

public void updateAll()
Requests status updates from all layout sensors.

Specified by:
updateAll in interface SensorManager
Overrides:
updateAll in class AbstractSensorManager

setUpdateBusy

public void setUpdateBusy()
Method to set Route busy when commands are being issued to Route turnouts


setUpdateNotBusy

public void setUpdateNotBusy()
Method to set Route not busy when all commands have been issued to Route turnouts



Copyright © 1997 - 2009 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads