Package jmri.jmrix.can.cbus
Class CbusEventHighlighter
java.lang.Object
jmri.jmrix.can.cbus.CbusEventHighlighter
Class to implement highlighting of CBUS events.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetColor()Get value of Colour to highlight.intgetDir()intgetEv()booleanintgetNn()booleanintgetType()booleanHighlight a CAN Frame, based on previous settings.voidSet value of ColourvoidsetDir(int n) Set value of direction to match.voidsetEv(int n) Set an Event Number to highlight.voidsetEvEnable(boolean b) Set whether Ev (event number) will be included in highlight.voidsetNn(int n) Set a Node Number to highlight.voidsetNnEnable(boolean b) Set whether NN (Node Number) will be included in highlight.voidsetType(int n) Set value of type to match.Type is the ON, OFF, etc. value in the CBUS frame.
-
Constructor Details
-
CbusEventHighlighter
public CbusEventHighlighter()Creates a new instance of CbusEventHighlighter
-
-
Method Details
-
highlight
Highlight a CAN Frame, based on previous settings.- Parameters:
m- CanMessage or CanReply to highlight.- Returns:
- true if event matches
-
setNnEnable
Set whether NN (Node Number) will be included in highlight.- Parameters:
b- True to highlight a Node Number
-
getNnEnable
-
setEvEnable
Set whether Ev (event number) will be included in highlight.- Parameters:
b- True to highlight an Event Number
-
getEvEnable
-
setNn
Set a Node Number to highlight.- Parameters:
n- Node Number
-
getNn
-
setEv
Set an Event Number to highlight.- Parameters:
n- Event Number
-
getEv
-
setType
Set value of type to match.Type is the ON, OFF, etc. value in the CBUS frame. CbusConstants.EVENT_EITHER matches either ON or OFF.- Parameters:
n- SeeCbusConstantsfor values
-
getType
-
setDir
Set value of direction to match.- Parameters:
n- EVENT_DIR_UNSET EVENT_DIR_IN, EVENT_DIR_OUT, EVENT_EITHER_DIR EVENT_DIR_EITHER
-
getDir
-
setColor
Set value of Colour- Parameters:
c- Colour to use
-
getColor
Get value of Colour to highlight.- Returns:
- Colour to use
-