Package jmri.jmrix.loconet.locostats
Class LocoStatsFunc
java.lang.Object
jmri.jmrix.loconet.locostats.LocoStatsFunc
- All Implemented Interfaces:
EventListener,LocoNetListener
Implements functionality to query the LocoNet interface device for status.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a listener to the list of listeners which will be notified upon receipt a LocoNet message containing interface statistics.voiddispose()Free resources when no longer usedGet the latest interface statusvoidmessage(LocoNetMessage msg) LocoNet message handler.voidRemove a listener (if present) from the list of listeners which will be notified upon receipt LocoNet message containing interface statistics.voidRequest LocoNet interface Status
-
Field Details
-
listeners
-
-
Constructor Details
-
LocoStatsFunc
-
-
Method Details
-
sendLocoNetInterfaceStatusQueryMessage
Request LocoNet interface Status -
message
LocoNet message handler.- Specified by:
messagein interfaceLocoNetListener- Parameters:
msg- incoming LocoNet message to be interpreted
-
getInterfaceStatus
Get the latest interface status- Returns:
- the latest interface status; will be null if status has not been pulled.
-
dispose
Free resources when no longer used -
addLocoNetInterfaceStatsListener
Add a listener to the list of listeners which will be notified upon receipt a LocoNet message containing interface statistics.- Parameters:
l- LocoNetInterfaceStatsListener to be added
-
removeLocoNetInterfaceStatsListener
Remove a listener (if present) from the list of listeners which will be notified upon receipt LocoNet message containing interface statistics.- Parameters:
l- LocoNetInterfaceStatsListener to be removed
-