|
CAN programming interface environment
Version 3.10
|
A filter list assembles one or multiple CAN frame filters (QCanFilter) into a composite structure that can be assigned to a CAN socket (refer to QCanSocket::setFilterList).
#include <qcan_filter_list.hpp>
Public Member Functions | |
| QCanFilterList () | |
| QCanFilterList & | operator= (const QCanFilterList &clOtherR) |
| int32_t | appendFilter (const QCanFilter &clFilterR) |
| void | clear (void) |
| bool | filter (const QCanFrame &clFrameR) const |
| bool | isEmpty (void) |
| bool | removeFilter (const int32_t slPositionR) |
| QCanFilterList::QCanFilterList | ( | ) |
Constructs an empty filter list.
| int32_t QCanFilterList::appendFilter | ( | const QCanFilter & | clFilterR | ) |
| [in] | clFilterR | CAN filter to append |
The function appends a CAN filter of type QCanFilter to the filter list.
| void QCanFilterList::clear | ( | void | ) |
Clear the filter list (remove all existing filters). An empty filter list does not filter any CAN frame; all CAN frames will pass.
| bool QCanFilterList::filter | ( | const QCanFrame & | clFrameR | ) | const |
| [in] | clFrameR | CAN frame to process |
TRUE if the frame is filtered (rejected), otherwise FALSE Process the CAN frame clFrameR against all filters in the list. If the frame passes the filter list the function returns FALSE; if any filter causes rejection the function returns TRUE.
| bool QCanFilterList::isEmpty | ( | void | ) |
Return true if the filter list is empty (no filters installed).
| QCanFilterList & QCanFilterList::operator= | ( | const QCanFilterList & | clOtherR | ) |
| [in] | clOtherR | Reference to filter list to assign |
Assigns clOtherR to this filter list and returns a reference to this filter list.
| bool QCanFilterList::removeFilter | ( | const int32_t | slPositionR | ) |
| [in] | slPositionR | Index of filter to remove (0-based) |
true if the filter at slPositionR existed and was removed, otherwise false Remove a filter by index from the filter list.