Class AcelaLight

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

public class AcelaLight
extends AbstractLight
AcelaLight.java

Implementation of the Light Object for Acela

Based in part on SerialTurnout.java

  • Field Details

  • Constructor Details

    • AcelaLight

      public AcelaLight​(String systemName, AcelaSystemConnectionMemo memo)
      Create a Light object, with only system name.

      'systemName' was previously validated in AcelaLightManager

      Parameters:
      systemName - the system name for this Light
      memo - the memo for the system connection
    • AcelaLight

      public AcelaLight​(String systemName, String userName, AcelaSystemConnectionMemo memo)
      Create a Light object, with both system and user names.

      'systemName' was previously validated in AcelaLightManager

      Parameters:
      systemName - the system name for this Light
      userName - the user name for this Light
      memo - the memo for the system connection
  • Method Details

    • setState

      public void setState​(int newState)
      Set the current state of this Light. This routine requests the hardware to change. If this is really a change in state of this bit (tested in AcelaNode), a Transmit packet will be sent before this Node is next polled.
      Specified by:
      setState in interface Light
      Specified by:
      setState in interface NamedBean
      Overrides:
      setState in class AbstractLight
      Parameters:
      newState - new state