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 add_ecu(&self, tp_ecu: &CanTpEcu) -> Result<(), AutosarAbstractionError>
pub fn add_ecu(&self, tp_ecu: &CanTpEcu) -> Result<(), AutosarAbstractionError>
add a CanTp ECU to the configuration
Sourcepub fn create_address(
&self,
name: &str,
address: u32,
) -> Result<CanTpAddress, AutosarAbstractionError>
pub fn create_address( &self, name: &str, address: u32, ) -> Result<CanTpAddress, AutosarAbstractionError>
create a new CanTpAddress in the configuration
Sourcepub fn addresses(&self) -> impl Iterator<Item = CanTpAddress>
pub fn addresses(&self) -> impl Iterator<Item = CanTpAddress>
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 create_can_tp_connection(
&self,
name: Option<&str>,
addressing_format: CanTpAddressingFormat,
can_tp_channel: &CanTpChannel,
data_pdu: &NPdu,
tp_sdu: &Pdu,
padding_activation: bool,
) -> Result<CanTpConnection, AutosarAbstractionError>
pub fn create_can_tp_connection( &self, name: Option<&str>, addressing_format: CanTpAddressingFormat, can_tp_channel: &CanTpChannel, data_pdu: &NPdu, tp_sdu: &Pdu, padding_activation: bool, ) -> Result<CanTpConnection, AutosarAbstractionError>
create a new CanTpConnection in the configuration
Sourcepub fn connections(&self) -> impl Iterator<Item = CanTpConnection>
pub fn connections(&self) -> impl Iterator<Item = CanTpConnection>
get all of the 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
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 copy 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.