jmri.jmrix
Class AbstractMRNodeTrafficController

Show UML class diagram
java.lang.Object
  extended by jmri.jmrix.AbstractMRTrafficController
      extended by jmri.jmrix.AbstractMRNodeTrafficController
Direct Known Subclasses:
AcelaTrafficController, SerialTrafficController, SerialTrafficController, SerialTrafficController, SerialTrafficController, SerialTrafficController

public abstract class AbstractMRNodeTrafficController
extends AbstractMRTrafficController

Abstract Traffic Controller base class for those implementations that track a set of nodes.

The nodes are descendents of AbstractNode. Provides node management services, but no additional protocol.


Field Summary
 
Fields inherited from class jmri.jmrix.AbstractMRTrafficController
AUTORETRYSTATE, controller, IDLESTATE, NORMALMODE, NOTIFIEDSTATE, OKSENDMSGSTATE, POLLSTATE, PROGRAMINGMODE, WAITMSGREPLYSTATE, WAITREPLYINNORMMODESTATE, WAITREPLYINPROGMODESTATE
 
Constructor Summary
AbstractMRNodeTrafficController()
          Creates a new instance of AbstractMRNodeTrafficController
 
Method Summary
 void deleteNode(int nodeAddress)
          Public method to delete a Serial node by node address
 AbstractNode getNode(int index)
          Public method to return the Serial node with a given index Note: To cycle through all nodes, begin with index=0, and increment your index at each call.
 AbstractNode getNodeFromAddress(int addr)
          Public method to identify a SerialNode from its node address Note: 'addr' is the node address, numbered from 0.
 int getNumNodes()
          Get the number of currently registered nodes
 void registerNode(AbstractNode node)
          Public method to register a Serial node
 
Methods inherited from class jmri.jmrix.AbstractMRTrafficController
connectPort, disconnectPort, getPortName, getSelfLock, handleOneIncomingReply, hasTimeouts, portReadyToSend, receiveLoop, status
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMRNodeTrafficController

public AbstractMRNodeTrafficController()
Creates a new instance of AbstractMRNodeTrafficController

Method Detail

getNumNodes

public int getNumNodes()
Get the number of currently registered nodes


registerNode

public void registerNode(AbstractNode node)
Public method to register a Serial node


getNode

public AbstractNode getNode(int index)
Public method to return the Serial node with a given index Note: To cycle through all nodes, begin with index=0, and increment your index at each call. When index exceeds the number of defined nodes, this routine returns 'null'.


getNodeFromAddress

public AbstractNode getNodeFromAddress(int addr)
Public method to identify a SerialNode from its node address Note: 'addr' is the node address, numbered from 0. Returns 'null' if a SerialNode with the specified address was not found


deleteNode

public void deleteNode(int nodeAddress)
Public method to delete a Serial node by node address



Copyright © 1997 - 2010 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