|
CAN programming interface environment
Version 3.10
|
#include <qcan_filter.hpp>
Public Types | |
| enum | FilterType_e { } |
Public Member Functions | |
| QCanFilter () | |
| bool | acceptFrame (const QCanFrame::FrameFormat_e &teFormatR, const uint32_t ulIdentifierLowV, const uint32_t ulIdentifierHighV) |
| bool | match (const QCanFrame &clFrameR) const |
| bool | rejectFrame (const QCanFrame::FrameFormat_e &teFormatR, const uint32_t ulIdentifierLowV, const uint32_t ulIdentifierHighV) |
| FilterType_te | type (void) const |
| QCanFilter::QCanFilter | ( | ) |
Constructs an empty filter.
| bool QCanFilter::acceptFrame | ( | const QCanFrame::FrameFormat_e & | teFormatR, |
| const uint32_t | ulIdentifierLowV, | ||
| const uint32_t | ulIdentifierHighV ) |
| [in] | teFormatR | Frame format (standard or extended) |
| [in] | ulIdentifierLowV | Lower bound of identifier range (inclusive) |
| [in] | ulIdentifierHighV | Upper bound of identifier range (inclusive) |
TRUE if parameter values are valid Configure an acceptance filter for CAN frames with a frame format defined by teFormatR. All CAN frames with an identifier value within the range from ulIdentifierLowV to ulIdentifierHighV will match the filter condition.
If the supplied parameters for ulIdentifierLowV and ulIdentifierHighV are not valid (e.g., identifier value > QCAN_FRAME_ID_MASK_STD for extended frames) the function returns FALSE and the filter type is set to QCanFilter::eFILTER_OFF.
| bool QCanFilter::match | ( | const QCanFrame & | clFrameR | ) | const |
| [in] | clFrameR | CAN frame to test |
TRUE if filter condition is metTest the CAN frame clFrameR with regard to the configured filter type. For an acceptance filter (QCanFilter::eFILTER_ACCEPT) the function returns TRUE if the CAN frame meets the acceptance condition (e.g. identifier value).
For a rejection filter (QCanFilter::eFILTER_REJECT) the function returns TRUE if the CAN frame meets the rejection condition (e.g. identifier value).
| bool QCanFilter::rejectFrame | ( | const QCanFrame::FrameFormat_e & | teFormatR, |
| const uint32_t | ulIdentifierLowV, | ||
| const uint32_t | ulIdentifierHighV ) |
| [in] | teFormatR | Frame format (standard or extended) |
| [in] | ulIdentifierLowV | Lower bound of identifier range (inclusive) |
| [in] | ulIdentifierHighV | Upper bound of identifier range (inclusive) |
TRUE if parameter values are valid Configure a rejection filter for CAN frames with a frame format defined by teFormatR. All CAN frames with an identifier value within the range from ulIdentifierLowV to ulIdentifierHighV will match the rejection condition.
If the supplied parameters for ulIdentifierLowV and ulIdentifierHighV are not valid (e.g., identifier value > QCAN_FRAME_ID_MASK_STD for extended frames) the function returns FALSE and the filter type is set to QCanFilter::eFILTER_OFF.
|
inline |
Returns the current filter type, which is implicitly set by acceptFrame() or rejectFrame().