Package jmri.jmrix.can.cbus.eventtable
Class CbusTableEvent
java.lang.Object
jmri.jmrix.can.cbus.CbusEventDataElements
jmri.jmrix.can.cbus.CbusEvent
jmri.jmrix.can.cbus.eventtable.CbusTableEvent
Class to represent an event in the MERG CBUS event table
-
Nested Class Summary
Nested classes/interfaces inherited from class jmri.jmrix.can.cbus.CbusEventDataElements
CbusEventDataElements.EvState -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendOnOffBean(NamedBean nb, boolean beanState, CbusEventDataElements.EvState evState) protected voidbumpDirection(int direction) Increase Direction session and total counts.booleanprotected CbusEventBeanDataGet the Sensor Turnout and Light user names associated with event on or off.protected StringGet the event commentprotected DategetDate()Get the last-seen date time.protected intGet the CAN ID to last send the eventprotected intgetSessionInOut(boolean in) Number of times event heard coming in to JMRI this session.protected intgetSessionOnOff(boolean on) Number of times event on or off for current session.protected intgetTotalInOut(boolean in) Number of times event heard, all sessions.protected intgetTotalOnOff(boolean on) Number of times event on or off all sessions.inthashCode()protected final voidprotected voidReset on, off, in and out session counts to 0protected voidsetCanId(int newval) Set the CAN ID to last send the eventvoidsetComment(String newval) Set the event commentprotected voidsetCounts(int on, int off, int in, int out) Set Event Counts.protected voidSet the last-seen date timevoidUpdates Event State and session / total on and off's.Methods inherited from class jmri.jmrix.can.cbus.CbusEvent
getEn, getName, getNn, getNodeName, getState, matches, sendEvent, sendOff, sendOn, sendRequest, setEn, setName, setNameIfNoName, setNn, toStringMethods inherited from class jmri.jmrix.can.cbus.CbusEventDataElements
getCanMessage, getData, getEvState, getJmriString, getNumElements, getNumEventDataElements, setData, setDataFromFrame, setNumElements
-
Constructor Details
-
CbusTableEvent
-
-
Method Details
-
setState
Updates Event State and session / total on and off's. Set current state of the event.Does NOT send update to layout.
-
getDate
Get the last-seen date time.- Returns:
- The last time the event was heard on the network
-
setDate
Set the last-seen date time- Parameters:
newval- the last-seen date time
-
getBeans
Get the Sensor Turnout and Light user names associated with event on or off.- Parameters:
state- CbusEvent State of ON or OFF- Returns:
- Sensor Turnout and Light set.
-
resetBeans
-
appendOnOffBean
-
getEventCanId
Get the CAN ID to last send the event- Returns:
- CAN ID
-
setComment
Set the event comment- Parameters:
newval- Comment String
-
getComment
Get the event comment- Returns:
- Comment String
-
setCanId
Set the CAN ID to last send the event- Parameters:
newval- CAN ID
-
setCounts
Set Event Counts.- Parameters:
on- Total Onoff- Total Offin- Total Inout- Total Out
-
getSessionOnOff
Number of times event on or off for current session.- Parameters:
on- true for on, false for off- Returns:
- Number of times event on for current session
-
getTotalOnOff
Number of times event on or off all sessions.- Parameters:
on- true for on, false for off.- Returns:
- Number of times event on or off all sessions.
-
getSessionInOut
Number of times event heard coming in to JMRI this session.- Parameters:
in- true for in, false for out.- Returns:
- Number of times event heard coming in to JMRI this session
-
getTotalInOut
Number of times event heard, all sessions.- Parameters:
in- true for in, false for out.- Returns:
- Number of times event heard coming in or out to JMRI all sessions
-
bumpDirection
Increase Direction session and total counts.- Parameters:
direction- CbusConstant of EVENT_DIR_IN or EVENT_DIR_OUT
-
resetSessionTotals
Reset on, off, in and out session counts to 0 -
equals
Custom method to compare Node Number and Event Number.
-
hashCode
-