Class LnLight

All Implemented Interfaces:
Comparable<NamedBean>, PropertyChangeProvider, DigitalIO, Light, NamedBean

public class LnLight
extends AbstractLight
Implementation of the Light Object for LocoNet

Based in part on SerialLight.java

  • Field Details

  • Constructor Details

    • LnLight

      public LnLight​(String systemName, LnTrafficController tc, LnLightManager mgr)
      Create a Light object, with only system name.

      'systemName' was previously validated in LnLightManager

      Parameters:
      systemName - for the new bean
      tc - the LnTrafficController which handles the messaging
      mgr - the LnLightManager which manages this type of object bean
    • LnLight

      public LnLight​(String systemName, String userName, LnTrafficController tc, LnLightManager mgr)
      Create a Light object, with both system and user names.

      'systemName' was previously validated in LnLightManager

      Parameters:
      systemName - for the new bean
      userName - for the new bean
      tc - the LnTrafficController which handles the messaging
      mgr - the LnLightManager which manages this type of object bean
  • Method Details

    • doNewState

      protected void doNewState​(int oldState, int newState)
      Set the current state of this Light This routine requests the hardware to change.
      Overrides:
      doNewState in class AbstractLight
      Parameters:
      oldState - old state
      newState - new state