Struct bxcan::filter::Mask16 [−][src]
pub struct Mask16 { /* fields omitted */ }
Expand description
A 16-bit identifier mask.
Implementations
impl Mask16
[src]
impl Mask16
[src]pub fn accept_all() -> Self
[src]
pub fn accept_all() -> Self
[src]Creates a 16-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_std_id(id: StandardId, mask: StandardId) -> Self
[src]
pub fn frames_with_std_id(id: StandardId, mask: StandardId) -> Self
[src]Creates a 16-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. Any 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.