Trait AbstractFrame

Source
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§

Source

type FrameTriggeringType: AbstractFrameTriggering

The bus-specific frame triggering type

Required Methods§

Source

fn frame_triggerings(&self) -> Vec<Self::FrameTriggeringType>

Iterator over all FrameTriggerings using this frame

Source

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§

Source

fn mapped_pdus( &self, ) -> impl Iterator<Item = PduToFrameMapping> + Send + 'static

returns an iterator over all PDUs in the frame

Source

fn set_length(&self, length: u32) -> Result<(), AutosarAbstractionError>

set the length of the frame

Source

fn length(&self) -> Option<u32>

get 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.

Implementors§