pub trait AbstractNmNode: AbstractionElement {
type CommunicationControllerType: AbstractCommunicationController;
// Provided methods
fn set_communication_controller(
&self,
controller: &Self::CommunicationControllerType,
) -> Result<(), AutosarAbstractionError> { ... }
fn communication_controller(
&self,
) -> Option<Self::CommunicationControllerType> { ... }
fn set_nm_ecu(&self, ecu: &NmEcu) -> Result<(), AutosarAbstractionError> { ... }
fn nm_ecu(&self) -> Option<NmEcu> { ... }
fn set_node_id(
&self,
value: Option<u32>,
) -> Result<(), AutosarAbstractionError> { ... }
fn node_id(&self) -> Option<u32> { ... }
fn set_passive_mode(
&self,
value: Option<bool>,
) -> Result<(), AutosarAbstractionError> { ... }
fn passive_mode(&self) -> Option<bool> { ... }
fn add_rx_nm_pdu(
&self,
nm_pdu: &NmPdu,
) -> Result<(), AutosarAbstractionError> { ... }
fn rx_nm_pdus(&self) -> impl Iterator<Item = NmPdu> + Send + 'static { ... }
fn add_tx_nm_pdu(
&self,
nm_pdu: &NmPdu,
) -> Result<(), AutosarAbstractionError> { ... }
fn tx_nm_pdus(&self) -> impl Iterator<Item = NmPdu> + Send + 'static { ... }
}
Expand description
AbstractNmNode
is a common interface for all bus specific NM nodes and provides common functionality.
The NmNode
represents a node in the network management.
Each NmNode
is connected to a CommunicationController
and an NmEcu
.
Required Associated Types§
Sourcetype CommunicationControllerType: AbstractCommunicationController
type CommunicationControllerType: AbstractCommunicationController
type of the communication controller connected to this node
Provided Methods§
Sourcefn set_communication_controller(
&self,
controller: &Self::CommunicationControllerType,
) -> Result<(), AutosarAbstractionError>
fn set_communication_controller( &self, controller: &Self::CommunicationControllerType, ) -> Result<(), AutosarAbstractionError>
set the referenced CommunicationController
Sourcefn communication_controller(&self) -> Option<Self::CommunicationControllerType>
fn communication_controller(&self) -> Option<Self::CommunicationControllerType>
get the referenced CommunicationController
Sourcefn set_nm_ecu(&self, ecu: &NmEcu) -> Result<(), AutosarAbstractionError>
fn set_nm_ecu(&self, ecu: &NmEcu) -> Result<(), AutosarAbstractionError>
set the referenced NmEcu
Sourcefn set_node_id(&self, value: Option<u32>) -> Result<(), AutosarAbstractionError>
fn set_node_id(&self, value: Option<u32>) -> Result<(), AutosarAbstractionError>
set the nmNodeId This value is optional; if it is set to Some(x) the value is created, if it is set to None the value is removed.
Sourcefn set_passive_mode(
&self,
value: Option<bool>,
) -> Result<(), AutosarAbstractionError>
fn set_passive_mode( &self, value: Option<bool>, ) -> Result<(), AutosarAbstractionError>
set ot remove the nmPassiveModeEnabled flag
This flag is optional; if it is set to Some(x) the value is created, if it is set to None the value is removed.
Sourcefn passive_mode(&self) -> Option<bool>
fn passive_mode(&self) -> Option<bool>
get the nmPassiveModeEnabled flag
Sourcefn add_rx_nm_pdu(&self, nm_pdu: &NmPdu) -> Result<(), AutosarAbstractionError>
fn add_rx_nm_pdu(&self, nm_pdu: &NmPdu) -> Result<(), AutosarAbstractionError>
add an Rx NmPdu
Every NmNode
must have at least one Rx NmPdu
Sourcefn rx_nm_pdus(&self) -> impl Iterator<Item = NmPdu> + Send + 'static
fn rx_nm_pdus(&self) -> impl Iterator<Item = NmPdu> + Send + 'static
iterate over all RX NmPdus
Sourcefn add_tx_nm_pdu(&self, nm_pdu: &NmPdu) -> Result<(), AutosarAbstractionError>
fn add_tx_nm_pdu(&self, nm_pdu: &NmPdu) -> Result<(), AutosarAbstractionError>
add a Tx NmPdu
Active NmNodes
must have at least one Tx NmPdu
, while passive NmNodes
may have none.
Sourcefn tx_nm_pdus(&self) -> impl Iterator<Item = NmPdu> + Send + 'static
fn tx_nm_pdus(&self) -> impl Iterator<Item = NmPdu> + Send + 'static
iterate over all TX NmPdus
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.