Class XNetLight

    • Constructor Detail

      • XNetLight

        public XNetLight​(XNetTrafficController tc,
                         XNetLightManager lm,
                         java.lang.String systemName)
        Create a Light object, with only system name.

        'systemName' was previously validated in LnLightManager

        Parameters:
        tc - the traffic controller for the connection
        lm - the managing LightManager for this Light
        systemName - the system name for this Light
      • XNetLight

        public XNetLight​(XNetTrafficController tc,
                         XNetLightManager lm,
                         java.lang.String systemName,
                         java.lang.String userName)
        Create a Light object, with both system and user names.

        'systemName' was previously validated in XNetLightManager

        Parameters:
        tc - the traffic controller for the connection
        lm - the managing LightManager for this Light
        systemName - the system name for this Light
        userName - the user name for this Light
    • Method Detail

      • setState

        public void setState​(int newState)
        Set the current state of this Light. This routine requests the hardware to change.
        Specified by:
        setState in interface Light
        Specified by:
        setState in interface NamedBean
        Overrides:
        setState in class AbstractLight
        Parameters:
        newState - new state
      • message

        public void message​(XNetReply l)
        Handle an incoming message from the XpressNet. NOTE: We aren't registered as a listener, so this is only triggered when we send out a message.
        Specified by:
        message in interface XNetListener
        Parameters:
        l - the message to handle
      • notifyTimeout

        public void notifyTimeout​(XNetMessage msg)
        Description copied from interface: XNetListener
        Member function invoked by an XNetInterface implementation to notify a sender that an outgoing message timed out and was dropped from the queue.
        Specified by:
        notifyTimeout in interface XNetListener
        Parameters:
        msg - message which has timed out.