Class CbusAllocateNodeNumber

java.lang.Object
jmri.jmrix.can.cbus.node.CbusAllocateNodeNumber
All Implemented Interfaces:
EventListener, AbstractMRListener, CanListener

public class CbusAllocateNodeNumber extends Object implements CanListener
Listens for CBUS Nodes requesting a Node Number, and asks the user for one.

Incoming frames, the node number dialogue and the Set Node Number timeout are all handled on the GUI thread, which owns the allocation state. Once dispose() has been called, frames and timeouts that were already queued for the GUI thread are ignored.

  • Constructor Details

  • Method Details

    • setTimeout

      protected void setTimeout(int newVal)
      Set the SNN timeout, for Testing purposes
      Parameters:
      newVal - Timeout value in ms
    • message

      public void message(CanMessage m)
      If popup not open send a setup param request to try and catch nodes awaiting number allocation when an all node respond message is sent.
      Specified by:
      message in interface CanListener
      Parameters:
      m - Outgoing CanMessage
    • reply

      public void reply(CanReply m)
      Capture CBUS_RQNN, CBUS_PARAMS, CBUS_NNACK, CBUS_NAME
      Specified by:
      reply in interface CanListener
      Parameters:
      m - incoming CanReply
    • dispose

      @InvokeOnAnyThread public void dispose()
      Stop listening and cancel any Set Node Number timeout. Frames and timeouts already queued for the GUI thread are then ignored.