pub struct LinCluster(/* private fields */);Expand description
A LinCluster contains all configuration items associated with a LIN network.
The cluster connects multiple ECUs.
Implementations§
Source§impl LinCluster
impl LinCluster
Sourcepub fn create_physical_channel(
&self,
channel_name: &str,
) -> Result<LinPhysicalChannel, AutosarAbstractionError>
pub fn create_physical_channel( &self, channel_name: &str, ) -> Result<LinPhysicalChannel, AutosarAbstractionError>
Create a new physical channel for the cluster
A LIN cluster must contain exactly one physical channel; trying to add a second one triggers an error.
§Example
let cluster = system.create_lin_cluster("Cluster", &package)?;
let channel = cluster.create_physical_channel("Channel")?;§Errors
AutosarAbstractionError::ItemAlreadyExistsThere is already a physical channel in this LIN clusterAutosarAbstractionError::ModelErrorAn error occurred in the Autosar model while trying to create the ECU-INSTANCE
Sourcepub fn physical_channel(&self) -> Option<LinPhysicalChannel>
pub fn physical_channel(&self) -> Option<LinPhysicalChannel>
return the LinPhysicalChannel of the Cluster, if it has been created
§Example
if let Some(channel) = cluster.physical_channel() {
}Trait Implementations§
Source§impl AbstractCluster for LinCluster
impl AbstractCluster for LinCluster
Source§impl AbstractionElement for LinCluster
impl AbstractionElement for LinCluster
Source§impl Clone for LinCluster
impl Clone for LinCluster
Source§fn clone(&self) -> LinCluster
fn clone(&self) -> LinCluster
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 LinCluster
impl Debug for LinCluster
Source§impl From<LinCluster> for Cluster
impl From<LinCluster> for Cluster
Source§fn from(value: LinCluster) -> Self
fn from(value: LinCluster) -> Self
Converts to this type from the input type.
Source§impl From<LinCluster> for Element
impl From<LinCluster> for Element
Source§fn from(val: LinCluster) -> Self
fn from(val: LinCluster) -> Self
Converts to this type from the input type.
Source§impl Hash for LinCluster
impl Hash for LinCluster
Source§impl PartialEq for LinCluster
impl PartialEq for LinCluster
Source§impl TryFrom<Element> for LinCluster
impl TryFrom<Element> for LinCluster
impl Eq for LinCluster
impl StructuralPartialEq for LinCluster
Auto Trait Implementations§
impl Freeze for LinCluster
impl !RefUnwindSafe for LinCluster
impl Send for LinCluster
impl Sync for LinCluster
impl Unpin for LinCluster
impl !UnwindSafe for LinCluster
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.