Package jmri.jmrix.can.cbus.node
Class CbusNodeTimerManager
java.lang.Object
jmri.jmrix.can.cbus.node.CbusNodeTimerManager
Class to handle Timers for a CbusNode.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new CbusNodeTimers -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidStop timer for an ALL event by index fetch request.protected voidStop timer for a single parameter fetchprotected voidStop timer for a single event variable request.protected voidStop timer for a single NV fetch request.protected voidStop timer for event total RQEVN request.protected voidStops timer for Teaching Eventsprotected voidStop timer for Teaching NV Node Variablesprotected voidStops timer for CAN ID Self Enumeration Timeoutprotected booleanSee if any timers are running, ie waiting for a response from a physical Node.protected final voidprotected voidStarts timer for an ALL event by index fetch request.protected voidsetAllParamTimeout(int index) Start timer for a Parameter request If 10 timeouts are counted, aborts loop, sets 8 parameters to 0 and node events array to 0protected voidsetNextEvVarTimeout(int eventVarIndex, String eventString) Start timer for a single event variable request.protected voidStart timer for a single Node Variable request.protected voidStart timer for event total RQEVN request.protected voidStart timer for Teaching Events On timeout, ie Node does not Respond with a success message, stops Learn Loop and takes node out of Learn Mode.protected voidStart timer for Teaching NV Node Variables If no response received, increases error count and resumes loop to teach next NV which handles the errorprotected voidStarts timer for CAN ID Self Enumeration Timeout If no response adds warning to console log
-
Field Details
-
fetchNvTimeoutCount
-
fetchEvVarTimeoutCount
-
numEvTimeoutCount
-
allEvTimeoutCount
-
allEvTimerTask
-
paramRequestTimeoutCount
-
sendEnumTask
-
sendEvErrorCount
-
_sendNVErrorCount
-
SINGLE_MESSAGE_TIMEOUT_TIME
-
-
Constructor Details
-
CbusNodeTimerManager
Create a new CbusNodeTimers- Parameters:
node- The Node
-
-
Method Details
-
hasActiveTimers
See if any timers are running, ie waiting for a response from a physical Node.- Returns:
- true if timers are running else false
-
cancelTimers
-
resetTimeOutCounts
-
clearNextNvVarTimeout
Stop timer for a single NV fetch request. -
setNextNvVarTimeout
Start timer for a single Node Variable request. If 10 failed requests aborts loop and sets number of NV's to unknown -
clearNextEvVarTimeout
Stop timer for a single event variable request. -
setNextEvVarTimeout
Start timer for a single event variable request. If 10 failed requests aborts loop and sets events to 0- Parameters:
eventVarIndex- Event Variable IndexeventString- User Friendly Event Text
-
clearNumEvTimeout
Stop timer for event total RQEVN request. -
setNumEvTimeout
Start timer for event total RQEVN request. If 10 failed requests aborts loop and sets event number to 0 -
clearAllEvTimeout
Stop timer for an ALL event by index fetch request. -
setAllEvTimeout
Starts timer for an ALL event by index fetch request.This has a higher chance of failing as we could be expecting up to 255 CAN Frames in response. If fails, re-sends the NERD to the physical node Aborts on 10 failed requests
-
clearAllParamTimeout
Stop timer for a single parameter fetch -
setAllParamTimeout
Start timer for a Parameter request If 10 timeouts are counted, aborts loop, sets 8 parameters to 0 and node events array to 0- Parameters:
index- Parameter Index
-
clearsendEditNvTimeout
Stop timer for Teaching NV Node Variables -
setsendEditNvTimeout
Start timer for Teaching NV Node Variables If no response received, increases error count and resumes loop to teach next NV which handles the error -
clearsendEditEvTimeout
Stops timer for Teaching Events -
setsendEditEvTimeout
Start timer for Teaching Events On timeout, ie Node does not Respond with a success message, stops Learn Loop and takes node out of Learn Mode. -
clearSendEnumTimeout
Stops timer for CAN ID Self Enumeration Timeout -
setsendEnumTimeout
Starts timer for CAN ID Self Enumeration Timeout If no response adds warning to console log
-