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