Trait AbstractNmNode

Source
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§

Source

type CommunicationControllerType: AbstractCommunicationController

type of the communication controller connected to this node

Provided Methods§

Source

fn set_communication_controller( &self, controller: &Self::CommunicationControllerType, ) -> Result<(), AutosarAbstractionError>

set the referenced CommunicationController

Source

fn communication_controller(&self) -> Option<Self::CommunicationControllerType>

get the referenced CommunicationController

Source

fn set_nm_ecu(&self, ecu: &NmEcu) -> Result<(), AutosarAbstractionError>

set the referenced NmEcu

Source

fn nm_ecu(&self) -> Option<NmEcu>

get the referenced NmEcu

Source

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.

Source

fn node_id(&self) -> Option<u32>

get the nmNodeId

Source

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.

Source

fn passive_mode(&self) -> Option<bool>

get the nmPassiveModeEnabled flag

Source

fn add_rx_nm_pdu(&self, nm_pdu: &NmPdu) -> Result<(), AutosarAbstractionError>

add an Rx NmPdu

Every NmNode must have at least one Rx NmPdu

Source

fn rx_nm_pdus(&self) -> impl Iterator<Item = NmPdu> + Send + 'static

iterate over all RX NmPdus

Source

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.

Source

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.

Implementors§