pub trait Receiver: Interface {
// Required methods
fn receive(&mut self) -> Result<Self::Frame, Self::Error>;
fn set_filter(&mut self, filter: Self::Filter);
fn clear_filter(&mut self);
}
Expand description
A CAN interface that is able to receive frames.
Required Methods§
Sourcefn receive(&mut self) -> Result<Self::Frame, Self::Error>
fn receive(&mut self) -> Result<Self::Frame, Self::Error>
Return the available Frame
with the highest priority (lowest ID).
NOTE: Can-FD Frames will not be received using this function.
Sourcefn set_filter(&mut self, filter: Self::Filter)
fn set_filter(&mut self, filter: Self::Filter)
Set the can controller in a mode where it only accept frames matching the given filter.
If there exists several receive buffers, this filter will be applied for all of them.
Note: Even after this method has been called, there may still be Frame
s in the receive buffer with
identifiers that would not been received with this Filter
.
Sourcefn clear_filter(&mut self)
fn clear_filter(&mut self)
Set the can controller in a mode where it will accept all frames.