pub struct FlexrayCommunicationController(/* private fields */);Expand description
An EcuInstance needs a FlexrayCommunicationController in order to connect to a Flexray cluster.
Implementations§
Source§impl FlexrayCommunicationController
impl FlexrayCommunicationController
Sourcepub fn connected_channels(
&self,
) -> impl Iterator<Item = FlexrayPhysicalChannel> + Send + use<>
pub fn connected_channels( &self, ) -> impl Iterator<Item = FlexrayPhysicalChannel> + Send + use<>
return an iterator over the FlexrayPhysicalChannels connected to this controller
§Example
let flexray_controller = ecu_instance.create_flexray_communication_controller("FRCtrl")?;
flexray_controller.connect_physical_channel("connection", &physical_channel)?;
for channel in flexray_controller.connected_channels() {
// ...
}§Errors
AutosarAbstractionError::ModelErrorAn error occurred in the Autosar model
Sourcepub fn connect_physical_channel(
&self,
connection_name: &str,
flx_channel: &FlexrayPhysicalChannel,
) -> Result<FlexrayCommunicationConnector, AutosarAbstractionError>
pub fn connect_physical_channel( &self, connection_name: &str, flx_channel: &FlexrayPhysicalChannel, ) -> Result<FlexrayCommunicationConnector, AutosarAbstractionError>
Connect this FlexrayCommunicationController inside an EcuInstance to a FlexrayPhysicalChannel in the crate::System
Creates a FlexrayCommunicationConnector in the EcuInstance that contains this FlexrayCommunicationController.
This function establishes the relationships:
FlexrayPhysicalChannel->FlexrayCommunicationConnectorFlexrayCommunicationConnector->FlexrayCommunicationController
§Example
let flexray_controller = ecu_instance.create_flexray_communication_controller("FlxCtrl")?;
flexray_controller.connect_physical_channel("connection", &physical_channel)?;§Errors
AutosarAbstractionError::ModelErrorAn error occurred in the Autosar model while trying to create the ECU-INSTANCE
Trait Implementations§
Source§impl AbstractCommunicationController for FlexrayCommunicationController
impl AbstractCommunicationController for FlexrayCommunicationController
Source§fn ecu_instance(&self) -> Result<EcuInstance, AutosarAbstractionError>
fn ecu_instance(&self) -> Result<EcuInstance, AutosarAbstractionError>
Source§impl Clone for FlexrayCommunicationController
impl Clone for FlexrayCommunicationController
Source§fn clone(&self) -> FlexrayCommunicationController
fn clone(&self) -> FlexrayCommunicationController
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 From<FlexrayCommunicationController> for CommunicationController
impl From<FlexrayCommunicationController> for CommunicationController
Source§fn from(value: FlexrayCommunicationController) -> Self
fn from(value: FlexrayCommunicationController) -> Self
Converts to this type from the input type.
Source§impl From<FlexrayCommunicationController> for Element
impl From<FlexrayCommunicationController> for Element
Source§fn from(val: FlexrayCommunicationController) -> Self
fn from(val: FlexrayCommunicationController) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FlexrayCommunicationController
impl PartialEq for FlexrayCommunicationController
Source§fn eq(&self, other: &FlexrayCommunicationController) -> bool
fn eq(&self, other: &FlexrayCommunicationController) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for FlexrayCommunicationController
impl StructuralPartialEq for FlexrayCommunicationController
Auto Trait Implementations§
impl Freeze for FlexrayCommunicationController
impl !RefUnwindSafe for FlexrayCommunicationController
impl Send for FlexrayCommunicationController
impl Sync for FlexrayCommunicationController
impl Unpin for FlexrayCommunicationController
impl !UnwindSafe for FlexrayCommunicationController
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.