|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.AbstractMRTrafficController
jmri.jmrix.can.AbstractCanTrafficController
public abstract class AbstractCanTrafficController
Abstract base for TrafficControllers in a CANbus based Message/Reply protocol.
AbstractMRTrafficController is extended to allow for the translation between CAN messages and the message format of the CAN adapter that connects to the layout.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class jmri.jmrix.AbstractMRTrafficController |
|---|
AbstractMRTrafficController.RcvNotifier, AbstractMRTrafficController.XmtNotifier |
| Field Summary |
|---|
| Constructor Summary | |
|---|---|
AbstractCanTrafficController()
|
|
| Method Summary | |
|---|---|
void |
addCanListener(CanListener l)
|
abstract CanReply |
decodeFromHardware(AbstractMRReply m)
|
abstract AbstractMRMessage |
encodeForHardware(CanMessage m)
|
protected AbstractMRMessage |
enterNormalMode()
|
protected AbstractMRMessage |
enterProgMode()
|
protected void |
forwardToPort(AbstractMRMessage m,
AbstractMRListener reply)
Actually transmits the next message to the port Overridden to include translation to the correct CAN hardware message format |
void |
handleOneIncomingReply()
Handle each reply when complete. |
protected abstract AbstractMRMessage |
newMessage()
Get the correct concrete class for the hardware connection message |
protected AbstractMRMessage |
pollMessage()
Invoked if it's appropriate to do low-priority polling of the command station, this should return the next message to send, or null if the TC should just sleep. |
protected AbstractMRListener |
pollReplyHandler()
|
void |
removeCanListener(CanListener l)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface jmri.jmrix.can.CanInterface |
|---|
sendCanMessage, status |
| Constructor Detail |
|---|
public AbstractCanTrafficController()
| Method Detail |
|---|
public void addCanListener(CanListener l)
addCanListener in interface CanInterfacepublic void removeCanListener(CanListener l)
removeCanListener in interface CanInterface
protected void forwardToPort(AbstractMRMessage m,
AbstractMRListener reply)
forwardToPort in class AbstractMRTrafficControllerprotected AbstractMRMessage pollMessage()
AbstractMRTrafficController
pollMessage in class AbstractMRTrafficControllerprotected AbstractMRListener pollReplyHandler()
pollReplyHandler in class AbstractMRTrafficControllerprotected AbstractMRMessage enterProgMode()
enterProgMode in class AbstractMRTrafficControllerprotected AbstractMRMessage enterNormalMode()
enterNormalMode in class AbstractMRTrafficControllerprotected abstract AbstractMRMessage newMessage()
public abstract CanReply decodeFromHardware(AbstractMRReply m)
public abstract AbstractMRMessage encodeForHardware(CanMessage m)
public void handleOneIncomingReply()
throws IOException
Overridden to include translation form the CAN hardware format
handleOneIncomingReply in class AbstractMRTrafficControllerIOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||