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 XNetTrafficControllertc
-
Constructor Summary
Constructors Constructor Description XNetFeedbackMessageCache(XNetTrafficController controller)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidmessage(XNetMessage l)Listen for the messages to the LI100/LI101.voidmessage(XNetReply l)Listen for turnouts, creating them as needed.voidnotifyTimeout(XNetMessage msg)Handle a timeout notification.voidrequestCachedStateFromLayout(XNetSensor sensor)Provide any cached state a sensor.voidrequestCachedStateFromLayout(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:
messagein 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:
messagein 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:
notifyTimeoutin interfaceXNetListener- Parameters:
msg- message which has timed out.
-
-