pub trait AbstractFrame: AbstractionElement {
type FrameTriggeringType: AbstractFrameTriggering;
// Required methods
fn frame_triggerings(&self) -> Vec<Self::FrameTriggeringType>;
fn map_pdu<T: AbstractPdu>(
&self,
gen_pdu: &T,
start_position: u32,
byte_order: ByteOrder,
update_bit: Option<u32>,
) -> Result<PduToFrameMapping, AutosarAbstractionError>;
// Provided methods
fn mapped_pdus(
&self,
) -> impl Iterator<Item = PduToFrameMapping> + Send + 'static { ... }
fn set_length(&self, length: u32) -> Result<(), AutosarAbstractionError> { ... }
fn length(&self) -> Option<u32> { ... }
}
Expand description
A trait for all frame types
Required Associated Types§
Sourcetype FrameTriggeringType: AbstractFrameTriggering
type FrameTriggeringType: AbstractFrameTriggering
The bus-specific frame triggering type
Required Methods§
Sourcefn frame_triggerings(&self) -> Vec<Self::FrameTriggeringType>
fn frame_triggerings(&self) -> Vec<Self::FrameTriggeringType>
Iterator over all FrameTriggering
s using this frame
Sourcefn map_pdu<T: AbstractPdu>(
&self,
gen_pdu: &T,
start_position: u32,
byte_order: ByteOrder,
update_bit: Option<u32>,
) -> Result<PduToFrameMapping, AutosarAbstractionError>
fn map_pdu<T: AbstractPdu>( &self, gen_pdu: &T, start_position: u32, byte_order: ByteOrder, update_bit: Option<u32>, ) -> Result<PduToFrameMapping, AutosarAbstractionError>
map a PDU to the frame
Provided Methods§
Sourcefn mapped_pdus(
&self,
) -> impl Iterator<Item = PduToFrameMapping> + Send + 'static
fn mapped_pdus( &self, ) -> impl Iterator<Item = PduToFrameMapping> + Send + 'static
returns an iterator over all PDUs in the frame
Sourcefn set_length(&self, length: u32) -> Result<(), AutosarAbstractionError>
fn set_length(&self, length: u32) -> Result<(), AutosarAbstractionError>
set the length of the frame
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.