pub struct CanTpConfig(/* private fields */);
Expand description
Container for CanTp
configuration
There should be one CanTpConfig
for each CAN network in the system
Implementations§
Source§impl CanTpConfig
impl CanTpConfig
Sourcepub fn set_cluster(
&self,
cluster: &CanCluster,
) -> Result<(), AutosarAbstractionError>
pub fn set_cluster( &self, cluster: &CanCluster, ) -> Result<(), AutosarAbstractionError>
set the CanCluster
associated with this configuration
Sourcepub fn cluster(&self) -> Option<CanCluster>
pub fn cluster(&self) -> Option<CanCluster>
get the CanCluster
associated with this configuration
Sourcepub fn create_can_tp_ecu(
&self,
ecu_instance: &EcuInstance,
cycle_time_main_function: Option<f64>,
) -> Result<CanTpEcu, AutosarAbstractionError>
pub fn create_can_tp_ecu( &self, ecu_instance: &EcuInstance, cycle_time_main_function: Option<f64>, ) -> Result<CanTpEcu, AutosarAbstractionError>
create a CanTp
ECU in the configuration
Sourcepub fn can_tp_ecus(&self) -> impl Iterator<Item = CanTpEcu> + Send + 'static
pub fn can_tp_ecus(&self) -> impl Iterator<Item = CanTpEcu> + Send + 'static
get all of the ECUs in the configuration
Sourcepub fn create_can_tp_address(
&self,
name: &str,
address: u32,
) -> Result<CanTpAddress, AutosarAbstractionError>
pub fn create_can_tp_address( &self, name: &str, address: u32, ) -> Result<CanTpAddress, AutosarAbstractionError>
create a new CanTpAddress
in the configuration
Sourcepub fn can_tp_addresses(
&self,
) -> impl Iterator<Item = CanTpAddress> + Send + 'static
pub fn can_tp_addresses( &self, ) -> impl Iterator<Item = CanTpAddress> + Send + 'static
get all of the Can Tp addresses in the configuration
Sourcepub fn create_can_tp_channel(
&self,
name: &str,
channel_id: u32,
mode: CanTpChannelMode,
) -> Result<CanTpChannel, AutosarAbstractionError>
pub fn create_can_tp_channel( &self, name: &str, channel_id: u32, mode: CanTpChannelMode, ) -> Result<CanTpChannel, AutosarAbstractionError>
create a new CanTpChannel
in the configuration
Sourcepub fn can_tp_channels(
&self,
) -> impl Iterator<Item = CanTpChannel> + Send + 'static
pub fn can_tp_channels( &self, ) -> impl Iterator<Item = CanTpChannel> + Send + 'static
iterate over all CanTpChannel
s in the configuration
Sourcepub fn create_can_tp_connection<T: AbstractIpdu>(
&self,
name: Option<&str>,
addressing_format: CanTpAddressingFormat,
can_tp_channel: &CanTpChannel,
data_pdu: &NPdu,
tp_sdu: &T,
padding_activation: bool,
) -> Result<CanTpConnection, AutosarAbstractionError>
pub fn create_can_tp_connection<T: AbstractIpdu>( &self, name: Option<&str>, addressing_format: CanTpAddressingFormat, can_tp_channel: &CanTpChannel, data_pdu: &NPdu, tp_sdu: &T, padding_activation: bool, ) -> Result<CanTpConnection, AutosarAbstractionError>
create a new CanTpConnection
in the configuration
Sourcepub fn can_tp_connections(
&self,
) -> impl Iterator<Item = CanTpConnection> + Send + 'static
pub fn can_tp_connections( &self, ) -> impl Iterator<Item = CanTpConnection> + Send + 'static
iterate over all CanTpConnections
in the configuration
Sourcepub fn create_can_tp_node(
&self,
name: &str,
) -> Result<CanTpNode, AutosarAbstractionError>
pub fn create_can_tp_node( &self, name: &str, ) -> Result<CanTpNode, AutosarAbstractionError>
create a new CanTpNode
in the configuration
Sourcepub fn can_tp_nodes(&self) -> impl Iterator<Item = CanTpNode> + Send + 'static
pub fn can_tp_nodes(&self) -> impl Iterator<Item = CanTpNode> + Send + 'static
get all of the CanTpNodes
in the configuration
Trait Implementations§
Source§impl AbstractionElement for CanTpConfig
impl AbstractionElement for CanTpConfig
Source§impl Clone for CanTpConfig
impl Clone for CanTpConfig
Source§fn clone(&self) -> CanTpConfig
fn clone(&self) -> CanTpConfig
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 CanTpConfig
impl Debug for CanTpConfig
Source§impl From<CanTpConfig> for Element
impl From<CanTpConfig> for Element
Source§fn from(val: CanTpConfig) -> Self
fn from(val: CanTpConfig) -> Self
Converts to this type from the input type.
Source§impl Hash for CanTpConfig
impl Hash for CanTpConfig
Source§impl PartialEq for CanTpConfig
impl PartialEq for CanTpConfig
Source§impl TryFrom<Element> for CanTpConfig
impl TryFrom<Element> for CanTpConfig
impl Eq for CanTpConfig
impl StructuralPartialEq for CanTpConfig
Auto Trait Implementations§
impl Freeze for CanTpConfig
impl !RefUnwindSafe for CanTpConfig
impl Send for CanTpConfig
impl Sync for CanTpConfig
impl Unpin for CanTpConfig
impl !UnwindSafe for CanTpConfig
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.