ASR Network Management
Tags: programming, softwaredevelopment, softwareengineering, software
Published: 2023-12-20 18:03:53

Hello Readers,
My name is Santosha S Chikkur, and I work at Luxoft India as a Junior Software Developer. Luxoft has given me several opportunities to work on various projects, which has inspired me to learn the essential processes involved in developing AUTOSAR Modulеs and Add-Ons in ASR Network Management.


**Introduction To AUTOSAR**

AUTOSAR is a global partnership of leading companies in the automotive and software industries that develops and creates a standardized software framework and open E/E system architecture to advance intelligent mobility.




![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0ftwb4ajjv8uf0vrz882.png)


**What Is Network Management**

• Network management is the process of managing, managing and operating an information network management system.
• Current network management systems use software and hardware to continuously collect, analyze and transmit data
out configuration changes for increasing
1. Performance
2. Reliability
3. Security
• This involves defining the control and, where possible, redefining the network components for which it is intended
1. Optimal Performance
2. Minimum Downtime
3. Proper Security
4. Accountability
5. Flexibility


**Why Is It Needed?**

• As a computer network grows from a handful of machines to hundreds or thousands of connected network devices, the complexity of the network also increases. The ability to manage, monitor, and effectively manage the entire network is part of network management. 
• Network management is a multifaceted discipline that provides network administrators with network management tools, protocols, and processes that enable optimized network operations. 
• Network management includes several functions important for network optimization and continuous availability.
• This includes defining monitoring and redefining the possible network components it is intended to provide
1. Optimal Performance
2. Minimum Downtime
3. Proper Security
4. Accountability
5. Flexibility

**NM In AUTOSAR**

• The network management interface is a customization layer between AUTOSAR Communication Manager and AUTOSAR bus-specific network management modules (e.g. CAN Network Management and FlexRay Network Management). This is also referred to as Basic functionality.
• In addition, this document describes interoperability between multiple networks connected to the same (coordinator) ECU and using AUTOSAR NM, where means that these grids can be placed synchronously to sleep. This is also referred to as NM Coordinator functionality.
• Support for the NM Coordinator feature is optional. A Network Management Interface implementation can either support only Basic functionality or both Basic functionality and NM Coordinator functionality.
• The Network Management Interface is constructed to support generic lower layer modules that follow a fixed set of requirement for bus specific NM modules. This allows third parties to provide support for OEM-specific or legacy NM protocols, such as direct OSEK NM.


**NM In AUTOSAR (Contd.)**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s4pg5o36s0r9ns2h5dnq.png)

**NETWORK MANAGEMENT MODULES**

-  ComM
    1. ComM handles the user communication mode requests
    2. ComM simplifies the resource management for the users

-  NmIf
      Nm is just a general interface that works a dispatcher 
      between ComM and BusNM

-  BusNM
    1. BusNM coordinates the different NM states and the 
       transitions between them
    2. BusNM is responsible for sending/receiving Bus NM
       messages

- BusSM
     BusSM handles the communication system dependent Start-
     up and Shutdown features



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vdxpexkk0oz9ykyw1gh5.png)

**NETWORK MANAGEMENT MODULES**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4pc62906ve7quh4ryxc5.png)

**NM In AUTOSAR (Contd.)**

•The NM Interface functionality consists of two parts:
    – Basic function required to complete together with 
     the bus specific NM modules, AUTOSAR NM on an ECU. The 
     Generic Network Management Interface module (Nm) shall 
     acts as a bus-independent matching layer bus-specific Network 
     Management modules (such as CanNm, J1939Nm, FrNm, LinNm and 
     UdpNm) and the Communication Manager module (ComM).
    – NM coordination function used by gateway ECUs 
     to synchronously shut down one or more buses. NM 
     Coordinator functionality is a functionality of Nm that 
     uses a coordination algorithm to coordinate the NM stop 
     in all or one or more independent subsets of the busses 
     that the ECU is connected to. The ECU uses the NM, n 
     which actively fills the NM Coordinator functionality 
     is commonly referred to as an NM Coordinator.
• Note: It is also required that other service layer modules access network management functions exclusively via Nm
and that no bypasses to bus specific NM functions exist.

**Wakeup/Abortion Of Coordinated Shutdown**

• Nm is not responsible for normal wakeup of the node or the networks this will be done by the COM Manager (ComM).
1. External Network Wakeup: For both Basic functionality and NM Coordination functionality, Nm will forward wakeup indications from the networks (indicated by the bus specific NMs calling the callback Nm_NetworkStartIndication) to the ComM by calling ComM_Nm_NetworkStartIndication(). ComM will then call Nm_PassiveStartUp(), which will be forwarded by Nm to the corresponding interface of the bus specific NM. 
EcuM and ComM handle the processing of wake-up events (related to radio receiver and controller status) on channels in the bus sleep mode. No interaction of the Nm apply here. Nm will get the network request from ComM as stated above, depending on the wake-up validation and the respective communication needs.

2.Coordinated Wakeup: Depending on the configuration, ComM can start multiple networks based on the indication from one network. 
It is recommended that ComM be configured to automatically start all networks in the NM coordination set when one of the networks reports that the network has started, but this is not always necessary. Since the wakeup of the network is outside the scope of Nm, this is independent of whether the NM Coordination functionality is used or not.

3. Abortion Of The Coordinated Shutdown: If the NM Coordination functionality is activated and coordinated shutdown has been initiated on an NM Coordination Cluster, dependent on the coordinator algorithm configuration 
it may take some time before each involved bus is released. If any node on one of the coordinated buses changes its state and starts requesting the network before all networks are released, race conditions can occur in the coordination algorithm.