Struct bxcan::filter::Mask32 [−][src]
pub struct Mask32 { /* fields omitted */ }
Expand description
A 32-bit identifier mask.
Implementations
impl Mask32
[src]
impl Mask32
[src]pub fn accept_all() -> Self
[src]
pub fn accept_all() -> Self
[src]Creates a 32-bit identifier mask that accepts all frames.
This will accept both standard and extended data and remote frames with any ID.
pub fn frames_with_ext_id(id: ExtendedId, mask: ExtendedId) -> Self
[src]
pub fn frames_with_ext_id(id: ExtendedId, mask: ExtendedId) -> Self
[src]Creates a 32-bit identifier mask that accepts all frames with the given extended ID and mask combination.
Filter logic: frame_accepted = (incoming_id & mask) == (id & mask) A mask of all all ones (0x1FFF_FFFF) matches the exact ID, a mask of 0 matches all IDs.
Both data and remote frames with id
will be accepted. Standard frames will be rejected.
pub fn frames_with_std_id(id: StandardId, mask: StandardId) -> Self
[src]
pub fn frames_with_std_id(id: StandardId, mask: StandardId) -> Self
[src]Creates a 32-bit identifier mask that accepts all frames with the given standard ID and mask combination.
Filter logic: frame_accepted = (incoming_id & mask) == (id & mask) A mask of all all ones (0x7FF) matches the exact ID, a mask of 0 matches all IDs.
Both data and remote frames with id
will be accepted. Extended frames will be rejected.
pub fn data_frames_only(&mut self) -> &mut Self
[src]
pub fn data_frames_only(&mut self) -> &mut Self
[src]Make the filter accept data frames only.
pub fn remote_frames_only(&mut self) -> &mut Self
[src]
pub fn remote_frames_only(&mut self) -> &mut Self
[src]Make the filter accept remote frames only.