CANpie FD
CAN programming interface environment - Version 3.08
Public Member Functions
QCanFilterList Class Reference

Detailed Description

A CAN filter list assembles one or multiple CAN filters (i.e. QCanFilter) to a complex filter structure, which can be assigned to a CAN socket (refer to QCanSocket::setFilterList).

Public Member Functions

 QCanFilterList ()
 
int32_t appendFilter (const QCanFilter &clFilterR)
 
void clear (void)
 
bool filter (const QCanFrame &clFrameR) const
 
bool isEmpty (void)
 
bool removeFilter (const int32_t slPositionR)
 

Constructor & Destructor Documentation

◆ QCanFilterList()

QCanFilterList::QCanFilterList ( )

Constructs an empty filter list

Member Function Documentation

◆ appendFilter()

int32_t QCanFilterList::appendFilter ( const QCanFilter clFilterR)
Parameters
[in]clFilterR- CAN filter
Returns
Position of filter inside the list

The function appends a CAN filter of type QCanFilter to the filter list.

◆ clear()

void QCanFilterList::clear ( void  )

The function clears the filter list, i.e. all existing filters are removed. An empty filter list does not filter any CAN frame, all CAN frames will pass the filter list.

◆ filter()

bool QCanFilterList::filter ( const QCanFrame clFrameR) const
Parameters
[in]clFrameR- CAN frame
Returns
TRUE if the message is filtered

The function processes the CAN frame supplied by clFrameR against all existing CAN filters inside the filter list. If the message passes the filter list the function returns FALSE, otherwise TRUE.

◆ isEmpty()

bool QCanFilterList::isEmpty ( void  )

The function clears the filter list, i.e. all existing filters are removed. An empty filter list does not filter any CAN frame, all CAN frames will pass the filter list.

◆ removeFilter()

bool QCanFilterList::removeFilter ( const int32_t  slPositionR)

The function clears the filter list, i.e. all existing filters are removed. An empty filter list does not filter any CAN frame, all CAN frames will pass the filter list.