pub struct UdsFlowControlFrame {
pub flag: u8,
pub block_size: u8,
pub separation_time: u8,
pub padding: Vec<u8>,
}Expand description
Represents a UDS Flow Control Frame. This frame is sent by the receiver to control the flow of multi-frame transmissions.
Fields§
§flag: u8Flow control flag:
0x00= Continue to send (CTS)0x01= Wait (WT)0x02= Overflow/abort (OVFLW)
block_size: u8The number of Consecutive Frames the sender can transmit before waiting.
separation_time: u8Minimum separation time (ST) in milliseconds between transmitted frames.
padding: Vec<u8>Optional padding bytes (if required for 8-byte CAN frames).
Implementations§
Source§impl UdsFlowControlFrame
impl UdsFlowControlFrame
Sourcepub fn new(
flag: u8,
block_size: u8,
separation_time: u8,
padding: Vec<u8>,
) -> Result<Self, FrameError>
pub fn new( flag: u8, block_size: u8, separation_time: u8, padding: Vec<u8>, ) -> Result<Self, FrameError>
Creates a new UDS Flow Control Frame.
§Parameters:
flag: Flow control flag (0=CTS, 1=Wait, 2=Overflow).block_size: Number of consecutive frames before next flow control.separation_time: Time delay (in ms) between frames.padding: Optional padding data (max 5 bytes).
§Returns:
Ok(UdsFlowControlFrame): If the padding size is valid.Err(FrameError): If the padding exceeds 5 bytes.
Trait Implementations§
Source§impl Clone for UdsFlowControlFrame
impl Clone for UdsFlowControlFrame
Source§fn clone(&self) -> UdsFlowControlFrame
fn clone(&self) -> UdsFlowControlFrame
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UdsFlowControlFrame
impl Debug for UdsFlowControlFrame
Source§impl PartialEq for UdsFlowControlFrame
impl PartialEq for UdsFlowControlFrame
Source§fn eq(&self, other: &UdsFlowControlFrame) -> bool
fn eq(&self, other: &UdsFlowControlFrame) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for UdsFlowControlFrame
Auto Trait Implementations§
impl Freeze for UdsFlowControlFrame
impl RefUnwindSafe for UdsFlowControlFrame
impl Send for UdsFlowControlFrame
impl Sync for UdsFlowControlFrame
impl Unpin for UdsFlowControlFrame
impl UnsafeUnpin for UdsFlowControlFrame
impl UnwindSafe for UdsFlowControlFrame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more