pub struct FlexrayPhysicalChannel(/* private fields */);
Expand description
the FlexrayPhysicalChannel
represents either channel A or B of Flexray cluster
Implementations§
Source§impl FlexrayPhysicalChannel
impl FlexrayPhysicalChannel
Sourcepub fn channel_name(&self) -> Option<FlexrayChannelName>
pub fn channel_name(&self) -> Option<FlexrayChannelName>
get the channel name of a FlexrayPhysicalChannel
Sourcepub fn cluster(&self) -> Result<FlexrayCluster, AutosarAbstractionError>
pub fn cluster(&self) -> Result<FlexrayCluster, AutosarAbstractionError>
get the cluster containing this physical channel
§Example
let channel = cluster.create_physical_channel("Channel", FlexrayChannelName::A)?;
let cluster_2 = channel.cluster()?;
assert_eq!(cluster, cluster_2);
§Errors
AutosarAbstractionError::ModelError
An error occurred in the Autosar model
Sourcepub fn trigger_frame(
&self,
frame: &FlexrayFrame,
slot_id: u16,
timing: &FlexrayCommunicationCycle,
) -> Result<FlexrayFrameTriggering, AutosarAbstractionError>
pub fn trigger_frame( &self, frame: &FlexrayFrame, slot_id: u16, timing: &FlexrayCommunicationCycle, ) -> Result<FlexrayFrameTriggering, AutosarAbstractionError>
add a trigger for a flexray frame in this physical channel
§Example
let channel = cluster.create_physical_channel("Channel", FlexrayChannelName::A)?;
let frame = system.create_flexray_frame("Frame", &frame_package, 64)?;
let timing = FlexrayCommunicationCycle::Repetition {base_cycle: 1, cycle_repetition: CycleRepetition::C1};
channel.trigger_frame(&frame, 1, &timing)?;
Sourcepub fn frame_triggerings(
&self,
) -> impl Iterator<Item = FlexrayFrameTriggering> + Send + 'static
pub fn frame_triggerings( &self, ) -> impl Iterator<Item = FlexrayFrameTriggering> + Send + 'static
iterate over all frame triggerings of this physical channel
§Example
channel.trigger_frame(&frame, 1, &timing)?;
for ft in channel.frame_triggerings() {
println!("Frame triggering: {:?}", ft);
}
Trait Implementations§
Source§impl AbstractPhysicalChannel for FlexrayPhysicalChannel
impl AbstractPhysicalChannel for FlexrayPhysicalChannel
Source§type CommunicationConnectorType = FlexrayCommunicationConnector
type CommunicationConnectorType = FlexrayCommunicationConnector
the type of communication connector used by this physical channel
Source§fn pdu_triggerings(
&self,
) -> impl Iterator<Item = PduTriggering> + Send + 'static
fn pdu_triggerings( &self, ) -> impl Iterator<Item = PduTriggering> + Send + 'static
iterate over all
PduTriggerings
of this physical channelSource§fn signal_triggerings(
&self,
) -> impl Iterator<Item = ISignalTriggering> + Send + 'static
fn signal_triggerings( &self, ) -> impl Iterator<Item = ISignalTriggering> + Send + 'static
iterate over all
ISignalTriggerings
of this physical channelSource§fn connectors(
&self,
) -> impl Iterator<Item = Self::CommunicationConnectorType> + Send + 'static
fn connectors( &self, ) -> impl Iterator<Item = Self::CommunicationConnectorType> + Send + 'static
iterate over all connectors between this physical channel and any ECU Read more
Source§fn ecu_connector(
&self,
ecu_instance: &EcuInstance,
) -> Option<Self::CommunicationConnectorType>
fn ecu_connector( &self, ecu_instance: &EcuInstance, ) -> Option<Self::CommunicationConnectorType>
get the connector element between this channel and an ecu
Source§impl Clone for FlexrayPhysicalChannel
impl Clone for FlexrayPhysicalChannel
Source§fn clone(&self) -> FlexrayPhysicalChannel
fn clone(&self) -> FlexrayPhysicalChannel
Returns a duplicate of the value. Read more
1.0.0 · 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 FlexrayPhysicalChannel
impl Debug for FlexrayPhysicalChannel
Source§impl From<FlexrayPhysicalChannel> for Element
impl From<FlexrayPhysicalChannel> for Element
Source§fn from(val: FlexrayPhysicalChannel) -> Self
fn from(val: FlexrayPhysicalChannel) -> Self
Converts to this type from the input type.
Source§impl From<FlexrayPhysicalChannel> for PhysicalChannel
impl From<FlexrayPhysicalChannel> for PhysicalChannel
Source§fn from(channel: FlexrayPhysicalChannel) -> Self
fn from(channel: FlexrayPhysicalChannel) -> Self
Converts to this type from the input type.
Source§impl Hash for FlexrayPhysicalChannel
impl Hash for FlexrayPhysicalChannel
Source§impl PartialEq for FlexrayPhysicalChannel
impl PartialEq for FlexrayPhysicalChannel
Source§impl TryFrom<Element> for FlexrayPhysicalChannel
impl TryFrom<Element> for FlexrayPhysicalChannel
impl Eq for FlexrayPhysicalChannel
impl StructuralPartialEq for FlexrayPhysicalChannel
Auto Trait Implementations§
impl Freeze for FlexrayPhysicalChannel
impl !RefUnwindSafe for FlexrayPhysicalChannel
impl Send for FlexrayPhysicalChannel
impl Sync for FlexrayPhysicalChannel
impl Unpin for FlexrayPhysicalChannel
impl !UnwindSafe for FlexrayPhysicalChannel
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.