pub struct CanTpConnection(/* private fields */);
Expand description
A connection identifies the sender and the receiver of this particular communication.
The CanTp
module routes a Pdu through this connection.
Implementations§
Source§impl CanTpConnection
impl CanTpConnection
Sourcepub fn set_channel(
&self,
channel: &CanTpChannel,
) -> Result<(), AutosarAbstractionError>
pub fn set_channel( &self, channel: &CanTpChannel, ) -> Result<(), AutosarAbstractionError>
set the CanTpChannel
associated with this connection
Sourcepub fn channel(&self) -> Option<CanTpChannel>
pub fn channel(&self) -> Option<CanTpChannel>
get the CanTpChannel
associated with this connection
Sourcepub fn set_data_pdu(
&self,
data_pdu: &NPdu,
) -> Result<(), AutosarAbstractionError>
pub fn set_data_pdu( &self, data_pdu: &NPdu, ) -> Result<(), AutosarAbstractionError>
set the NPdu
associated with this connection
Sourcepub fn data_pdu(&self) -> Option<NPdu>
pub fn data_pdu(&self) -> Option<NPdu>
get the NPdu
associated with this connection
This is the Pdu that is sent over the CAN network
Sourcepub fn set_tp_sdu<T: AbstractIpdu>(
&self,
tp_sdu: &T,
) -> Result<(), AutosarAbstractionError>
pub fn set_tp_sdu<T: AbstractIpdu>( &self, tp_sdu: &T, ) -> Result<(), AutosarAbstractionError>
set the IPdu
associated with this connection
Sourcepub fn tp_sdu(&self) -> Option<IPdu>
pub fn tp_sdu(&self) -> Option<IPdu>
get the IPdu
associated with this connection
This is the Pdu that is sent over the transport protocol
Sourcepub fn set_addressing_format(
&self,
addressing_format: CanTpAddressingFormat,
) -> Result<(), AutosarAbstractionError>
pub fn set_addressing_format( &self, addressing_format: CanTpAddressingFormat, ) -> Result<(), AutosarAbstractionError>
set the addressing format of the connection
Sourcepub fn addressing_format(&self) -> Option<CanTpAddressingFormat>
pub fn addressing_format(&self) -> Option<CanTpAddressingFormat>
get the addressing format of the connection
Sourcepub fn set_padding_activation(
&self,
padding_activation: bool,
) -> Result<(), AutosarAbstractionError>
pub fn set_padding_activation( &self, padding_activation: bool, ) -> Result<(), AutosarAbstractionError>
set the padding activation of the connection
Sourcepub fn padding_activation(&self) -> Option<bool>
pub fn padding_activation(&self) -> Option<bool>
get the padding activation of the connection
Sourcepub fn set_transmitter(
&self,
transmitter: &CanTpNode,
) -> Result<(), AutosarAbstractionError>
pub fn set_transmitter( &self, transmitter: &CanTpNode, ) -> Result<(), AutosarAbstractionError>
set the transmitter of the connection
This is a CanTpNode
representing an ECU that will send the data
Sourcepub fn transmitter(&self) -> Option<CanTpNode>
pub fn transmitter(&self) -> Option<CanTpNode>
get the transmitter of the connection
Sourcepub fn add_receiver(
&self,
receiver: &CanTpNode,
) -> Result<(), AutosarAbstractionError>
pub fn add_receiver( &self, receiver: &CanTpNode, ) -> Result<(), AutosarAbstractionError>
add a receiver to the connection
This is a CanTpNode
representing an ECU that will receive the data
Trait Implementations§
Source§impl AbstractionElement for CanTpConnection
impl AbstractionElement for CanTpConnection
Source§impl Clone for CanTpConnection
impl Clone for CanTpConnection
Source§fn clone(&self) -> CanTpConnection
fn clone(&self) -> CanTpConnection
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CanTpConnection
impl Debug for CanTpConnection
Source§impl From<CanTpConnection> for Element
impl From<CanTpConnection> for Element
Source§fn from(val: CanTpConnection) -> Self
fn from(val: CanTpConnection) -> Self
Source§impl Hash for CanTpConnection
impl Hash for CanTpConnection
Source§impl IdentifiableAbstractionElement for CanTpConnection
impl IdentifiableAbstractionElement for CanTpConnection
Source§impl PartialEq for CanTpConnection
impl PartialEq for CanTpConnection
Source§impl TryFrom<Element> for CanTpConnection
impl TryFrom<Element> for CanTpConnection
impl Eq for CanTpConnection
impl StructuralPartialEq for CanTpConnection
Auto Trait Implementations§
impl Freeze for CanTpConnection
impl !RefUnwindSafe for CanTpConnection
impl Send for CanTpConnection
impl Sync for CanTpConnection
impl Unpin for CanTpConnection
impl !UnwindSafe for CanTpConnection
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
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
key
and return true
if they are equal.