|
||||||||||
| 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.lawicell.LawicellTrafficController
public class LawicellTrafficController
Traffic controller for the LAWICELL protocol.
Lawicell adapters use messages transmitted as an ASCII string of up to 24 characters of the form: ;ShhhhNd0d1d2d3d4d5d6d7: The S indicates a standard CAN frame hhhh is the two byte header N or R indicates a normal or remote frame d0 - d7 are the (up to) 8 data bytes
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class jmri.jmrix.AbstractMRTrafficController |
|---|
AbstractMRTrafficController.RcvNotifier, AbstractMRTrafficController.XmtNotifier |
| Field Summary | |
|---|---|
static int |
BOOTMODE
|
static int |
NORMAL
|
| Fields inherited from class jmri.jmrix.can.TrafficController |
|---|
_canid, self |
| Constructor Summary | |
|---|---|
LawicellTrafficController()
|
|
| 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. |
int |
getgcState()
|
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. |
void |
setgcState(int s)
|
| 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 |
| Field Detail |
|---|
public static final int NORMAL
public static final int BOOTMODE
| Constructor Detail |
|---|
public LawicellTrafficController()
| Method Detail |
|---|
protected void forwardMessage(AbstractMRListener client,
AbstractMRMessage m)
forwardMessage in class AbstractMRTrafficController
protected void forwardReply(AbstractMRListener client,
AbstractMRReply r)
forwardReply in class AbstractMRTrafficControllerpublic int getgcState()
public void setgcState(int s)
public 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 | |||||||||