Package jmri.jmrix.lenz
Class XNetFeedbackMessageCache
- java.lang.Object
-
- jmri.jmrix.lenz.XNetFeedbackMessageCache
-
- All Implemented Interfaces:
java.util.EventListener
,AbstractMRListener
,XNetListener
public class XNetFeedbackMessageCache extends java.lang.Object implements XNetListener
Implement a feedback message cache for XpressNet sensors and turnouts.
-
-
Field Summary
Fields Modifier and Type Field Description protected XNetTrafficController
tc
-
Constructor Summary
Constructors Constructor Description XNetFeedbackMessageCache(XNetTrafficController controller)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
message(XNetMessage l)
Listen for the messages to the LI100/LI101.void
message(XNetReply l)
Listen for turnouts, creating them as needed.void
notifyTimeout(XNetMessage msg)
Handle a timeout notification.void
requestCachedStateFromLayout(XNetSensor sensor)
Provide any cached state a sensor.void
requestCachedStateFromLayout(XNetTurnout turnout)
-
-
-
Field Detail
-
tc
protected XNetTrafficController tc
-
-
Constructor Detail
-
XNetFeedbackMessageCache
public XNetFeedbackMessageCache(XNetTrafficController controller)
-
-
Method Detail
-
requestCachedStateFromLayout
public void requestCachedStateFromLayout(XNetTurnout turnout)
-
requestCachedStateFromLayout
public void requestCachedStateFromLayout(XNetSensor sensor)
Provide any cached state a sensor. Otherwise, call the sensor's requestUpdateFromLayout() method.- Parameters:
sensor
- the XNetSensor object we are requesting data for
-
message
public void message(XNetReply l)
Listen for turnouts, creating them as needed.- Specified by:
message
in interfaceXNetListener
- Parameters:
l
- The received XNet message. Note that this same object may be presented to multiple users. It should not be modified here.
-
message
public void message(XNetMessage l)
Listen for the messages to the LI100/LI101.- Specified by:
message
in interfaceXNetListener
- Parameters:
l
- The received XNet message. Note that this same object may be presented to multiple users. It should not be modified here.
-
notifyTimeout
public void notifyTimeout(XNetMessage msg)
Handle a timeout notification.- Specified by:
notifyTimeout
in interfaceXNetListener
- Parameters:
msg
- message which has timed out.
-
-