|
||||||||||
| 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 | |
|---|---|
protected abstract boolean |
checkNodeAddress(int address)
Check for valid address with respect to range, etc. |
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 |
handleTimeout(AbstractMRMessage m)
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. |
abstract boolean |
sensorsActive()
Are there sensors present, and hence this node will need to be polled? |
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 |
|---|
clone, equals, finalize, 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 rangeprotected abstract boolean checkNodeAddress(int address)
public abstract AbstractMRMessage createInitPacket()
public abstract AbstractMRMessage createOutPacket()
public abstract boolean sensorsActive()
public abstract boolean handleTimeout(AbstractMRMessage m)
m - message that didn't receive a reply
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 | |||||||||