|
||||||||||
| 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
jmri.jmrix.can.TrafficController
jmri.jmrix.can.adapters.loopback.LoopbackTrafficController
public class LoopbackTrafficController
Traffic controller for loopback CAN simulation.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class jmri.jmrix.AbstractMRTrafficController |
|---|
AbstractMRTrafficController.RcvNotifier, AbstractMRTrafficController.XmtNotifier |
| Field Summary |
|---|
| Fields inherited from class jmri.jmrix.can.TrafficController |
|---|
_canid, self |
| Constructor Summary | |
|---|---|
LoopbackTrafficController()
|
|
| Method Summary | |
|---|---|
protected void |
addTrailerToOutput(byte[] msg,
int offset,
AbstractMRMessage m)
Add trailer to the outgoing byte stream. |
CanReply |
decodeFromHardware(AbstractMRReply m)
Make a CanReply from a system-specific reply |
AbstractMRMessage |
encodeForHardware(CanMessage m)
Encode a CanMessage for the hardware |
protected boolean |
endOfMessage(AbstractMRReply r)
|
protected void |
forwardMessage(AbstractMRListener client,
AbstractMRMessage m)
Forward a CanMessage to all registered CanInterface listeners. |
protected void |
forwardReply(AbstractMRListener client,
AbstractMRReply r)
Forward a CanReply to all registered CanInterface listeners. |
static TrafficController |
instance()
static function returning the CanTrafficController instance to use. |
boolean |
isBootMode()
|
protected int |
lengthOfByteStream(AbstractMRMessage m)
Determine how much many bytes the entire message will take, including space for header and trailer |
protected AbstractMRMessage |
newMessage()
Get the correct concrete class for the hardware connection message |
protected AbstractMRReply |
newReply()
|
void |
sendCanMessage(CanMessage m,
CanListener reply)
Forward a preformatted message to the actual interface. |
| Methods inherited from class jmri.jmrix.can.TrafficController |
|---|
getCanid, setInstance |
| Methods inherited from class jmri.jmrix.can.AbstractCanTrafficController |
|---|
addCanListener, enterNormalMode, enterProgMode, forwardToPort, handleOneIncomingReply, pollMessage, pollReplyHandler, removeCanListener |
| 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 |
|---|
status |
| Constructor Detail |
|---|
public LoopbackTrafficController()
| Method Detail |
|---|
protected void forwardMessage(AbstractMRListener client,
AbstractMRMessage m)
forwardMessage in class AbstractMRTrafficController
protected void forwardReply(AbstractMRListener client,
AbstractMRReply r)
forwardReply in class AbstractMRTrafficControllerpublic boolean isBootMode()
public void sendCanMessage(CanMessage m,
CanListener reply)
m - Message to be sent.reply - Listener to be notified of reply.
protected void addTrailerToOutput(byte[] msg,
int offset,
AbstractMRMessage m)
addTrailerToOutput in class AbstractMRTrafficControllermsg - The output byte streamoffset - the first byte not yet usedprotected int lengthOfByteStream(AbstractMRMessage m)
lengthOfByteStream in class AbstractMRTrafficControllerm - The message to be sent
public static TrafficController instance()
protected AbstractMRMessage newMessage()
AbstractCanTrafficController
newMessage in class AbstractCanTrafficControllerpublic CanReply decodeFromHardware(AbstractMRReply m)
decodeFromHardware in class AbstractCanTrafficControllerpublic AbstractMRMessage encodeForHardware(CanMessage m)
encodeForHardware in class AbstractCanTrafficControllerprotected AbstractMRReply newReply()
newReply in class AbstractMRTrafficControllerprotected boolean endOfMessage(AbstractMRReply r)
endOfMessage in class AbstractMRTrafficController
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||