|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.AbstractMRTrafficController
jmri.jmrix.lenz.XNetTrafficController
jmri.jmrix.lenz.XNetTrafficRouter
public class XNetTrafficRouter
Implements a XNetInterface by doing a scatter-gather to another, simpler implementation.
This is intended for remote operation, where only one copy of each message should go to/from another node. By putting a LnTrafficRouter implementation at the remote node, all of the routing of messages to multiple consumers can be done without traffic over the connection.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class jmri.jmrix.AbstractMRTrafficController |
|---|
AbstractMRTrafficController.RcvNotifier, AbstractMRTrafficController.XmtNotifier |
| Field Summary |
|---|
| Fields inherited from class jmri.jmrix.lenz.XNetTrafficController |
|---|
mListenerMasks |
| Fields inherited from interface jmri.jmrix.lenz.XNetInterface |
|---|
ALL, COMMINFO, CONSIST, CS_INFO, FEEDBACK, INTERFACE, PROGRAMMING, THROTTLE |
| Constructor Summary | |
|---|---|
XNetTrafficRouter(LenzCommandStation pCommandStation)
|
|
| Method Summary | |
|---|---|
void |
connect(XNetInterface i)
Make connection to existing XNetInterface object for upstream communication. |
void |
disconnectPort(XNetInterface i)
Break connection to upstream LocoNetInterface object. |
void |
message(XNetMessage l)
Member function that will be invoked by a XNetInterface implementation to forward a XNet message sent to the layout. |
void |
message(XNetReply m)
Receive a XNet message from upstream and forward it to all the local clients. |
protected void |
notify(XNetReply m)
Forward a XNetMessage to all registered listeners. |
void |
notifyTimeout(XNetMessage msg)
Member function invoked by an XNetInterface implementation to notify * a sender that an outgoing message timed out and was dropped from the * queue. |
void |
sendXNetMessage(XNetMessage m,
XNetListener replyTo)
Forward a preformatted XNetMessage to the actual interface. |
boolean |
status()
|
| Methods inherited from class jmri.jmrix.lenz.XNetTrafficController |
|---|
addXNetListener, endOfMessage, enterNormalMode, enterProgMode, forwardMessage, forwardReply, getCommandStation, getSystemConnectionMemo, handleTimeout, instance, loadChars, newReply, pollMessage, pollReplyHandler, programmerIdle, removeXNetListener, sendHighPriorityXNetMessage, setInstance, setSystemConnectionMemo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XNetTrafficRouter(LenzCommandStation pCommandStation)
| Method Detail |
|---|
public boolean status()
status in interface XNetInterfacestatus in class XNetTrafficController
public void sendXNetMessage(XNetMessage m,
XNetListener replyTo)
sendXNetMessage in interface XNetInterfacesendXNetMessage in class XNetTrafficControllerm - Message to send; will be updated with CRCpublic void message(XNetReply m)
message in interface XNetListenerm - The received XNet message. Note that this same object
may be presented to multiple users. It should not be
modified here.public void message(XNetMessage l)
XNetListener
message in interface XNetListenerl - The received XNet message. Note that this same object
may be presented to multiple users. It should not be
modified here.public void notifyTimeout(XNetMessage msg)
XNetListener
notifyTimeout in interface XNetListenerpublic void connect(XNetInterface i)
i - Interface to be connectedpublic void disconnectPort(XNetInterface i)
i - previously connected interfaceprotected void notify(XNetReply m)
m - Message to forward. Listeners should not modify it!
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||