|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.AbstractNode
public abstract class AbstractNode
Basic implementation of a node for JMRI protocol support.
Integrated with AbstractMRNodeTrafficController.
| Field Summary | |
|---|---|
int |
nodeAddress
|
| Constructor Summary | |
|---|---|
AbstractNode()
Creates a new instance of AbstractNode |
|
| Method Summary | |
|---|---|
abstract AbstractMRMessage |
createInitPacket()
Create the needed Initialization packet (AbstractMRMessage) for this node. |
abstract AbstractMRMessage |
createOutPacket()
Create an Transmit packet (AbstractMRMessage) to send current state |
int |
getNodeAddress()
Public method to return the node address. |
abstract boolean |
getSensorsActive()
Are there sensors present, and hence this node will need to be polled? |
abstract boolean |
handleTimeout(AbstractMRMessage m,
AbstractMRListener l)
Deal with a timeout in the transmission controller. |
boolean |
mustSend()
Return state of needSend flag. |
void |
resetMustSend()
Public to reset state of needSend flag. |
abstract void |
resetTimeout(AbstractMRMessage m)
A reply was received, so there was not timeout, do any needed processing. |
void |
setMustSend()
Public to set state of needSend flag. |
void |
setNodeAddress(int address)
Public method to set the node address. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int nodeAddress
| Constructor Detail |
|---|
public AbstractNode()
| Method Detail |
|---|
public int getNodeAddress()
public void setNodeAddress(int address)
IllegalArgumentException - if out of rangepublic abstract AbstractMRMessage createInitPacket()
public abstract AbstractMRMessage createOutPacket()
public abstract boolean getSensorsActive()
public abstract boolean handleTimeout(AbstractMRMessage m,
AbstractMRListener l)
m - message that didn't receive a replyl - listener that sent the message
public abstract void resetTimeout(AbstractMRMessage m)
public boolean mustSend()
public void resetMustSend()
public void setMustSend()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||