[−][src]Trait stm32f3xx_hal_v2::can::Filter
A type that will either accept or filter a Frame
.
The filtering is done solely on the ID
of the Frame
.
Associated Types
Loading content...Required methods
pub fn from_id(id: Self::Id) -> Self
[src]
Constructs a filter that only accepts Frame
s with the provided identifier.
pub fn accept_all() -> Self
[src]
Constructs a filter that will accept any Frame
.
pub fn from_mask(mask: u32, filter: u32) -> Self
[src]
Create a Filter
from a filter/mask combination.
- Bit 0..11 is used when matching against base id
- Bit 0..29 is used when matching against extended_id
- Bit 29 matches the extended frame flag (can be used for only matching against base/extended ids)
- Bit 30..32 must be
0
Note: When filtering base id any rule put on bit_pos >= 11
will (for implementers: must) be ignored
Panic
(for implementers: must) panic if mask have bits equal to 1
for bit_position >= 30
.
Implementors
impl Filter for CanFilter
[src]
type Id = CanId
pub fn from_id(id: Self::Id) -> Self
[src]
Construct a filter which filters messages for a specific identified
pub fn accept_all() -> Self
[src]
Construct an "empty" filter which will accept all messages
pub fn from_mask(mask: u32, filter: u32) -> Self
[src]
Constuct a mask filter. This method accepts two parameters, the mask which designates which bits are actually matched againts and the filter, with the actual bits to match.