Package jmri.jmrix.roco.z21
Class Z21XPressNetTunnel
java.lang.Object
jmri.jmrix.roco.z21.Z21XPressNetTunnel
- All Implemented Interfaces:
Runnable,EventListener,AbstractMRListener,XNetListener,Z21Listener
Interface between z21 messages and an XpressNet stream.
Parts of this code are derived from the jmri.jmrix.lenz.xnetsimulator.XNetSimulatorAdapter class.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBuild a new XpressNet tunnel. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()(package private) XNetStreamPortControllerPackage protected method to retrieve the stream port controller associated with this tunnel.voidmessage(XNetMessage msg) Member function that will be invoked by a XNetInterface implementation to forward a XNet message sent to the layout.voidMember function that will be invoked by a XNetInterface implementation to forward a XNet message from the layout.voidmessage(Z21Message msg) Member function that will be invoked by a z21Interface implementation to forward a z21 message sent to the layout.voidnotifyTimeout(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.voidMember function that will be invoked by a z21Interface implementation to forward a z21 message from the layout.voidrun()(package private) voidPackage protected method to set the stream port controller associated with this tunnel.
-
Field Details
-
xsc
-
-
Constructor Details
-
Z21XPressNetTunnel
Build a new XpressNet tunnel.- Parameters:
memo- system connection.
-
-
Method Details
-
run
-
reply
Member function that will be invoked by a z21Interface implementation to forward a z21 message from the layout.- Specified by:
replyin interfaceZ21Listener- Parameters:
msg- The received z21 message. Note that this same object may be presented to multiple users. It should not be modified here.
-
message
Member function that will be invoked by a z21Interface implementation to forward a z21 message sent to the layout. Normally, this function will do nothing.- Specified by:
messagein interfaceZ21Listener- Parameters:
msg- The received z21 message. Note that this same object may be presented to multiple users. It should not be modified here.
-
message
Member function that will be invoked by a XNetInterface implementation to forward a XNet message from the layout.- Specified by:
messagein interfaceXNetListener- Parameters:
msg- The received XNet message. Note that this same object may be presented to multiple users. It should not be modified here.
-
message
Member function that will be invoked by a XNetInterface implementation to forward a XNet message sent to the layout. Normally, this function will do nothing.- Specified by:
messagein interfaceXNetListener- Parameters:
msg- The received XNet message. Note that this same object may be presented to multiple users. It should not be modified here.
-
notifyTimeout
Member function invoked by an XNetInterface implementation to notify a sender that an outgoing message timed out and was dropped from the queue.- Specified by:
notifyTimeoutin interfaceXNetListener- Parameters:
msg- message which has timed out.
-
getStreamPortController
Package protected method to retrieve the stream port controller associated with this tunnel.- Returns:
- controller in use
-
setStreamPortController
Package protected method to set the stream port controller associated with this tunnel.- Parameters:
x- controller to retain
-
dispose
-