Package jmri.jmrix.loconet
Class LnMeterInitTask
- java.lang.Object
- 
- jmri.jmrix.loconet.LnMeterInitTask
 
- 
 public class LnMeterInitTask extends java.lang.Object Provides for LocoNet "Meters" discovery query at connection start-up. This class specifically deals with issues sometimes seen at JMRI LocoNet connection start-up.
- 
- 
Field SummaryFields Modifier and Type Field Description (package private) boolean_enabled
 - 
Constructor SummaryConstructors Constructor Description LnMeterInitTask(LnTrafficController tc, int interval)Create a task to perform an initial query of LocoNet for devices which provide data for JMRI Meters.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddisable()Cancel the task (if it is not already canceled)voiddispose()Remove references to and from this object, so that it can eventually be garbage-collected.protected voidenable()Enable the task to beginvoidinitTimer()Initializes timer for send of meters query.
 
- 
- 
- 
Field Detail- 
_enabledboolean _enabled 
 
- 
 - 
Constructor Detail- 
LnMeterInitTaskpublic LnMeterInitTask(LnTrafficController tc, int interval) Create a task to perform an initial query of LocoNet for devices which provide data for JMRI Meters.- Parameters:
- tc- Traffic Controller used when sending query
- interval- - delay between checks of connection's readiness
 
 
- 
 - 
Method Detail- 
enableprotected void enable() Enable the task to begin
 - 
disableprotected void disable() Cancel the task (if it is not already canceled)
 - 
initTimerpublic void initTimer() Initializes timer for send of meters query. Cancels any existing task. Checks delay and exits if delay is negative. Establishes a new task only if delay is greater than 0.
 - 
disposepublic void dispose() Remove references to and from this object, so that it can eventually be garbage-collected.
 
- 
 
-