jmri.jmrix.can.cbus
Class CbusEventFilter

java.lang.Object
  extended by jmri.jmrix.can.cbus.CbusEventFilter

public class CbusEventFilter
extends Object

Class to implement filtering of CBUS events.

Author:
Andrew Crosland Copyright (C) 2008

Constructor Summary
CbusEventFilter()
          Creates a new instance of CbusEventFilter
 
Method Summary
 boolean filter(CanMessage m)
          Filter an event, based on previous settings.
 boolean filter(CanReply r)
           
 Color getColor()
           
 void setColor(Color c)
           
 void setEv(int n)
           
 void setEvEnable(boolean b)
          Set whether Ev (event number) will be included in filter.
 void setNn(int n)
           
 void setNnEnable(boolean b)
          Set whether NN (Node Number) will be included in filter.
 void setType(int n)
          Set value of type to match.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CbusEventFilter

public CbusEventFilter()
Creates a new instance of CbusEventFilter

Method Detail

filter

public boolean filter(CanMessage m)
Filter an event, based on previous settings.

Parameters:
m - CanMessage to filter.
Returns:
true if event matches

filter

public boolean filter(CanReply r)

setNnEnable

public void setNnEnable(boolean b)
Set whether NN (Node Number) will be included in filter.


setEvEnable

public void setEvEnable(boolean b)
Set whether Ev (event number) will be included in filter.


setNn

public void setNn(int n)

setEv

public void setEv(int n)

setType

public void setType(int n)
Set value of type to match. Type is the ON, OFF, etc. value in the CBUS frame. See CbusConstants for values; CbusConstants.EVENT_EITHER matches either ON or OFF.


setColor

public void setColor(Color c)

getColor

public Color getColor()


Copyright © 1997 - 2011 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads