pub trait AbstractFrameTriggering: AbstractionElement {
type FrameType: AbstractFrame;
// Provided methods
fn frame(&self) -> Option<Self::FrameType> { ... }
fn frame_ports(&self) -> impl Iterator<Item = FramePort> + Send + 'static { ... }
fn pdu_triggerings(
&self,
) -> impl Iterator<Item = PduTriggering> + Send + 'static { ... }
fn physical_channel(
&self,
) -> Result<PhysicalChannel, AutosarAbstractionError> { ... }
}
Expand description
A trait for all frame triggerings
Required Associated Types§
Sourcetype FrameType: AbstractFrame
type FrameType: AbstractFrame
The frame type triggered by this FrameTriggering
Provided Methods§
Sourcefn frame_ports(&self) -> impl Iterator<Item = FramePort> + Send + 'static
fn frame_ports(&self) -> impl Iterator<Item = FramePort> + Send + 'static
iterate over all frame ports referenced by this frame triggering
§Example
let frame = system.create_can_frame("Frame", &package, 8)?;
let frame_triggering = channel.trigger_frame(&frame, 0x100, CanAddressingMode::Standard, CanFrameType::Can20)?;
let frame_port = frame_triggering.connect_to_ecu(&ecu_instance, CommunicationDirection::In)?;
for fp in frame_triggering.frame_ports() {
// ...
}
assert_eq!(frame_triggering.frame_ports().count(), 1);
Sourcefn pdu_triggerings(
&self,
) -> impl Iterator<Item = PduTriggering> + Send + 'static
fn pdu_triggerings( &self, ) -> impl Iterator<Item = PduTriggering> + Send + 'static
iterate over all PDU triggerings used by this frame triggering
Sourcefn physical_channel(&self) -> Result<PhysicalChannel, AutosarAbstractionError>
fn physical_channel(&self) -> Result<PhysicalChannel, AutosarAbstractionError>
get the physical channel that contains this frame triggering
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.