0% found this document useful (0 votes)
178 views

AUTOSAR SWS NetworkManagementInterface

Uploaded by

Stefan Ruscanu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
178 views

AUTOSAR SWS NetworkManagementInterface

Uploaded by

Stefan Ruscanu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 114

Specification of Network Management Interface

AUTOSAR CP R20-11

Specification of Network
Document Title Management Interface
Document Owner AUTOSAR
Document Responsibility AUTOSAR
Document Identification No 228

Document Status published


Part of AUTOSAR Standard Classic Platform
Part of Standard Release R20-11

Document Change History


Date Release Changed by Description
• Support for synchronized PNC
shutdown functionality
• Introduction of Dynamic
PNC-to-channel-mapping and PNC
AUTOSAR Learning algorithm
2020-11-30 R20-11 Release • Added limitation regarding Nm
Management Coordinator functionality when using
10BASE-T1S in combination with
PLCA media access
• Support for passing NM state
change to SwC
• Editorial changes
• Minor changes
AUTOSAR • Multicore Distribution support (draft)
2019-11-28 R19-11 Release added
Management • Changed Document Status from
Final to published

AUTOSAR • Removed LinNM from the


2018-10-31 4.4.0 Release architecture
Management • Removed obsolete elements
• Header File Cleanup
AUTOSAR • minor corrections / clarifications /
2017-12-08 4.3.1 Release editorial changes; For details please
Management refer to the ChangeDocumentation

1 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

• Add functionality for synchronizing


channel A and channel B
AUTOSAR • removed dependencies of
2016-11-30 4.3.0 Release ComMChannels to each other in
Management respect to NMVariants
• minor corrections / clarifications /
editorial changes; For details please
refer to the ChangeDocumentation
• "‘Coordination algorithm"’ and
"‘Coordinated shutdown"’ redefined
AUTOSAR • Make the CarWakeup feature
2015-07-31 4.2.2 Release available
Management • Debugging support marked as
obsolete
• Editorial changes
• Corrections on the requirement
AUTOSAR tracing
2014-10-31 4.2.1 Release • Clarification at use of callback versus
Management callout
• Editorial changes

AUTOSAR • Rework of wakeup and abortion of


2014-03-31 4.1.3 Release coordinated shutdown
Management • Rework of coordination of nested
sub-busses
• Remove DEM usage
• Correct multiplicity and dependency
of configuration parameter
• Corrections on
AUTOSAR RemoteSleepIndication feature
2013-10-31 4.1.2 Release • Corrections on MainFunction and
Managment coordinated shutdown
• Formal correction on REQ Tags
• Editorial changes
• Removed chapter(s) on change
documentation

2 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

• Introduction J1939Nm
• Merged and corrected calculation of
delay timer for Coordination
AUTOSAR Algorithm
2013-03-15 4.1.1 • Correction of parametrization and
Administration
Services for Coordinator
Synchonization Algorithm
• Moved Nm_Passive_Mode_Enabled
Parameter back to global container
• NmMultipleChannelsEnabled
removed
• Added Mandatory Interfaces
provided by ComM to Chapter 8.6.1
• move NmPassiveMode
• Enabled form global configuration to
AUTOSAR channel configuration
2011-12-22 4.0.3 • Removed Nm_ReturnType
Administration
• Fixed some min and max values of
FloatPAramDef configuration
parameters
• Added support of
NmCarWakup-Feature
• Added support of coordinated
shutdown of nested sub-busses
• Release check added
• DET Error Code for false Pointer
AUTOSAR added
2009-12-18 4.0.1 • ChannelID harmonized in
Administration
COM-Stack
• Nm-State-changes in Userdata via
NmIf
• Remove explicit support for OSEK
NM from specification
• NM Coordinator functionality
AUTOSAR reworked (chapter 7.2 and 7.2.4)
2010-02-02 3.1.4
Administration • Debugging functionality added
• Link time configuration variant
introduced
• Legal disclaimer revised
AUTOSAR
2008-08-13 3.1.1 Legal disclaimer revised
Administration
AUTOSAR
2007-12-21 3.0.1 Initial release
Administration

3 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Disclaimer

This work (specification and/or software implementation) and the material contained in
it, as released by AUTOSAR, is for the purpose of information only. AUTOSAR and the
companies that have contributed to it shall not be liable for any use of the work.
The material contained in this work is protected by copyright and other types of intel-
lectual property rights. The commercial exploitation of the material contained in this
work requires a license to such intellectual property rights.
This work may be utilized or reproduced without any modification, in any form or by
any means, for informational purposes only. For any other purpose, no part of the work
may be utilized or reproduced, in any form or by any means, without permission in
writing from the publisher.
The work has been developed for automotive applications only. It has neither been
developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.

4 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Table of Contents
1 Introduction and functional overview 8

2 Acronyms and Abbreviations 9

3 Related documentation 11
3.1 Input documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Related specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4 Constraints and assumptions 12
4.1 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.2 Specific limitations of the current release . . . . . . . . . . . . . . . . . 12
4.3 Applicability to automotive domains . . . . . . . . . . . . . . . . . . . . 13
5 Dependencies to other modules 14
5.1 Interfaces to modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.1.1 ComM, CanNm, J1939Nm, FrNm, UdpNm, generic bus spe-
cific NM layers and CDD . . . . . . . . . . . . . . . . . . . . 16
5.1.2 Error handling modules . . . . . . . . . . . . . . . . . . . . . 16
5.1.3 BSW Scheduler . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.2 File structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.2.1 Code file structure . . . . . . . . . . . . . . . . . . . . . . . . 17
5.2.2 Header file structure . . . . . . . . . . . . . . . . . . . . . . . 17
6 Requirements traceability 18

7 Functional specification 38
7.1 Base functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
7.2 NM Coordinator functionality . . . . . . . . . . . . . . . . . . . . . . . . 38
7.2.1 Applicability of the NM Coordinator functionality . . . . . . . 39
7.2.2 Keeping coordinated busses alive . . . . . . . . . . . . . . . 40
7.2.3 Shutdown of coordinated busses . . . . . . . . . . . . . . . . 41
7.2.4 Coordination of nested sub-busses . . . . . . . . . . . . . . 43
7.2.5 Calculation of shutdown timers . . . . . . . . . . . . . . . . . 47
7.2.6 Synchronization Use Case 1 - Synchronous command . . . 47
7.2.7 Synchronization Use Case 2 - Synchronous initiation . . . . 48
7.2.8 Synchronization Use Case 3 - Synchronous network sleep . 48
7.2.8.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . 49
7.3 Wakeup and abortion of the coordinated shutdown . . . . . . . . . . . 51
7.3.1 External network wakeup . . . . . . . . . . . . . . . . . . . . 51
7.3.2 Coordinated wakeup . . . . . . . . . . . . . . . . . . . . . . . 51
7.3.3 Abortion of the coordinated shutdown . . . . . . . . . . . . . 51
7.4 Synchronized PNC shutdown functionality . . . . . . . . . . . . . . . . 53
7.5 Prerequisites of bus specific Network Management modules . . . . . . 54
7.5.1 Prerequisites for basic functionality . . . . . . . . . . . . . . 55
7.5.2 Prerequisites for NM Coordinator functionality . . . . . . . . 56

5 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

7.5.3 Prerequisites for synchronized PNC shutdown functionality . 58


7.5.4 Configuration of global parameters for bus specific networks 58
7.6 NM_BUSNM_LOCALNM . . . . . . . . . . . . . . . . . . . . . . . . . . 59
7.7 Multicore Distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
7.8 Additional Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
7.8.1 Nm_CarWakeUpIndication . . . . . . . . . . . . . . . . . . . 59
7.8.2 Nm_StateChangeNotification . . . . . . . . . . . . . . . . . . 60
7.9 Error classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
7.9.1 Development Errors . . . . . . . . . . . . . . . . . . . . . . . 61
7.9.2 Runtime Errors . . . . . . . . . . . . . . . . . . . . . . . . . . 61
7.9.3 Transient Faults . . . . . . . . . . . . . . . . . . . . . . . . . 61
7.9.4 Production Errors . . . . . . . . . . . . . . . . . . . . . . . . 61
7.9.5 Extended Production Errors . . . . . . . . . . . . . . . . . . . 61
8 API specification 62
8.1 Imported types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
8.2 Type definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
8.2.1 Nm_ModeType . . . . . . . . . . . . . . . . . . . . . . . . . . 62
8.2.2 Nm_StateType . . . . . . . . . . . . . . . . . . . . . . . . . . 62
8.2.3 Nm_BusNmType . . . . . . . . . . . . . . . . . . . . . . . . . 63
8.2.4 Nm_ConfigType . . . . . . . . . . . . . . . . . . . . . . . . . 63
8.3 Function definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
8.3.1 Standard services provided by NM Interface . . . . . . . . . 64
8.3.1.1 Nm_Init . . . . . . . . . . . . . . . . . . . . . . . . . 64
8.3.1.2 Nm_PassiveStartUp . . . . . . . . . . . . . . . . . . 65
8.3.1.3 Nm_NetworkRequest . . . . . . . . . . . . . . . . . 65
8.3.1.4 Nm_NetworkRelease . . . . . . . . . . . . . . . . . . 66
8.3.2 Communication control services provided by NM Interface . 67
8.3.2.1 Nm_DisableCommunication . . . . . . . . . . . . . . 67
8.3.2.2 Nm_EnableCommunication . . . . . . . . . . . . . . 68
8.3.3 Partial Network services provided by NM Interface . . . . . . 69
8.3.3.1 Nm_RequestSynchronizedPncShutdown . . . . . . . 69
8.3.4 Extra services provided by NM Interface . . . . . . . . . . . . 70
8.3.4.1 Nm_SetUserData . . . . . . . . . . . . . . . . . . . . 70
8.3.4.2 Nm_GetUserData . . . . . . . . . . . . . . . . . . . 71
8.3.4.3 Nm_GetPduData . . . . . . . . . . . . . . . . . . . . 72
8.3.4.4 Nm_RepeatMessageRequest . . . . . . . . . . . . . 73
8.3.4.5 Nm_GetNodeIdentifier . . . . . . . . . . . . . . . . . 74
8.3.4.6 Nm_GetLocalNodeIdentifier . . . . . . . . . . . . . . 74
8.3.4.7 Nm_CheckRemoteSleepIndication . . . . . . . . . . 75
8.3.4.8 Nm_GetState . . . . . . . . . . . . . . . . . . . . . . 76
8.3.4.9 Nm_GetVersionInfo . . . . . . . . . . . . . . . . . . . 77
8.3.4.10 Nm_PnLearningRequest . . . . . . . . . . . . . . . . 77
8.4 Call-back notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
8.4.1 Standard Call-back notifications . . . . . . . . . . . . . . . . 79
8.4.1.1 Nm_NetworkStartIndication . . . . . . . . . . . . . . 79

6 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

8.4.1.2 Nm_NetworkMode . . . . . . . . . . . . . . . . . . . 79
8.4.1.3 Nm_BusSleepMode . . . . . . . . . . . . . . . . . . 80
8.4.1.4 Nm_PrepareBusSleepMode . . . . . . . . . . . . . . 80
8.4.1.5 NM_SynchronizeMode . . . . . . . . . . . . . . . . . 81
8.4.1.6 Nm_RemoteSleepIndication . . . . . . . . . . . . . . 81
8.4.1.7 Nm_RemoteSleepCancellation . . . . . . . . . . . . 82
8.4.1.8 Nm_SynchronizationPoint . . . . . . . . . . . . . . . 83
8.4.1.9 Nm_CoordReadyToSleepIndication . . . . . . . . . . 83
8.4.1.10 Nm_CoordReadyToSleepCancellation . . . . . . . . 84
8.4.1.11 Nm_ForwardSynchronizedPncShutdown . . . . . . . 85
8.4.2 Extra Call-back notifications . . . . . . . . . . . . . . . . . . 85
8.4.2.1 Nm_PduRxIndication . . . . . . . . . . . . . . . . . . 85
8.4.2.2 Nm_StateChangeNotification . . . . . . . . . . . . . 86
8.4.2.3 Nm_RepeatMessageIndication . . . . . . . . . . . . 87
8.4.2.4 Nm_TxTimeoutException . . . . . . . . . . . . . . . 87
8.4.2.5 Nm_CarWakeUpIndication . . . . . . . . . . . . . . . 88
8.5 Scheduled functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
8.5.1 Nm_MainFunction . . . . . . . . . . . . . . . . . . . . . . . . 89
8.6 Expected interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
8.6.1 Mandatory Interfaces . . . . . . . . . . . . . . . . . . . . . . 89
8.6.2 Optional Interfaces . . . . . . . . . . . . . . . . . . . . . . . . 90
8.6.3 Configurable Interfaces . . . . . . . . . . . . . . . . . . . . . 92
8.6.3.1 NmCarWakeUpCallout . . . . . . . . . . . . . . . . . 92
8.7 Version Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
9 Sequence diagrams 93
9.1 Basic functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
9.2 Seq of NM Coordinator functionality . . . . . . . . . . . . . . . . . . . . 93
10 Configuration specification 95
10.1 How to read this chapter . . . . . . . . . . . . . . . . . . . . . . . . . . 95
10.2 Configuration parameters . . . . . . . . . . . . . . . . . . . . . . . . . 95
10.2.1 Nm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
10.3 Global configurable parameters . . . . . . . . . . . . . . . . . . . . . . 96
10.3.1 NmGlobalConfig . . . . . . . . . . . . . . . . . . . . . . . . . 96
10.3.2 NmGlobalConstants . . . . . . . . . . . . . . . . . . . . . . . 98
10.3.3 NmGlobalProperties . . . . . . . . . . . . . . . . . . . . . . . 99
10.3.4 NmGlobalFeatures . . . . . . . . . . . . . . . . . . . . . . . . 100
10.4 Channel configurable parameters . . . . . . . . . . . . . . . . . . . . . 105
10.4.1 NmChannelConfig . . . . . . . . . . . . . . . . . . . . . . . . 105
10.4.2 NmBusType . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
10.4.3 NmGenericBusNmConfig . . . . . . . . . . . . . . . . . . . . 112
10.4.4 NmStandardBusNmConfig . . . . . . . . . . . . . . . . . . . 113
10.5 Published Information . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
A Not applicable requirements 114

7 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

1 Introduction and functional overview


This document describes the concept, interfaces and configuration of the Network
Management Interface module.
The Network Management Interface is an adaptation layer between the AUTOSAR
Communication Manager and the AUTOSAR bus specific network management mod-
ules (e.g. CAN Network Management and FlexRay Network Management). This is
also referred to as Basic functionality.
Additionally, this document describes the interoperability between several networks
connected to the same (coordinator) ECU that run AUTOSAR NM, where ”interoper-
ability“ means that these networks can be put to sleep synchronously. This is also
referred to as NM Coordinator functionality.
Support of the NM Coordinator functionality is optional. A Network Management In-
terface implementation can either support only Basic functionality or both Basic func-
tionality 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 will
allow third parties to offer support for OEM specific or legacy NM protocols such as
direct OSEK NM.

8 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

2 Acronyms and Abbreviations


The glossary below includes acronyms and abbreviations and terms relevant to the
Network Management Interface module that are not included in the [1, AUTOSAR glos-
sary].

Abbreviation / Acronym: Description:


CanIf CAN Interface module
CanNm CAN Network Management module
CC Communication controller
ComM Communication Manager module
EcuM ECU State Manager module
DEM Diagnostic Event Manager module
Generic Network Management Interface module, this ist the abre-
Nm
viation used for this module throughout this specification
NM Network Management
OEM Original Equipment Manufacturer
CBV Control Bit Vector in NM-message
PNC Partial network cluster

Terms: Definition:
Network mode where all interconnected communication con-
Bus-Sleep Mode
trollers are in the sleep mode.
NM-Channel Logical channel associated with the NM-cluster
NM-Cluster Set of NM nodes coordinated with the use of the NM algorithm.
A functionality of the Nm which allows coordination of network
NM-Coordinator
sleep for multiple NM Channels.
Packet of information exchanged for purposes of the NM algo-
NM-Message
rithm.
Timeout in the NM algorithm that initiates transition into Bus-
NM-Timeout
Sleep Mode.
Supplementary application specific piece of data that is attached
NM User Data
to every NM message sent on the bus.
Node address information exchanged for purposes of the NM al-
Node Identifier
gorithm.
Node Identifier List List of Node Identifiers recognized by the NM algorithm.
Physical communication medium to which a NM node/ecu is con-
Bus
nected to.
Entity of all NM nodes/ecus which are connected to the same
network
bus.
channel Logical bus to which the NM node/ecu is connected to.
Shutdown of two or more busses in a way that their shutdown is
Coordinated shutdown
finished coinciding.
Coordination algorithm Initiation of coordinated shutdown in case all conditions are met.
PN info Represent the Partial Network information in a NM frame
PN info range Represent the length of a Partial Network information in bytes
One bit which represent a particular Partial Network in the Partial
PN bit
Network Info Range

9 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Terms: Definition:
The top-level PNC coordinator is an ECU that acts as PNC gate-
way in the network and that handles at least one PNC as actively
Top-level PNC coordinator coordinated on all assigned channels. If synchronized PNC shut-
down is enabled, the top-level PNC coordinator triggers for these
PNCs the shutdown, if no other ECU in the network request them.
An intermediate PNC coordinator is an ECU that acts as PNC
gateway in the network and that handles at least one PNC as
passively coordinated on at least one assigned channel. If syn-
Intermediate PNC coordinator
chronized PNC shutdown is enabled, it forwards received shut-
down requests for these PNCs to the corresponding actively
coordinated channels and starts their shutdown accordingly.
A subordinated PNC node is an ECU that act neither as top-level
PNC coordinator nor as an intermediate PNC coordinator. It act
Subordinated PNC node
as an ECU without a PNC gateway in the network and process
PN shutdown message as usual NM messages.
A top-level PNC coordinator transmits PN shutdown messages to
indicate a synchronized PNC shutdown across the PN topology.
A PN shutdown message is a NM message which has PNSR
bit in the control bit vector and all PNCs which are indicated
for a synchronized shutdown set to ’1’. An intermediate PNC
coordinator which receive a PN shutdown message and forward
PN shutdown request message the PN information as PN shutdown message on the affected
channels.

Note: An intermediate PNC coordinators has to forward the PN


information of received PN shutdown message as fast as pos-
sible to ensure a nearly synchronized shutdown of the affected
PNCs across the PN topology.

10 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

3 Related documentation

3.1 Input documents

[1] Glossary
AUTOSAR_TR_Glossary
[2] General Specification of Basic Software Modules
AUTOSAR_SWS_BSWGeneral
[3] Specification of CAN Network Management
AUTOSAR_SWS_CANNetworkManagement
[4] Specification of FlexRay Network Management
AUTOSAR_SWS_FlexRayNetworkManagement
[5] Specification of UDP Network Management
AUTOSAR_SWS_UDPNetworkManagement
[6] Specification of Network Management for SAE J1939
AUTOSAR_SWS_SAEJ1939NetworkManagement
[7] General Requirements on Basic Software Modules
AUTOSAR_SRS_BSWGeneral
[8] Requirements on Network Management
AUTOSAR_SRS_NetworkManagement
[9] Specification of Communication Manager
AUTOSAR_SWS_COMManager
[10] Guide to BSW Distribution
AUTOSAR_EXP_BSWDistributionGuide

3.2 Related specification


AUTOSAR provides a General Specification on Basic Software modules [2, SWS BSW
General], which is also valid for the Generic Network Management Interface.
Thus, the specification SWS BSW General shall be considered as additional and re-
quired specification for the Generic Network Management Interface.

11 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

4 Constraints and assumptions

4.1 Limitations
1. The Generic Network Management Interface can only be applied to communica-
tion systems that support broadcast communication and ’bus-sleep mode’.
2. There is only one instance of the Generic Network Management Interface layer
for all NM-Clusters. This instance manages all channels where a NM is used.
3. The Generic Network Management Interface shall only include the common
modes, definitions and return values of different bus specific NM layers.
4. The Generic Network Management Interface shall only include the common
modes, definitions and return values of different bus specific NM layers.
5. If 10BASE-T1S is used in combination with PLCA media access, then Nm
Coordinator functionality are not supported.
Note: Consequently, the configuration parameter NmCoordinatorSupport-
Enabled shall be set to false.
Figure 4.1 shows a typical example of the AUTOSAR NM stack.
«module»
:ComM

«module»
:Nm

«mod... «m... «m... «module»


J1939Nm CanNm FrNm UdpNm

«module» «m... «module»


CanIf FrIf SoAd

Figure 4.1: Nm stack modules

4.2 Specific limitations of the current release


The following limitations reflect desired functionality that has yet not been implemented
or agreed upon, but might be added for future releases:
• No support of a back-up coordinator ECU (fault tolerance).
Also; explicit support for OSEK NM has been completely removed from this specifi-
cation as of AUTOSAR Release 4.0. OSEK NM can still be supported by extending
the CanNm or by introducing a Complex Driver (CDD) on BusNm level as a generic
BusNm. Supporting the OSEK NM through a CDD is not specified by AUTOSAR.

12 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

4.3 Applicability to automotive domains


The AUTOSAR NM Interface is generic and provides flexible configuration; it is inde-
pendent of the underlying communication system and can be applied to any automotive
domain under limitations provided above.

13 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

5 Dependencies to other modules

5.1 Interfaces to modules


Figure 5.1 shows the interfaces provided to and required from other modules in the
AUTOSAR BSW.

14 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

«module»
«realize» Nm
«optional»
Nm_SynchronizeMode ComM_Nm_RepeatMessageLeftIndication

«realize»
«optional»
Nm_ComControl BswM_Nm_CarWakeUpIndication
CanNm_RequestSync

«optional» Nm_RequestSynchronizedPncShutdown
«realize» 1..*
Nm_Init <BusNm> F

«optional»
«realize»
Nm_PnLearningRequest Com_SendSignal

«realize»
«optional»
Nm
Det_ReportError
«realize»

«optional»
Nm_RepeatMessageIndication
UdpNm_PassiveStartUp «optional»
«realize» «realize»
«o
Nm_Cbk «realize» «optional»
UdpNm_PnLearningRequest

UdpN

Nm_SynchronizationPoint «optional»
J1939Nm_PassiveStartUp
«realize»

Nm_PrepareBusSleepMode «optional»
CanNm_PnLearningRequest

«optio
«realize»
Nm_MainFunction «optional»
CanNm_PassiveStartUp
«realize»
«optional»
Nm_Types
«realize» FrNm_PnLearningRequest

Nm_Extra «optional»
FrNm_PassiveStartUp

«optional»

ComM_Nm_PncLearningBitIndication

«mandatory»

ComM_Nm

«configurable»

<NmCarWakeUpCallout>

Figure 5.1: Nm’s interfaces to other modules

15 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

5.1.1 ComM, CanNm, J1939Nm, FrNm, UdpNm, generic bus specific NM layers
and CDD

The Generic Network Management Interface module (Nm) provides services to the
Communication Manager (ComM) and uses services of the bus specific Network Man-
agement modules:
• CAN Network Management ([3, CanNm])
• FlexRay Network Management ([4, FrNm])
• Ethernet Network Management ([5, UdpNm]).
• J1939 Network Management ([6, J1939Nm]).
For Buses which do not need to provide Network Management Information on the
bus like for example a LIN-bus the Bus-Type can be configured as "local Nm". With
respect to callbacks, the Nm provides notification callbacks to the bus specific Network
Management modules and calls the notification callbacks provided by the ComM.
In addition to the official AUTOSAR NM-modules above, Nm also support generic bus
specific NM layers (<BusNm>). Any component which implements the required pro-
vided interfaces and uses the provided callback functions of Nm can be used as a bus
specific NM. See section 7.5 for the prerequisites for a generic bus specific NM.
Rationale: Nm is specified to support generic bus specific NM layers by adding generic
lower layer modules as Complex Drivers. As such, Nm does not explicitly use the ser-
vices by the official AUTOSAR bus-NM modules (CanNm, FrNm and UdpNm), but
rather the services of the generic <BusNm>. The AUTOSAR bus-NMs are then explic-
itly supported since they implement the interfaces of <BusNm>.
The optional CarWakeUp-Functionality needs a Complex Driver which Coordinates Ba-
sic Software Mode Management.

5.1.2 Error handling modules

Nm reports development errors to the Default Error Tracer according to


[SWS_Nm_00232].

5.1.3 BSW Scheduler

In case of the NM Coordinator functionality and depending on the configuration, the


Nm will need cyclic invocation of it’s main scheduling function in order to evaluate and
detect when timers have expired.

16 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

5.2 File structure

5.2.1 Code file structure

[SWS_Nm_00247] dThe code file structure shall not be defined within this specification
completely. At this point it shall be pointed out that the code-file structure shall include
the following files named:
c(SRS_BSW_00159, SRS_BSW_00345, SRS_BSW_00419)

5.2.2 Header file structure

[SWS_Nm_00124] dThe following header files shall be included by the Nm Interface


module:
• Std_Types.h (for AUTOSAR standard types )
Note: Platform_Types.h (for platform specific types) and Compiler.h (for com-
piler specific language extensions) are indirectly included via AUTOSAR standard
types.
• ComM_Nm.h (for Communication Manager callback functions)
• BswM_Nm.h (If the BswM is used for CarWakeup-functionalitiy)
c(SRS_BSW_00348, SRS_BSW_00353, SRS_BSW_00357, SRS_BSW_00381,
SRS_BSW_00384, SRS_BSW_00412)
[SWS_Nm_00243] dThe Nm Interface shall optionally include the header file of De-
fault Error Tracer (depending on the pre-processor switch NmDevErrorDetect, see
ECUC_Nm_00203).
• Det.h for service of the Default Error Tracer.
c(SRS_BSW_00171, SRS_BSW_00301, SRS_BSW_00384)

17 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

6 Requirements traceability
The following tables references the requirements specified in [7] as well as [8] and links
to the fulfillment of these.
Requirement Description Satisfied by
[SRS_BSW_00003] All software modules [SWS_Nm_00044]
shall provide version
and identification
information
[SRS_BSW_00004] All Basic SW Modules [SWS_Nm_00999]
shall perform a
pre-processor check
of the versions of all
imported include files
[SRS_BSW_00005] Modules of the µC [SWS_Nm_00999]
Abstraction Layer
(MCAL) may not have
hard coded horizontal
interfaces
[SRS_BSW_00006] The source code of [SWS_Nm_00999]
software modules
above the µC
Abstraction Layer
(MCAL) shall not be
processor and
compiler dependent.
[SRS_BSW_00007] All Basic SW Modules [SWS_Nm_00999]
written in C language
shall conform to the
MISRA C 2012
Standard.
[SRS_BSW_00009] All Basic SW Modules [SWS_Nm_00999]
shall be documented
according to a
common standard.
[SRS_BSW_00010] The memory [SWS_Nm_00999]
consumption of all
Basic SW Modules
shall be documented
for a defined
configuration for all
supported platforms.
[SRS_BSW_00101] The Basic Software [SWS_Nm_00030] [SWS_Nm_00127]
Module shall be able [SWS_Nm_00128] [SWS_Nm_00129]
to initialize variables [SWS_Nm_00131] [SWS_Nm_00133]
and hardware in a [SWS_Nm_00135] [SWS_Nm_00137]
separate initialization [SWS_Nm_00139] [SWS_Nm_00141]
function [SWS_Nm_00143] [SWS_Nm_00145]
[SWS_Nm_00147] [SWS_Nm_00149]
[SWS_Nm_00151]
[SRS_BSW_00158] No description [SWS_Nm_00999]

18 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_BSW_00159] All modules of the [SWS_Nm_00247]
AUTOSAR Basic
Software shall support
a tool based
configuration
[SRS_BSW_00160] Configuration files of [SWS_Nm_00999]
AUTOSAR Basic SW
module shall be
readable for human
beings
[SRS_BSW_00161] The AUTOSAR Basic [SWS_Nm_00999]
Software shall provide
a microcontroller
abstraction layer
which provides a
standardized interface
to higher software
layers
[SRS_BSW_00162] The AUTOSAR Basic [SWS_Nm_00999]
Software shall provide
a hardware
abstraction layer
[SRS_BSW_00164] The Implementation of [SWS_Nm_00999]
interrupt service
routines shall be done
by the Operating
System, complex
drivers or modules
[SRS_BSW_00167] All AUTOSAR Basic [SWS_Nm_00999]
Software Modules
shall provide
configuration rules
and constraints to
enable plausibility
checks
[SRS_BSW_00168] SW components shall [SWS_Nm_00999]
be tested by a function
defined in a common
API in the Basis-SW
[SRS_BSW_00170] The AUTOSAR SW [SWS_Nm_00999]
Components shall
provide information
about their
dependency from
faults, signal qualities,
driver demands
[SRS_BSW_00171] Optional functionality [SWS_Nm_00243]
of a Basic-SW
component that is not
required in the ECU
shall be configurable
at pre-compile-time

19 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_BSW_00172] The scheduling [SWS_Nm_00999]
strategy that is built
inside the Basic
Software Modules
shall be compatible
with the strategy used
in the system
[SRS_BSW_00300] All AUTOSAR Basic [SWS_Nm_00999]
Software Modules
shall be identified by
an unambiguous
name
[SRS_BSW_00301] All AUTOSAR Basic [SWS_Nm_00117] [SWS_Nm_00243]
Software Modules
shall only import the
necessary information
[SRS_BSW_00302] All AUTOSAR Basic [SWS_Nm_00999]
Software Modules
shall only export
information needed by
other modules
[SRS_BSW_00304] All AUTOSAR Basic [SWS_Nm_00999]
Software Modules
shall use the following
data types instead of
native C data types
[SRS_BSW_00305] Data types naming [SWS_Nm_00999]
convention
[SRS_BSW_00306] AUTOSAR Basic [SWS_Nm_00999]
Software Modules
shall be compiler and
platform independent
[SRS_BSW_00307] Global variables [SWS_Nm_00999]
naming convention
[SRS_BSW_00308] AUTOSAR Basic [SWS_Nm_00999]
Software Modules
shall not define global
data in their header
files, but in the C file
[SRS_BSW_00309] All AUTOSAR Basic [SWS_Nm_00999]
Software Modules
shall indicate all global
data with read-only
purposes by explicitly
assigning the const
keyword
[SRS_BSW_00310] API naming [SWS_Nm_00999]
convention
[SRS_BSW_00312] Shared code shall be [SWS_Nm_00999]
reentrant

20 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_BSW_00314] All internal driver [SWS_Nm_00999]
modules shall
separate the interrupt
frame definition from
the service routine
[SRS_BSW_00318] Each AUTOSAR Basic [SWS_Nm_00999]
Software Module file
shall provide version
numbers in the header
file
[SRS_BSW_00321] The version numbers [SWS_Nm_00999]
of AUTOSAR Basic
Software Modules
shall be enumerated
according specific
rules
[SRS_BSW_00323] All AUTOSAR Basic [SWS_Nm_00488] [SWS_Nm_00489]
Software Modules [SWS_Nm_00490] [SWS_Nm_00491]
shall check passed [SWS_Nm_00492] [SWS_Nm_00493]
API parameters for [SWS_Nm_00494] [SWS_Nm_00495]
validity [SWS_Nm_00496] [SWS_Nm_00497]
[SWS_Nm_00498] [SWS_Nm_00499]
[SWS_Nm_00500] [SWS_Nm_00505]
[SWS_Nm_00508]
[SRS_BSW_00325] The runtime of [SWS_Nm_00999]
interrupt service
routines and functions
that are running in
interrupt context shall
be kept short
[SRS_BSW_00327] Error values naming [SWS_Nm_00232]
convention
[SRS_BSW_00328] All AUTOSAR Basic [SWS_Nm_00999]
Software Modules
shall avoid the
duplication of code
[SRS_BSW_00330] It shall be allowed to [SWS_Nm_00091]
use macros instead of
functions where
source code is used
and runtime is critical
[SRS_BSW_00331] All Basic Software [SWS_Nm_00999]
Modules shall strictly
separate error and
status information
[SRS_BSW_00333] For each callback [SWS_Nm_00028]
function it shall be
specified if it is called
from interrupt context
or not

21 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_BSW_00334] All Basic Software [SWS_Nm_00999]
Modules shall provide
an XML file that
contains the meta
data
[SRS_BSW_00335] Status values naming [SWS_Nm_00999]
convention
[SRS_BSW_00336] Basic SW module [SWS_Nm_00999]
shall be able to
shutdown
[SRS_BSW_00337] Classification of [SWS_Nm_00232]
development errors
[SRS_BSW_00339] Reporting of [SWS_Nm_00999]
production relevant
error status
[SRS_BSW_00341] Module [SWS_Nm_00999]
documentation shall
contains all needed
informations
[SRS_BSW_00342] It shall be possible to [SWS_Nm_00999]
create an AUTOSAR
ECU out of modules
provided as source
code and modules
provided as object
code, even mixed
[SRS_BSW_00343] The unit of time for [SWS_Nm_00999]
specification and
configuration of Basic
SW modules shall be
preferably in physical
time unit
[SRS_BSW_00344] BSW Modules shall [SWS_Nm_00030]
support link-time
configuration
[SRS_BSW_00345] BSW Modules shall [SWS_Nm_00247]
support pre-compile
configuration
[SRS_BSW_00346] All AUTOSAR Basic [SWS_Nm_00999]
Software Modules
shall provide at least a
basic set of module
files
[SRS_BSW_00347] A Naming seperation [SWS_Nm_00999]
of different instances
of BSW drivers shall
be in place
[SRS_BSW_00348] All AUTOSAR [SWS_Nm_00124]
standard types and
constants shall be
placed and organized
in a standard type
header file

22 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_BSW_00350] All AUTOSAR Basic [SWS_Nm_00999]
Software Modules
shall allow the
enabling/disabling of
detection and
reporting of
development errors.
[SRS_BSW_00351] Encapsulation of [SWS_Nm_00999]
compiler specific
methods to map
objects
[SRS_BSW_00353] All integer type [SWS_Nm_00124]
definitions of target
and compiler specific
scope shall be placed
and organized in a
single type header
[SRS_BSW_00357] For success/failure of [SWS_Nm_00124]
an API call a standard
return type shall be
defined
[SRS_BSW_00358] The return type of [SWS_Nm_00030]
init() functions
implemented by
AUTOSAR Basic
Software Modules
shall be void
[SRS_BSW_00359] All AUTOSAR Basic [SWS_Nm_00112] [SWS_Nm_00114]
Software Modules [SWS_Nm_00154] [SWS_Nm_00156]
callback functions [SWS_Nm_00159] [SWS_Nm_00162]
shall avoid return [SWS_Nm_00192] [SWS_Nm_00193]
types other than void if [SWS_Nm_00194] [SWS_Nm_00230]
possible [SWS_Nm_00234] [SWS_Nm_00250]
[SWS_Nm_00254] [SWS_Nm_00272]
[SRS_BSW_00360] AUTOSAR Basic [SWS_Nm_00999]
Software Modules
callback functions are
allowed to have
parameters
[SRS_BSW_00361] All mappings of not [SWS_Nm_00999]
standardized
keywords of compiler
specific scope shall be
placed and organized
in a compiler specific
type and keyword
header

23 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_BSW_00369] All AUTOSAR Basic [SWS_Nm_00488] [SWS_Nm_00489]
Software Modules [SWS_Nm_00490] [SWS_Nm_00491]
shall not return [SWS_Nm_00492] [SWS_Nm_00493]
specific development [SWS_Nm_00494] [SWS_Nm_00495]
error codes via the [SWS_Nm_00496] [SWS_Nm_00497]
API [SWS_Nm_00498] [SWS_Nm_00499]
[SWS_Nm_00500] [SWS_Nm_00505]
[SWS_Nm_00508]
[SRS_BSW_00371] The passing of [SWS_Nm_00999]
function pointers as
API parameter is
forbidden for all
AUTOSAR Basic
Software Modules
[SRS_BSW_00373] The main processing [SWS_Nm_00020]
function of each
AUTOSAR Basic
Software Module shall
be named according
the defined convention
[SRS_BSW_00374] All Basic Software [SWS_Nm_00999]
Modules shall provide
a readable module
vendor identification
[SRS_BSW_00375] Basic Software [SWS_Nm_00999]
Modules shall report
wake-up reasons
[SRS_BSW_00377] A Basic Software [SWS_Nm_00999]
Module can return a
module specific types
[SRS_BSW_00378] AUTOSAR shall [SWS_Nm_00999]
provide a boolean
type
[SRS_BSW_00379] All software modules [SWS_Nm_00999]
shall provide a module
identifier in the header
file and in the module
XML description file.
[SRS_BSW_00380] Configuration [SWS_Nm_00999]
parameters being
stored in memory
shall be placed into
separate c-files
[SRS_BSW_00381] No description [SWS_Nm_00124]
[SRS_BSW_00383] The Basic Software [SWS_Nm_00999]
Module specifications
shall specify which
other configuration
files from other
modules they use at
least in the description

24 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_BSW_00384] The Basic Software [SWS_Nm_00124] [SWS_Nm_00243]
Module specifications
shall specify at least in
the description which
other modules they
require
[SRS_BSW_00385] List possible error [SWS_Nm_00232]
notifications
[SRS_BSW_00386] The BSW shall specify [SWS_Nm_00232] [SWS_Nm_00488]
the configuration for [SWS_Nm_00489] [SWS_Nm_00490]
detecting an error [SWS_Nm_00491] [SWS_Nm_00492]
[SWS_Nm_00493] [SWS_Nm_00494]
[SWS_Nm_00495] [SWS_Nm_00496]
[SWS_Nm_00497] [SWS_Nm_00498]
[SWS_Nm_00499] [SWS_Nm_00500]
[SWS_Nm_00505] [SWS_Nm_00508]
[SRS_BSW_00388] Containers shall be [SWS_Nm_00999]
used to group
configuration
parameters that are
defined for the same
object
[SRS_BSW_00389] Containers shall have [SWS_Nm_00999]
names
[SRS_BSW_00390] Parameter content [SWS_Nm_00999]
shall be unique within
the module
[SRS_BSW_00392] Parameters shall have [SWS_Nm_00999]
a type
[SRS_BSW_00393] Parameters shall have [SWS_Nm_00999]
a range
[SRS_BSW_00394] The Basic Software [SWS_Nm_00999]
Module specifications
shall specify the scope
of the configuration
parameters
[SRS_BSW_00395] The Basic Software [SWS_Nm_00999]
Module specifications
shall list all
configuration
parameter
dependencies
[SRS_BSW_00396] The Basic Software [SWS_Nm_00999]
Module specifications
shall specify the
supported
configuration classes
for changing values
and multiplicities for
each parameter/
container

25 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_BSW_00397] The configuration [SWS_Nm_00999]
parameters in
pre-compile time are
fixed before
compilation starts
[SRS_BSW_00398] The link-time [SWS_Nm_00999]
configuration is
achieved on object
code basis in the
stage after compiling
and before linking
[SRS_BSW_00399] Parameter-sets shall [SWS_Nm_00999]
be located in a
separate segment and
shall be loaded after
the code
[SRS_BSW_00400] Parameter shall be [SWS_Nm_00999]
selected from multiple
sets of parameters
after code has been
loaded and started
[SRS_BSW_00401] Documentation of [SWS_Nm_00999]
multiple instances of
configuration
parameters shall be
available
[SRS_BSW_00402] Each module shall [SWS_Nm_00999]
provide version
information
[SRS_BSW_00403] The Basic Software [SWS_Nm_00999]
Module specifications
shall specify for each
parameter/container
whether it supports
different values or
multiplicity in different
configuration sets
[SRS_BSW_00404] BSW Modules shall [SWS_Nm_00999]
support post-build
configuration
[SRS_BSW_00405] BSW Modules shall [SWS_Nm_00030]
support multiple
configuration sets
[SRS_BSW_00406] A static status variable [SWS_Nm_00999]
denoting if a BSW
module is initialized
shall be initialized with
value 0 before any
APIs of the BSW
module is called

26 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_BSW_00407] Each BSW module [SWS_Nm_00044]
shall provide a
function to read out
the version
information of a
dedicated module
implementation
[SRS_BSW_00408] All AUTOSAR Basic [SWS_Nm_00999]
Software Modules
configuration
parameters shall be
named according to a
specific naming rule
[SRS_BSW_00409] All production code [SWS_Nm_00999]
error ID symbols are
defined by the Dem
module and shall be
retrieved by the other
BSW modules from
Dem configuration
[SRS_BSW_00410] Compiler switches [SWS_Nm_00999]
shall have defined
values
[SRS_BSW_00411] All AUTOSAR Basic [SWS_Nm_00999]
Software Modules
shall apply a naming
rule for enabling/
disabling the
existence of the API
[SRS_BSW_00412] No description [SWS_Nm_00124]
[SRS_BSW_00413] An index-based [SWS_Nm_00999]
accessing of the
instances of BSW
modules shall be done
[SRS_BSW_00414] Init functions shall [SWS_Nm_00030] [SWS_Nm_00282]
have a pointer to a [SWS_Nm_00283]
configuration structure
as single parameter
[SRS_BSW_00415] Interfaces which are [SWS_Nm_00999]
provided exclusively
for one module shall
be separated into a
dedicated header file
[SRS_BSW_00416] The sequence of [SWS_Nm_00127] [SWS_Nm_00128]
modules to be [SWS_Nm_00129] [SWS_Nm_00131]
initialized shall be [SWS_Nm_00133] [SWS_Nm_00135]
configurable [SWS_Nm_00137] [SWS_Nm_00139]
[SWS_Nm_00141] [SWS_Nm_00143]
[SWS_Nm_00145] [SWS_Nm_00147]
[SWS_Nm_00149] [SWS_Nm_00151]
[SWS_Nm_00999]

27 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_BSW_00417] Software which is not [SWS_Nm_00999]
part of the SW-C shall
report error events
only after the DEM is
fully operational.
[SRS_BSW_00419] If a pre-compile time [SWS_Nm_00247]
configuration
parameter is
implemented as
"const" it should be
placed into a separate
c-file
[SRS_BSW_00422] Pre-de-bouncing of [SWS_Nm_00999]
error status
information is done
within the DEM
[SRS_BSW_00423] BSW modules with [SWS_Nm_00999]
AUTOSAR interfaces
shall be describable
with the means of the
SW-C Template
[SRS_BSW_00424] BSW module main [SWS_Nm_00118] [SWS_Nm_00999]
processing functions
shall not be allowed to
enter a wait state
[SRS_BSW_00425] The BSW module [SWS_Nm_00118]
description template
shall provide means to
model the defined
trigger conditions of
schedulable objects
[SRS_BSW_00426] BSW Modules shall [SWS_Nm_00999]
ensure data
consistency of data
which is shared
between BSW
modules
[SRS_BSW_00427] ISR functions shall be [SWS_Nm_00999]
defined and
documented in the
BSW module
description template
[SRS_BSW_00428] A BSW module shall [SWS_Nm_00999]
state if its main
processing function(s)
has to be executed in
a specific order or
sequence
[SRS_BSW_00429] Access to OS is [SWS_Nm_00999]
restricted

28 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_BSW_00432] Modules should have [SWS_Nm_00999]
separate main
processing functions
for read/receive and
write/transmit data
path
[SRS_BSW_00433] Main processing [SWS_Nm_00999]
functions are only
allowed to be called
from task bodies
provided by the BSW
Scheduler
[SRS_BSW_00437] Memory mapping [SWS_Nm_00999]
shall provide the
possibility to define
RAM segments which
are not to be initialized
during startup
[SRS_BSW_00438] Configuration data [SWS_Nm_00999]
shall be defined in a
structure
[SRS_BSW_00439] Enable BSW modules [SWS_Nm_00999]
to handle interrupts
[SRS_BSW_00440] The callback function [SWS_Nm_00999]
invocation by the BSW
module shall follow
the signature provided
by RTE to invoke
servers via Rte_Call
API
[SRS_BSW_00441] Naming convention for [SWS_Nm_00999]
type, macro and
function
[SRS_BSW_00447] Standardizing Include [SWS_Nm_00999]
file structure of BSW
Modules
Implementing Autosar
Service
[SRS_BSW_00448] Module SWS shall not [SWS_Nm_00999]
contain requirements
from Other Modules
[SRS_BSW_00449] BSW Service APIs [SWS_Nm_00999]
used by Autosar
Application Software
shall return a Std_
ReturnType
[SRS_BSW_00450] A Main function of a [SWS_Nm_00121]
un-initialized module
shall return
immediately

29 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_BSW_00451] Hardware registers [SWS_Nm_00999]
shall be protected if
concurrent access to
these registers occur
[SRS_BSW_00452] Classification of [SWS_Nm_00999]
runtime errors
[SRS_BSW_00453] BSW Modules shall [SWS_Nm_00999]
be harmonized
[SRS_BSW_00454] An alternative [SWS_Nm_00999]
interface without a
parameter of category
DATA_REFERENCE
shall be available.
[SRS_BSW_00456] A Header file shall be [SWS_Nm_00999]
defined in order to
harmonize BSW
Modules
[SRS_BSW_00457] Callback functions of [SWS_Nm_00999]
Application software
components shall be
invoked by the Basis
SW
[SRS_BSW_00458] Classification of [SWS_Nm_00999]
production errors
[SRS_BSW_00459] It shall be possible to [SWS_Nm_00484] [SWS_Nm_00485]
concurrently execute a [SWS_Nm_00486] [SWS_Nm_00999]
service offered by a
BSW module in
different partitions
[SRS_BSW_00460] Reentrancy Levels [SWS_Nm_00999]
[SRS_BSW_00461] Modules called by [SWS_Nm_00999]
generic modules shall
satisfy all interfaces
requested by the
generic module
[SRS_BSW_00462] All Standardized [SWS_Nm_00999]
Autosar Interfaces
shall have unique
requirement Id /
number
[SRS_BSW_00463] Naming convention of [SWS_Nm_00999]
callout prototypes
[SRS_BSW_00464] File names shall be [SWS_Nm_00999]
considered case
sensitive regardless of
the filesystem in which
they are used
[SRS_BSW_00465] It shall not be allowed [SWS_Nm_00999]
to name any two files
so that they only differ
by the cases of their
letters

30 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_BSW_00466] Classification of [SWS_Nm_00999]
extended production
errors
[SRS_BSW_00467] The init / deinit [SWS_Nm_00999]
services shall only be
called by BswM or
EcuM
[SRS_BSW_00469] Fault detection and [SWS_Nm_00999]
healing of production
errors and extended
production errors
[SRS_BSW_00470] Execution frequency [SWS_Nm_00999]
of production error
detection
[SRS_BSW_00471] Do not cause [SWS_Nm_00999]
dead-locks on
detection of
production errors - the
ability to heal from
previously detected
production errors
[SRS_BSW_00472] Avoid detection of two [SWS_Nm_00999]
production errors with
the same root cause.
[SRS_BSW_00473] Classification of [SWS_Nm_00999]
transient faults
[SRS_BSW_00477] The functional [SWS_Nm_00999]
interfaces of
AUTOSAR BSW
modules shall be
specified in C90
[SRS_BSW_00478] Timing limits of main [SWS_Nm_00292]
functions
[SRS_BSW_00479] Interfaces for handling [SWS_Nm_00999]
request from external
devices
[SRS_BSW_00480] NullPointer Errors [SWS_Nm_00999]
shall follow a naming
rule
[SRS_BSW_00481] Invalid configuration [SWS_Nm_00999]
set selection errors
shall follow a naming
rule
[SRS_BSW_00482] Get Version [SWS_Nm_00044]
Informationfunction
shall follow a naming
rule
[SRS_Nm_00043] NM shall not prohibit [SWS_Nm_00999]
bus traffic with NM not
being initialized

31 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_Nm_00044] The NM shall be [SWS_Nm_00051] [SWS_Nm_00172]
applicable to different [SWS_Nm_00274] [SWS_Nm_00276]
types of
communication
systems which are in
the scope of Autosar
and support a bus
sleep mode.
[SRS_Nm_00045] NM has to provide [SWS_Nm_00167] [SWS_Nm_00168]
services to coordinate
shutdown of
NM-clusters
independently of each
other
[SRS_Nm_00046] It shall be possible to [SWS_Nm_00031] [SWS_Nm_00032]
trigger the startup of
all Nodes at any Point
in Time.
[SRS_Nm_00047] NM shall provide a [SWS_Nm_00032] [SWS_Nm_00034]
service to request to [SWS_Nm_00171]
keep the bus awake
and a service to
cancel this request.
[SRS_Nm_00048] NM shall put the [SWS_Nm_00046]
communication
controller into sleep
mode if there is no
bus communication
[SRS_Nm_00050] The NM shall provide [SWS_Nm_00043] [SWS_Nm_00114]
the current state of [SWS_Nm_00275]
NM
[SRS_Nm_00051] NM shall inform [SWS_Nm_00031] [SWS_Nm_00032]
application when NM [SWS_Nm_00046] [SWS_Nm_00156]
state changes occur. [SWS_Nm_00158] [SWS_Nm_00159]
[SWS_Nm_00161] [SWS_Nm_00162]
[SWS_Nm_00163] [SWS_Nm_00249]
[SWS_Nm_00487]
[SRS_Nm_00052] The NM interface shall [SWS_Nm_00192] [SWS_Nm_00999]
signal to the
application that all
other ECUs are ready
to sleep.
[SRS_Nm_00053] NM on a node which [SWS_Nm_00999]
is or become bus
unavailable shall have
a deterministic
Behavior

32 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_Nm_00054] There shall be a [SWS_Nm_00999]
deterministic time
from the point where
all nodes agree to go
to bus sleep to the
point where bus is
switched off.
[SRS_Nm_00137] NM shall perform [SWS_Nm_00999]
communication
system error handling
for errors that have
impact on the NM
behavior.
[SRS_Nm_00142] NM shall guarantee [SWS_Nm_00999]
an upper limit for the
bus load generated by
NM itself.
[SRS_Nm_00143] The bus load caused [SWS_Nm_00999]
by NM shall be
predictable.
[SRS_Nm_00144] NM shall support [SWS_Nm_00999]
communication
clusters of up to 64
ECUs
[SRS_Nm_00145] On a properly [SWS_Nm_00999]
configured node, NM
shall tolerate a loss of
a predefined number
of NM messages
[SRS_Nm_00146] The NM shall tolerate [SWS_Nm_00999]
a time jitter of NM
messages in one or
more ECUs
[SRS_Nm_00147] The NM algorithm [SWS_Nm_00999]
shall be processor
independent.
[SRS_Nm_00148] The specification and [SWS_Nm_00999]
implementation shall
be split-up into a
communication
system independent
and communication
system dependent
parts
[SRS_Nm_00149] The timing of NM shall [SWS_Nm_00175] [SWS_Nm_00281]
be configurable. [SWS_Nm_00284]

33 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_Nm_00150] Specific functions of [SWS_Nm_00055] [SWS_Nm_00130]
the Network [SWS_Nm_00132] [SWS_Nm_00134]
Management shall be [SWS_Nm_00136] [SWS_Nm_00138]
statically configurable [SWS_Nm_00140] [SWS_Nm_00150]
at pre-compile time [SWS_Nm_00164] [SWS_Nm_00165]
[SWS_Nm_00166] [SWS_Nm_00241]
[SWS_Nm_00251] [SWS_Nm_00255]
[SWS_Nm_00273] [SWS_Nm_00277]
[SWS_Nm_00278] [SWS_Nm_00279]
[SWS_Nm_00286] [SWS_Nm_00287]
[SWS_Nm_00288] [SWS_Nm_00289]
[SWS_Nm_00290]
[SRS_Nm_00151] The Network [SWS_Nm_00031]
Management
algorithm shall allow
any node to integrate
into an already
running NM cluster
[SRS_Nm_00153] The Network [SWS_Nm_00038] [SWS_Nm_00230]
Management shall
optionally provide a
possibility to detect
present nodes
[SRS_Nm_00154] The Network [SWS_Nm_00006] [SWS_Nm_00012]
Management API [SWS_Nm_00276]
shall be independent
from the
communication bus
[SRS_Nm_02503] The NM API shall [SWS_Nm_00035] [SWS_Nm_00250]
optionally give the [SWS_Nm_00252] [SWS_Nm_00285]
possibility to send
user data
[SRS_Nm_02504] The NM API shall [SWS_Nm_00036] [SWS_Nm_00291]
optionally give the
possibility to get user
data
[SRS_Nm_02505] The NM shall [SWS_Nm_00039]
optionally set the local
node identifier to the
NM-message
[SRS_Nm_02506] The NM API shall give [SWS_Nm_00037]
the possibility to read
the source node
identifier of the sender
[SRS_Nm_02508] Every node shall have [SWS_Nm_00040]
associated with it a
node identifier that is
unique in the
NM-cluster

34 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_Nm_02509] The NM interface shall [SWS_Nm_00193] [SWS_Nm_00999]
signal to the
application that at
least one other ECUs
is not ready to sleep
anymore.
[SRS_Nm_02510] For CAN NM it shall [SWS_Nm_00999]
be optionally possible
to immediately
transmit the
confirmation
[SRS_Nm_02511] It shall be possible to [SWS_Nm_00168] [SWS_Nm_00228]
configure the Network
Management of a
node in Cluster
Shutdown
[SRS_Nm_02512] The NM shall give the [SWS_Nm_00033] [SWS_Nm_00034]
possibility to enable or
disable the network
management related
communication
configured for an
active NM node
[SRS_Nm_02513] NM shall provide [SWS_Nm_00006] [SWS_Nm_00012]
functionality which [SWS_Nm_00031] [SWS_Nm_00032]
enables upper layers [SWS_Nm_00033] [SWS_Nm_00042]
to control the sleep [SWS_Nm_00154] [SWS_Nm_00155]
mode.
[SRS_Nm_02514] It shall be possible to [SWS_Nm_00001] [SWS_Nm_00002]
group networks into [SWS_Nm_00003] [SWS_Nm_00168]
NM Coordination [SWS_Nm_00173]
Clusters
[SRS_Nm_02515] NM shall offer a [SWS_Nm_00051] [SWS_Nm_00119]
generic possibility to [SWS_Nm_00166] [SWS_Nm_00276]
run other NMs than
the AUTOSAR-NMs
[SRS_Nm_02516] All AUTOSAR NM [SWS_Nm_00169] [SWS_Nm_00171]
instances shall [SWS_Nm_00174] [SWS_Nm_00175]
support the NM [SWS_Nm_00176] [SWS_Nm_00177]
Coordinator [SWS_Nm_00194] [SWS_Nm_00284]
functionality including
Bus synchronization
on demand
[SRS_Nm_02517] <Bus>Nm shall [SWS_Nm_00999]
support Partial
Networking on CAN,
FlexRay and Ethernet
[SRS_Nm_02518] <Bus>Nm shall be [SWS_Nm_00999]
able to distinguish
between NM
Messages

35 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_Nm_02519] The NM Control Bit [SWS_Nm_00999]
Vector shall contain a
PNI (Partial Network
Information) bit.
[SRS_Nm_02520] <Bus>Nm shall [SWS_Nm_00999]
evaluate the PNI bit in
the NM message
[SRS_Nm_02521] <Bus>Nm shall set [SWS_Nm_00999]
the PNI bit for
requesting Partial
Network functionality
[SRS_Nm_02522] <Bus>Nm shall [SWS_Nm_00999]
calculate the
combined partial
network request
status EIRA
[SRS_Nm_02523] <Bus>Nm shall [SWS_Nm_00999]
calculate the status of
the external partial
network requests ERA
[SRS_Nm_02524] <Bus>Nm shall [SWS_Nm_00999]
communicate EIRA
and ERA requests to
the upper layers using
virtual PDUs
[SRS_Nm_02525] <Bus>Nm shall [SWS_Nm_00999]
support
channel-specific
configuration for ERA
[SRS_Nm_02526] <Bus>Nm shall [SWS_Nm_00999]
support a global
configuration for EIRA
over all channels
[SRS_Nm_02527] CanNm shall [SWS_Nm_00999]
implement a filter
algorithm dropping all
NM messages that
are not relevant for the
ECU
[SRS_Nm_02528] CanNm shall provide [SWS_Nm_00999]
a service which allows
for spontaneous
sending of NM
messages.
[SRS_Nm_02529] If partial networking is [SWS_Nm_00999]
used, the ECU shall
secure that the first
message on the bus is
the wakeup frame.
[SRS_Nm_02530] CanIf shall provide an [SWS_Nm_00999]
optional
channel-specific TX
filter

36 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Requirement Description Satisfied by


[SRS_Nm_02531] CanIf shall provide the [SWS_Nm_00999]
possibility to initiate
clear and check
wake-up flags in the
transceiver
[SRS_Nm_02532] When full [SWS_Nm_00999]
communication is
requested, CanSm
shall enable pass
mode on the CanIf TX
filter
[SRS_Nm_02533] CanSm shall provide [SWS_Nm_00999]
the possibility to
initiate clear and
check wake-up flags
in the transceiver
[SRS_Nm_02534] CanSm shall support [SWS_Nm_00999]
a validPN shutdown
sequence
[SRS_Nm_02535] NM coordination on [SWS_Nm_00254] [SWS_Nm_00256]
Nested Sub-Buses [SWS_Nm_00257] [SWS_Nm_00259]
[SWS_Nm_00261] [SWS_Nm_00262]
[SWS_Nm_00267] [SWS_Nm_00271]
[SWS_Nm_00272] [SWS_Nm_00280]
[SRS_Nm_02536] NM shall provide an [SWS_Nm_00031] [SWS_Nm_00119]
interface which [SWS_Nm_00245]
triggers the transition
to the Network Mode
without keeping the
network awake
[SRS_Nm_02537] The NM Coordinator [SWS_Nm_00181] [SWS_Nm_00182]
shall be able to abort [SWS_Nm_00183] [SWS_Nm_00185]
the coordinated [SWS_Nm_00235] [SWS_Nm_00236]
shutdown [SWS_Nm_00267]
[SRS_Nm_02543] NM shall forward [SWS_Nm_00506] [SWS_Nm_91005]
requests for
synchronized PNC
shutdown
[SRS_Nm_02544] NM shall forward the [SWS_Nm_00507] [SWS_Nm_91004]
indication of a PN
shutdown message
[SRS_Nm_02545] <Bus>NM shall [SWS_Nm_91005]
handle requests for
synchronized PNC
shutdown

37 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

7 Functional specification
The NM Interface functionality consists of three parts:
• The Base functionality necessary to run, together with the bus specific NM mod-
ules, AUTOSAR NM on an ECU.
• The NM Coordinator functionality used by gateway ECUs to synchronously shut
down one ore more busses.
• The synchronized PNC shutdown functionality used by PNC gateway ECUs in
the role of a top-level PNC coordinator or intermediate PNC coordinator to syn-
chronously shutdown particular PNCs across the PNC network topology.

7.1 Base functionality


The Generic Network Management Interface module (Nm) shall act as a bus-
independent adaptation layer between the bus-specific Network Management modules
(such as CanNm, J1939Nm, FrNm and UdpNm) and the Communication Manager
module (ComM).
Note: The Nm does not provide interface functions beyond those specified in this
document. The Nm will provide an interface to the ComM, that does not contain specific
knowledge about the type of the underlying busses, and that nevertheless is sufficient
to accomplish the necessary network management functions. The algorithm handled
by the Nm is bus independent.
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
[SWS_Nm_00006] dThe Nm shall convert generic function calls from the ComM to bus
specific functions of the bus specific NM layer.c(SRS_Nm_00154, SRS_Nm_02513)
[SWS_Nm_00012] dThe Nm shall convert callback functions called by the bus specific
NM layers to generic callbacks to the ComM.c(SRS_Nm_00154, SRS_Nm_02513)
[SWS_Nm_00091] dThe Base functionality of Nm may be implemented completely or
partly using macros.c(SRS_BSW_00330)

7.2 NM Coordinator functionality


NM Coordinator functionality is a functionality of Nm that uses a coordination al-
gorithm to coordinate the shutdown of NM on all, or one or more independent subsets
of the busses that the ECU is connected to.
Dependent on configuration, the coordination algorithm can be configured to
achieve different levels of synchronization of the shutdown.

38 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

An ECU using an NM that actively performs the NM Coordinator functionality is com-


monly referred to as an NM Coordinator. However, in this specification this term is
synonymous with the NM Coordinator functionality when used in requirements.
Note: Consider that certain bus types have different nomenclature on the terms Net-
work, Channel, Cluster.
[SWS_Nm_00292] dIf the NM Coordinator functionality is configured, the con-
figuration parameter NmCycletimeMainFunction shall be configured (see
[SWS_Nm_00118]).c(SRS_BSW_00478)
Note: The NM Coordinator may use this to calculate the timeout status of internal
timers.

7.2.1 Applicability of the NM Coordinator functionality

[SWS_Nm_00001] dThe coordination algorithm shall be able to handle a


topology where several coordinated busses are connected to one NM Coordinator.c
(SRS_Nm_02514)
[SWS_Nm_00256] dThe NM-Coordinator shall support two or more NM-
Coordinators connected to the same NM Cluster.c(SRS_Nm_02535)
[SWS_Nm_00051] dThe NM Coordinator shall be able to coordinate busses run-
ning the official AUTOSAR bus specific NMs as well as all other generic bus NMs
implementing the required functionality, callbacks and interfaces.c(SRS_Nm_00044,
SRS_Nm_02515)
Note: The required functionality, callbacks and interfaces are specified in subsection
7.5.2. Coordinator Support for J1939Nm is not needed as the J1939Nm does not
support shutdown handling.
[SWS_Nm_00055] dThe NM Interface configuration shall provide the parameter Nm-
CoordinatorSupportEnabled to define if the support of the NM Coordinator func-
tionality is present or not.c(SRS_Nm_00150)
[SWS_Nm_00167] dIt shall be possible to configure multiple NM coordination clusters
that shall be coordinated independently.c(SRS_Nm_00045)
[SWS_Nm_00168] dEach bus shall belong to zero or one NM coordination cluster.c
(SRS_Nm_00045, SRS_Nm_02511, SRS_Nm_02514)
Rationale: The configuration parameter NmCoordClusterIndex is used for speci-
fying to which coordination cluster a bus belongs. If this parameter is undefined for a
channel, the corresponding bus does not belong to an NM coordination cluster.
[SWS_Nm_00169] dShutdown shall only be coordinated on the presently awake net-
works of a coordination cluster. Networks that are already in ”bus-sleep mode“ shall
still be monitored but not coordinated.c(SRS_Nm_02516)

39 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Rationale: The NM Coordinator does not require all busses in a coordination clus-
ter to be awake, working with subsets of the coordination cluster resp. partial networks,
to perform coordinated shutdown. It always monitors the shutdown initiation con-
ditions and when these are met, it performs a coordinated shutdown of all the presently
awake buses in the coordination cluster.
Note: It is outside the scope of the Nm to provide synchronized wakeup for coordinated
busses. It is up to the application (-> vehicle mode management) to wake up the
required resp. all channels if one channel wake up occurs.

7.2.2 Keeping coordinated busses alive

[SWS_Nm_00002] dAs long as the node implementing the NM Coordinator is not


ready to go to sleep on at least one of the busses in a coordination cluster (i.e. that
it has actively requested the network), the NM Coordinator shall ensure that the
network is requested on all currently active busses in that coordination cluster.c(SRS_-
Nm_02514)
[SWS_Nm_00003] dAs long as at least one bus in the coordination cluster is not ready
to sleep (i.e. because another node than the NM Coordinator is requesting that bus),
the NM Coordinator shall still ensure that the network is requested on all currently
active busses in that coordination cluster even if the local ECU itself is ready to go to
sleep on all busses of that coordination cluster.c(SRS_Nm_02514)
Rationale: The bus specific NMs will indicate to Nm if the bus is ready to go to
sleep or not by calling the callbacks Nm_RemoteSleepIndication and Nm_Re-
moteSleepCancellation. The local ECU will indicate if it is ready to go to sleep or
not on a network using the API functions Nm_NetworkRelease and Nm_NetworkRe-
quest.
Rationale: The Nm requests the network on a bus by calling the bus specific NM
function <BusNm>_NetworkRequest.
Since all AUTOSAR bus specific NMs are built on the principle that one AUTOSAR
node can keep the bus alive as long as it keeps the network requested, the NM
Coordinator will keep all busses of the coordination cluster awake by requesting
the network for the bus specific NMs.
The two requirements [SWS_Nm_00002] and [SWS_Nm_00003] above can be sum-
marized as follows: as long as at least one node (including the node implementing the
NM Coordinator) keeps any of the busses in the coordination cluster awake, the NM
Coordinator shall keep all busses of that coordination cluster awake.
[SWS_Nm_00228] dIf a bus of a coordination cluster has the parameter NmChannel-
SleepMaster set to TRUE, the NM Coordinator shall consider that bus ready to
sleep at all times and shall not await an invocation of Nm_RemoteSleepIndication
from that bus before starting shutdown of that network.c(SRS_Nm_02511)

40 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Rationale: This property shall be set for all bus specific NMs where the sleep of the
bus can be absolutely decided by the local node only and that no other nodes of that
bus can oppose that decision. An example of such a network is LIN where the local
AUTOSAR ECU will always be the LIN bus master and can always solely decide when
the network shall go to sleep.

7.2.3 Shutdown of coordinated busses

The level of synchronization achievable is dependent on the configuration. See sub-


section 7.2.5, Figure 7.1 shows an overview of the coordination algorithm.
As described in Section 7.2.1, the coordination algorithm and coordinated
shutdown shall be applied independently per NM coordination cluster.
Coordinated shutdown

No

wait vor valid start all


all networks wait for next
Yes synchronization shutdown
and node itself timer to
indication delay timers
ready for sleep? expire
(optional step)

No
Start

Wait for all Networks to go Call


Yes all timers expired? BusNm_RequestBusSynchronization
to sleep and calling
Nm_BusSleepMode followed by BusNm_NetworkRelease
End of Network related to timer

Figure 7.1: Overview of the coordination algorithm with the coordinated shutdown as
part of it

Note: There is no limitation where the actions performed by the coordination al-
gorithm shall take place.
This can be done either by the Nm main function ( NmMainFunction ) or module
indication / callbacks.
[SWS_Nm_00171] dWhen all networks of a coordination cluster are either ready to
go to sleep or already in ”bus-sleep mode“ the NM Coordinator shall start the
coordinated shutdown on all awake networks. The NM Coordinator shall eval-
uate continuously if the coordinated shutdown can be started.c(SRS_Nm_00047,
SRS_Nm_02516)
Rationale: Evaluation of shutdown conditions can be also done in other API calls then
the main function. The evaluation can be segmented then to check only the specific
conditions affected by the API calls there, hence it is not necessary to re-evaluate all
conditions in every main processing period and every API call.
[SWS_Nm_00172] dIf the configuration parameter NmSynchronizingNetwork is
TRUE for any of the busses in a coordination cluster, the coordination shutdown shall be

41 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

delayed until a network that is configured as synchronizing network for this coordination
cluster invoked Nm_SynchronizationPoint.c(SRS_Nm_00044)
[SWS_Nm_00293] dIf on a coordinated network the coordinator detects a mode
change to NM_MODE_SYNCHRONIZE,NM_MODE_PREPARE_BUS_SLEEP or NM_BUS_-
SLEEP AND the coordinated cluster this network belongs to has not started the shut-
down process AND if there is no internal network mode request for that channel by
ComM, the coordinator shall treat this network as remote sleep and shall call <BusNm>
_NetworkRelease for this network. If additionally for this network the configuration
parameter NmSynchronizingNetwork is TRUE then the coordinator shall not wait for
Nm_SynchronizationPoint on this network.c()
Rationale: If one or more of the networks in the NM coordination clusters is cyclic
(such as FlexRay), a higher level of synchronized shutdown will be achieved if the
algorithm is synchronized with one of the included cyclic networks. If configured so, the
shutdown timers for all coordinated networks will not be started until the synchronizing
network has called the Nm_SynchronizationPoint.
Rationale: Although only one network per NM coordination cluster should be config-
ured to indicate synchronization points, this will allow the NM Coordinator functionality
to filter out all synchronization indications except those that is originate from the net-
work that is configured to be the synchronizing network of each coordination cluster.
[SWS_Nm_00173] dIf not all conditions to start the coordinated shutdown have
been met, or if the coordinated shutdown has already been started (but not
aborted), calls to Nm_SynchronizationPoint shall be ignored.c(SRS_Nm_02514)
Rationale: In some cases, non-synchronizing networks can take longer time to go to
sleep. If this happens, the coordinated shutdown will be started based on one
synchronization indication, but as the synchronizing network will not be released di-
rectly it will continue to invoke (several) more synchronization indications which can
safely be ignored.
[SWS_Nm_00174] dIf the configuration parameter NmSynchronizingNetwork is
FALSE for all of the presently awake busses in a coordination cluster, the timers shall
be started after all shutdown conditions have been met, without waiting for a call to
Nm_SynchronizationPoint(). (see also [SWS_Nm_00172]).c(SRS_Nm_02516)
[SWS_Nm_00175] dWhen the coordinated shutdown is started, a shutdown de-
lay timer shall be activated for each currently awake channel in the coordination clus-
ter. Each timer shall be set to NmGlobalCoordinatorTime. In case NmBusType is
not set to NM_BUSNM_LOCALNM additionally the shutdown time of the specific channel
TSHUTDOWN_CHANNEL shall be subtracted.c(SRS_Nm_00149, SRS_Nm_02516)
[SWS_Nm_00284] dIf the NmGlobalCoordinatorTime is zero the shutdown delay
timer of all channels shall also be zero.c(SRS_Nm_00149, SRS_Nm_02516)
Note: The TSHUTDOWN_CHANNEL can be calculated as described in subsection
7.2.5 or with following formulas:
CanNm: Ready Sleep Time + Prepare BusSleep Time

42 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

FrNm: Ready Sleep Time, e.g.: (FrNmReadySleepCnt+1) * FrNmRepetitionCycle *


”Duration of one Flexray Cycle“
GenericNm: NmGenericBusNmShutdownTime
[SWS_Nm_00176] dWhen a shutdown timer expires for a network, Nm shall in
case BusNmType is not set to NM_BUSNM_LOCALNM release the network by calling
the <BusNm>_RequestBusSynchronization followed by <BusNm>_NetworkRe-
lease. In case BusNmType is set to NM_BUSNM_LOCALNM Nm shall inform ComM
about shutdown by calling ComM_Nm_BusSleepMode().c(SRS_Nm_02516)
Note: In the AUTOSAR Classic Platform, CanNm_PassiveStartUp,
J1939Nm_PassiveStartUp, FrNm_PassiveStartUp and UdpNm_PassiveStartUp
have been specified as the predefined interfaces corresponding to
<BusNm>_PassiveStartUp.
[SWS_Nm_00177] dNm shall keep track of all networks that have been released but
have not yet reported ”bus-sleep mode“. If the shutdown is aborted, these networks
shall still be considered active networks.c(SRS_Nm_02516)
Note: See Section subsection 7.3.3.
Definition: When all networks have been released and all networks are in ”bus-sleep
mode“, the coordinated shutdown is completed.

7.2.4 Coordination of nested sub-busses

To support the coordination of nested sub-busses the Nm-Coordinators need be con-


figured to build up a coordination hierarchy. The top most NM Coordinator has only
actively coordinated channels (NmActiveCoordinator == TRUE) per coordination
cluster. This NM Coordinator has to initiate the coordinated shutdown for all
other coordinators. An nested NM Coordinator receive his shutdown indication in-
formation from his passively configured channel (NmActiveCoordinator == FALSE)
and provides this information to following NM Coordinators via his actively coordinated
channels ( NmActiveCoordinator == TRUE).
The Figure 7.2 will explain this as an example.

43 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Figure 7.2: Use Case Nested Gateways

The exemplary topology shown in Figure 7.2 has the following coordination approach.
GW 1 have configured the channel onto Network 1 and Network 2 as actively coordi-
nating channels. Where GW 2 is configured with Network 2 connection as passively
coordinated channel, but with actively coordinated channel on Network 3. GW 3 than
needs to be configured on Network 3 as passively coordinated channel but as actively
coordinated channel for his connection to the Network 4.
[SWS_Nm_00280] dThe functionality of coordinating nested sub busses shall be avail-
able if the NmCoordinatorSyncSupport parameter is set to TRUE.c(SRS_Nm_-
02535)
Note: All requirements within this chapter are valid “per Nm Coordination Clus-
ter” (see [SWS_Nm_00167]).
The NmActiveCoordinator parameter indicates, if an NM Coordinator behaves
on this channel in actively manner
( Actively coordinated channel ) [NmActiveCoordinator = TRUE]
or behave in a passively manner
( Passively coordinated channel ) [NmActiveCoordinator = FALSE].

44 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

[SWS_Nm_00257] dOn its passively coordinated channels a NM-Coordinator shall


send Nm messages only if the node has a network management request pending or
a connected network which is coordinated actively by that NM Coordinator is not
ready to sleep.c(SRS_Nm_02535)
Rationale: This prevents that 2 NM Coordinators at the same channel, send NM
messages when they are ready to sleep and therefore keep the bus awake. Without
this mechanism it would not be possible to detect if there is at least one other node
active.
[SWS_Nm_00259] dThe NM Coordinator shall set the NMcoordinatorSleepReady
bit in the NM message via <BusNm>_SetSleepReadyBit to the value 1 at his actively
coordinated channels,
IF
all nodes of the NM Coordination cluster are ready to sleep (RemoteSleepIndi-
cation)
AND
IF NmSynchronizingNetwork is enabled a Nm_SynchronizationPoint() call
has been received on the corresponding channel
AND
If all channels of this NM Coordination cluster are configured as NmActiveCo-
ordinator == TRUE. AND
If the NmBusType is not configured to NM_BUSNM_LOCALNM.c(SRS_Nm_02535)
Note: for Position of Coordinator Bits in CBV see according <BusNm> specifications.
Note: This applies to the top most coordinator (no passively coordinated channel).
Rationale: Nodes which contain passively coordinated channels do not need a syn-
chronization point as they are synchronized by the sleep ready bit of their active
coordinator already.
Note: Nodes which contain a passively coordinated channel will set the bit according
to the requirement in [SWS_Nm_00261].
[SWS_Nm_00261] dIf Nm_CoordReadyToSleepIndication is received on a
passively coordinated channel the NmCoordinator shall set the NMCoordinatorSleep-
Ready bit to SET (1) via API call to <BusNm>_SetSleepReadyBit on all actively
coordinated channels.c(SRS_Nm_02535)
[SWS_Nm_00271] dIf Nm_CoordReadyToSleepCancellation is received on a
passively coordinated channel the NmCoordinator shall set the NMCoordinatorSleep-
Ready bit to UNSET (0) via API call to <BusNm>_SetSleepReadyBit on all actively
coordinated channels.c(SRS_Nm_02535)
Note: On its passively coordinated channel a NM Coordinator would not set the
Sleep Ready bit ever (via <busNm> function call) but forward a received status change
of Sleep ready bit onto its actively coordinated channels.

45 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Note: On its actively coordinated channel(s) a NM Coordinator a call of Nm_Coor-


dReadyToSleepIndication and Nm_CoordReadyToSleepCancellationis not
expected.
[SWS_Nm_00262] dThe NM Coordinator shall start coordinated shutdown af-
ter the Sleep Ready Bit with SET status has been requested.c(SRS_Nm_02535)
[SWS_Nm_00281] dNmGlobalCoordinatorTime shall be set at least to the maxi-
mum time needed to shut down all Networks coordinated.c(SRS_Nm_00149)
Note:This includes all nested connections.(for example see Figure 7.3)

Figure 7.3: Shutdown with Nm_GlobalCoordinatorTime

[SWS_Nm_00267] dNM Coordinator shall set the NMCoordinatorSleepReady bit to


UNSET (0) via API call to <BusNm>_SetSleepReadyBit on all actively coordinated
channels if the coordinated shutdown has been aborted for any reason.c(SRS_-
Nm_02535, SRS_Nm_02537)
Note: Details about aborted shutdown can be found in subsection 7.3.3.

46 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

7.2.5 Calculation of shutdown timers

The coordination algorithm is quite flexible since the level of synchronization


achievable depends on the configuration of switches and timers. Depending on which
event or point in time that is the goal to synchronize on, the configuration shall be
done differently. This Chapter contains guide on how to achieve three different levels
of synchronization. It is up to the configuration to follow these guidelines or to achieve
a separate order of synchronization by choosing his/her own particular configuration.
Therefore, this Section will not contain any requirement, only recommendations.
Note that absolute synchronization will never be possible to achieve. The jitter factors
that determine the preciseness of the synchronization involve the processing period
of the Nm, the exactness of the timers and the busload for non-deterministic busses.
Correctly configured, the Use Cases described below will give the best possible syn-
chronization that is achievable considering these circumstances.
Previous version of the NM Coordinator included the possibility for the coordinator
algorithm to delay the start of the coordinated shutdown ”a number of rounds“.
This specific delay has been removed but a similar behavior can still be obtained
by increasing all shutdown timers (configuration parameter NmGlobalCoordinator-
Time). Special care must be taken when cyclic networks (such as FlexRay) are used
when this increased delay time should be quantified to the synchronization indication
periodicity of those networks.

7.2.6 Synchronization Use Case 1 - Synchronous command

This Use Case focuses on how to synchronize the point in time where the different
networks are released.
This results in the fastest possible total shutdown of all networks, but with the downside
that the networks will not enter ”bus-sleep mode“ at the same time.
Rationale: One example of this Use Case is when several CAN networks shall be kept
alive as long as any CAN-node is requesting one of the networks; but when all nodes
are ready to go to sleep it does not matter if ”bus-sleep mode“ is entered at the same
time for the different networks.
Since the Use Case does not consider any cyclic behavior of the networks, the synchro-
nization parameter NmSynchronizingNetwork shall be set to FALSE for all networks
and no bus specific NM shall be configured to invoke the Nm_Synchronization-
Point callback.
To achieve the fastest possible shutdown, the shutdown timer parameter NmGlobal-
CoordinatorTime needs to be set to 0.0.

47 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

7.2.7 Synchronization Use Case 2 - Synchronous initiation

This Use Case is an extension of Use Case 1, but here consideration is taken to the
fact that for some networks the request to release the network will only be acted upon
at specific points in time. This Use Case will command a simultaneous shutdown like
in Use Case 1, but will wait until a point in time suitable for the synchronizing network.
Rationale: One example of this Use Case is when one FlexRay network and several
CAN networks where the time when all networks are active shall be maximized, but the
networks shall still be put to sleep as fast as possible.
Since this Use Case shall consider the cyclic behavior of a selected network, one of
the networks shall have its synchronization parameter NmSynchronizingNetwork
set to TRUE while the other networks shall have this parameter set to FALSE. The
synchronizing network’s bus specific NM shall also be configured to invoke the Nm_-
SynchronizationPoint callback at suitable points in time where the shutdown shall
be initiated.
To achieve the fastest possible shutdown, the shutdown timer parameter NmGlobal-
CoordinatorTime needs to be set to 0.0.

7.2.8 Synchronization Use Case 3 - Synchronous network sleep

This Use Case will focus on synchronizing the point in time where the different net-
works enters ”bus-sleep mode“. It will wait for indication from a synchronizing network,
and then delay the network releases of all networks based on timing values so that the
transition from ”network mode“ (or ”prepare bus-sleep mode“) into ”bus-sleep mode“ is
as synchronized as possible.

Rationale: One example of this Use Case is when one FlexRay network and several
CAN networks shall stop communicating at the same time.
Since this Use Case shall consider the cyclic behavior of a selected network, of the
networks - preferably the cyclic one - shall have its synchronization parameter NmSyn-
chronizingNetwork set to TRUE while the other networks shall have this parameter
set to FALSE. The synchronizing network’s bus specific NM shall also be configured
to invoke the Nm_SynchronizationPoint callback at suitable points in time where
the shutdown shall be initiated.
To calculate the shutdown timer TSHUTDOWN_CHANNEL of each network, specific
knowledge of each networks timing behavior must be obtained.
For all networks, TSHUTDOWN_CHANNEL must be calculated, this is the minimum
time it will take the network to enter ”bus-sleep mode“. For non-cyclic networks (such
as CAN), the time shall be measured from the point in time when the network is re-
leased until it enters ”bus-sleep mode“. For cyclic networks (such as FlexRay) the time
shall also include the full range from the synchronization indication made just before

48 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

the network is released. For Generic BusNms the time is given by the configuration
parameter NmGenericBusNmShutdownTime.
For the synchronizing network, TSYNCHRONIZATION_INDICATION must be deter-
mined. This is the time between any two consecutive calls made by that bus specific
NM to Nm_SynchronizationPoint.
The NmGlobalCoordinatorTime shall be the total time that is needed for the co-
ordination algorithm. This includes the shutdown time of nested sub-busses.
Start with setting NmGlobalCoordinatorTime to the same value as TSHUT-
DOWN_CHANNEL for the synchronizing network. If the TSHUTDOWN_CHANNEL
for any other network is greater than NmGlobalCoordinatorTime, extend NmGlob-
alCoordinatorTime with TSYNCHRONIZATION_INDICATION repeatedly until Nm-
GlobalCoordinatorTime is equal to, or larger than any TSHUTDOWN_CHANNEL.
The shutdown delay timer for each network shall be calculated as NmGlobalCoordi-
natorTime - TSHUTDOWN_CHANNEL for that network.
For the cyclic networks this parameter must then be increased slightly in order to make
sure that the network release will occur between to synchronization indications, slightly
after Nm_SynchronizationIndication (would) have been called. The amount of
time to extend the timer depends on the implementation and configuration of the bus
specific NM but should be far smaller than TSYNCHRONIZATION_INDICATION.

7.2.8.1 Examples

In the first case ( Figure 7.4), the synchronizing network holds the largest TSHUT-
DOWN_CHANNEL, which will therefore equal the NmGlobalCoordinatorTime. For
the synchronizing network, the shutdown delay timer will be NmGlobalCoordina-
torTime - TSHUTDOWN_CHANNEL, which is zero, but then a small amount of time
is added to make sure that the Nm will wait to release the network between the two
synchronization points.
For the Non-cyclic network, the shutdown delay timer will simply be NmGlobalCoor-
dinatorTime - TSHUTDOWN_CHANNEL.

49 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Figure 7.4: Timing example one

In the second case ( Figure 7.5), the non-cyclic network takes very long time
to shut down and therefore holds the largest TSHUTDOWN_CHANNEL. The
NmGlobalCoordinatorTime has now been obtained by taking the synchroniz-
ing network’s (slightly shorter) TSHUTDOWN_CHANNEL adding TSYNCHRONIZA-
TION_INDICATION once to this value.
For the synchronizing network, the shutdown timer will be NmGlobalCoordinator-
Time - TSHUTDOWN_CHANNEL, with a small amount of time added to make sure
that the Nm will wait to release the network between the two synchronization points.
For the Non-cyclic network, the shutdown timer will simply be NmGlobalCoordina-
torTime - TSHUTDOWN_CHANNEL.

Figure 7.5: Timing example two

50 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

7.3 Wakeup and abortion of the coordinated shutdown


Nm is not responsible for normal wakeup of the node or the networks this will be done
by the COM Manager (ComM).

7.3.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 call-
back Nm_NetworkStartIndication) to the ComM by calling ComM_Nm_Network-
StartIndication(). ComM will then call Nm_PassiveStartUp, which will be for-
warded by Nm to the corresponding interface of the bus specific NM.
Processing of wake-up events for channels in bus-sleep (related to transceiver and
controller state) will be handled by EcuM and ComM. No interaction of the Nm apply
here. Nm will get the network request from ComM as statet above, depending on the
wake-up validation and the respective communication needs.
[SWS_Nm_00245] dIf the ComM calls Nm_PassiveStartUp() for a network that is
part of a coordinated cluster of networks, the Nm coordinator functionality shall treat
this call as if the ComM had called Nm_NetworkRequest(). In case BusNmType is
not set to NM_BUSNM_LOCALNM the Nm shall forward a call of <BusNm>_NetworkRe-
quest to the lower layer and accordingly, the network shall be counted as requested
by the NM coordinator.c(SRS_Nm_02536)
Note: In other words: Calls of Nm_PassiveStartUp for networks that are part of
a cluster of coordinated networks shall be "translated" to / handled as calls of Nm_-
NetworkRequest.

7.3.2 Coordinated wakeup

Depending on the configuration, ComM can start multiple networks based on the indi-
cation from one network. It is recommended to configure the ComM to automatically
start all network of a NM Coordination Cluster if one of the networks indicates
network start, but this is not always necessary. Since the wakeup of network is outside
the scope of Nm, this is independent of if the NM Coordination functionality is used or
not.

7.3.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 al-
gorithm configuration it might take time before each included bus is actually released.
If any node on one of the coordinated buses changes its state and starts requesting

51 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

the network before all networks are released, race conditions can occur in the coor-
dination algorithm. This can happen in four ways:
1. A node on a network that has not yet been released and is still in ’network mode’
starts requesting the network again. This will be detected by the bus specific NM
which will inform Nm by calling Nm_RemoteSleepCancellation.
2. A node on a network that has already been released and has indicated ”prepare
bus-sleep mode“ but not ”bus-sleep mode“ starts requesting the network again. This
will be detected by the bus specific NM that will automatically change state to
”network mode“ and inform Nm by calling Nm_NetworkMode.
3. The ComM requests the network on any of the networks in the NM Coordination
Cluster.
4. The coordinator which actively coordinates this network sends Nm message with
cleared Ready-Sleep Bit. This will be detected by the Bus spec NM (only on
passively coordinated channels) and forwarded to the NM by calling Nm_Coor-
dReadyToSleepCancellation.
The generic approach is to abort the shutdown and start requesting the networks again.
However, networks that have already gone into ”bus-sleep mode“ shall not be automat-
ically woken up; this must be requested explicitly by ComM.
[SWS_Nm_00181] dThe coordinated shutdown shall be aborted if any network in
that NM Coordination Cluster,
• indicates Nm_RemoteSleepCancellation or
• indicates Nm_NetworkMode or
• indicates Nm_CoordReadyToSleepCancellation
• or the ComM request one of the networks with Nm_NetworkRequestor Nm_-
PassiveStartUp.
c(SRS_Nm_02537)
Note: Nm_NetworkStartIndication is not a trigger to abort the coordinated
shutdown, as this is handled by the upper layer.
[SWS_Nm_00182] dIf the coordinated shutdown is aborted, NM Coordinator
shall call ComM_Nm_RestartIndication for all networks that already indicated ”bus
sleep“.c(SRS_Nm_02537)
Rationale: Since Nm cannot take decision to wake networks on its own, this must be
decided by ComM just as in the (external) wakeup case.
[SWS_Nm_00183] dIf the coordinated shutdown is aborted, NM Coordinator
shall in case BusNmType is not set NM_BUSNM_LOCALNM request the network from the
<busNm’s> for the networks that have not indicated ”bus sleep“. In case BusNmType
is set to NM_BUSNM_LOCALNM Nm shall inform ComM about network startup by calling
ComM_Nm_NetworkMode().c(SRS_Nm_02537)

52 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

[SWS_Nm_00185] dIf the coordination algorithm has been aborted, all con-
ditions that guard the initiation of the coordinated shutdown shall be evaluated
again.c(SRS_Nm_02537)
Rationale: When a coordinated shutdown has been aborted, in most cases there
are now networks in that NM Coordination Cluster that do not longer indicate
that network sleep is possible, and thus the NM Coordinator must keep all presently
non-sleeping networks awake. There can be cases where none of the conditions have
been changed, which will only lead to a re-initiation of the coordinated shutdown.
[SWS_Nm_00235] dIf a coordinated shutdown has been aborted and Nm re-
ceives E_NOT_OK on a <BusNm>_NetworkRequest, that network shall not be con-
sidered awake when the conditions for initiating a coordinated shutdown are evaluated
again.c(SRS_Nm_02537)
Rationale: Any <BusNm> that needs to be re-requested during an aborted
coordinated shutdown have previously been released, both by ComM and by Nm.
It is the responsibility of the <BusNm> to inform the ComM (through Nm) that the net-
work really has been released and therefore the ComM will have knowledge of the net-
work state even though the error response on Nm_NetworkRequest never reached
the ComM directly.
[SWS_Nm_00236] dIf a coordinated shutdown has been initiated and Nm re-
ceives E_NOT_OK on a <BusNm>_NetworkRelease, the shutdown shall be imme-
diately aborted. For all networks that have not entered ”bus-sleep mode“, Nm shall
request the networks. This includes the network that indicated an error for <BusNm>
_NetworkRelease. As soon as this has been done, the conditions for initiating
coordinated shutdown can be evaluated again. This applies also to networks that were
not actively participating in the current coordinated shutdown.c(SRS_Nm_02537)
Rationale: If a network cannot be released, it shall immediately be requested again to
synchronize the states between the NM Coordinator in the Nm and the <BusNm>.
The coordinated shutdown will eventually be initiated again as long as the problem
with the <BusNm> persists. It is up to the <BusNm> to report any problems directly to
the DEM and/or Default Error Tracer so the NM Coordinator shall only try to release
the networks until it is successful.

7.4 Synchronized PNC shutdown functionality


The synchronized PNC shutdown is a functionality which is a cooperation of ComM,
Nm and <Bus>Nm to ensure a synchronized PNC shutdown at almost the same
point in time across the whole PN topology. A synchronized PNC shutdown is han-
dled by ECUs in role of a top-level PNC coordinator or intermediate PNC coordinator
and where the PNC gateway is enabled. If ComM of an ECU in the role of a top-
level PNC coordinator detects that a PNC is released, the ComM requests a syn-
chronized PNC shutdown by calling Nm_RequestSynchronizedPncShutdown per
ComMChannel and ComMPnc. The Nm forwards the call immediately to the affected

53 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

<Bus>Nms. The <Bus>Nms store all requests and handle them in the context of the
<Bus>Nm_Mainfunction. Therefore, the <Bus>Nm has to aggregate the request for a
synchronized PNC shutdown into a byte array (PN info), where each bit represent a
particular PNC. The PN info is created and transmitted per <Bus>NM-Channel.
If a PN shutdown message is received by an ECU in the role of an interme-
diate PNC coordinator, the <Bus>Nms forward the information by writing the
corresponding ComSignals and indicate the reception of a PN shutdown mes-
sage by calling the callback function Nm_ForwardSynchronizedPncShutdown.
The callback function will immediately forward the indication to ComM by calling
ComM_Nm_ForwardSynchronizedPncShutdown. ComM will immediately request
a synchronized PNC shutdown of all actively PNC coordinated (coordinated by a PNC
gateway) ComMChannels. The requests for a synchronized PNC shutdown are for-
warded to all affected <Bus>Nms via Nm and handled in the same way as described
in the previous section.
If a subordinated PNC node receives a top-level PNC coordinator Nm frame, then it
will handle the frame as a usual NM message (update the local PN info and reset PN
reset time).
[SWS_Nm_00506]{DRAFT} dIf function Nm_RequestSynchronizedPncShutdown
is called, NmSynchronizedPncShutdownEnabled is set to TRUE and Nm-
StandardBusType is set to a type other than NM_BUSNM_LOCALNM, the func-
tion shall immediately forward the call to the affected <Bus>Nm by calling
<Bus>Nm_RequestSynchronizedPncShutdown. Otherwise the function shall return
with E_NOT_OK.c(SRS_Nm_02543)
[SWS_Nm_00507]{DRAFT} dThe indication of a received PN shutdown mes-
sage via callback function Nm_ForwardSynchronizedPncShutdown shall
be forwarded to ComM with the corresponding ComMChannel by calling
ComM_Nm_ForwardSynchronizedPncShutdown(<ComMChannel>).c(SRS_-
Nm_02544)

7.5 Prerequisites of bus specific Network Management modules


This chapter gives an overview of the API calls that are used for the Basic functionality,
the NM Coordination functionality and synchronized PNC shutdown functionality as
well as information on the expected behavior of the bus specific NM for both function-
alities.
For specific requirements of the interfaces and the configuration parameters for en-
abling/disabling the API’s, refer to chapter 8.

54 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

7.5.1 Prerequisites for basic functionality

The Nm only acts as a forwarding layer between the ComM and the bus specific NM
for the basic functionality.
All API calls made from the upper layer shall be forwarded to the corresponding API
call of the lower layer. All callbacks of Nm invoked by the lower layer shall be forwarded
to the corresponding callback of the upper layer.
The Basic functionality provides the following API calls to the ComM:
• Nm_NetworkRequest - [SWS_Nm_00032]
• Nm_NetworkRelease - [SWS_Nm_00046]
• Nm_PassiveStartUp - [SWS_Nm_00031]
Note: This implies that the bus specific NM provides the corresponding func-
tions <BusNm>_NetworkRequest, <BusNm>_NetworkRelease and <BusNm>_-
PassiveStartUp.
The Basic functionality forwards the following API callbacks to the ComM:
• Nm_NetworkStartIndication - [SWS_Nm_00154]
• Nm_NetworkMode - [SWS_Nm_00156]
• Nm_BusSleepMode - [SWS_Nm_00162]
• Nm_PrepareBusSleepMode - [SWS_Nm_00159]
Note: This implies that the ComM provides the corresponding callback functions
ComM_Nm_NetworkStartIndication, ComM_Nm_NetworkMode, ComM_Nm_Bus-
SleepMode and ComM_Nm_PrepareBusSleepMode.
The Nm provides a number of API calls to the upper layers that are not used by ComM.
These are provided for OEM specific extensions of the NM stack and are not required
by any AUTOSAR module. They shall be forwarded to the corresponding API calls
provided by the bus specific NMs.
The Basic functionality provides the following API calls to any OEM extension of an
upper layer:
• Nm_DisableCommunication - [SWS_Nm_00033]
• Nm_EnableCommunication - [SWS_Nm_00034]
• Nm_SetUserData - [SWS_Nm_00035]
• Nm_GetUserData - [SWS_Nm_00036]
• Nm_GetPduData - [SWS_Nm_00037]
• Nm_RepeatMessageRequest - [SWS_Nm_00038]
• Nm_GetNodeIdentifier - [SWS_Nm_00039]

55 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

• Nm_GetLocalNodeIdentifier - [SWS_Nm_00040]
• Nm_CheckRemoteSleepIndication - [SWS_Nm_00042]
• Nm_GetState - [SWS_Nm_00043]
Note: This implies that the bus specific NM optionally provides the corresponding
functions.

7.5.2 Prerequisites for NM Coordinator functionality

The coordination algorithm makes use of the following interfaces of the bus
specific NM:
• <BusNm>_NetworkRequest - [SWS_Nm_00119]
• <BusNm>_NetworkRelease - [SWS_Nm_00119]
• <BusNm>_RequestBusSynchronization - [SWS_Nm_00119]
• <BusNm>_CheckRemoteSleepIndication - [SWS_Nm_00119]
Note: All NM networks configured to be part of a coordinated cluster of the NM
coordinator functionality must have the corresponding Bus NM configured to be able to
actively send out NM messages (e.g. CANNM_PASSIVE_MODE_ENABLED = false).
As a result of this configuration restriction, all BusNm used by the coordinator func-
tionality of the Nm module must provide the API <BusNm>_NetworkRequest.
Note: Any configuration where a network is part of a coordinated cluster of networks
where the corresponding BusNm is configured as passive is invalid.
Note: The <BusNm>_RequestBusSynchronization is called by Nm immediately
before <BusNm>_NetworkRelease in order to allow non-synchronous networks to
synchronize before the network is released. For some networks, this call has no
meaning. The bus specific NM shall still provide this interface in order to support
the generality of the NM Coordinator functionality, but can choose to provide an empty
implementation.
Rationale: The <BusNm>_CheckRemoteSleepIndication is never explicitly men-
tioned in the coordination algorithm. Its use is dependent on the implementa-
tion.
The coordination algorithm requires that the following callbacks of the Nm can
be invoked by the bus specific NM:
• Nm_NetworkStartIndication - [SWS_Nm_00154]
• Nm_NetworkMode - [SWS_Nm_00156]
• Nm_BusSleepMode - [SWS_Nm_00162]
• Nm_PrepareBusSleepMode - [SWS_Nm_00159]

56 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

• Nm_SynchronizeMode - [SWS_Nm_91002]
• Nm_RemoteSleepIndication - [SWS_Nm_00192]
• Nm_RemoteSleepCancellation - [SWS_Nm_00193]
• Nm_SynchronizationPoint - [SWS_Nm_00194]
Note: The Nm_NetworkStartIndication, Nm_NetworkMode, Nm_BusSleep-
Mode and Nm_PrepareBusSleepMode are used by the coordination algo-
rithm to keep track of the status of the different networks and to handle aborted
shutdown (see Chapter 7.3.3).
Note: The Nm_RemoteSleepIndication and Nm_RemoteSleepCancellation
are used by the coordination algorithm to determine when all conditions for
initiating the coordinated shutdown are met. The indication will be called by the
bus specific NM when it detects that all other nodes on the network (except for itself)
is ready to go to ”bus-sleep mode“. Some implementations will also make use of the
API call <BusNm>_CheckRemoteSleepIndication.
Note: A bus specific NM which is included in a coordination cluster must monitor its
bus to identify when all other nodes on the network is ready to go to sleep. When this
occurs, the bus specific NM shall call the callback Nm_RemoteSleepIndication of
Nm. (See [SWS_Nm_00192]).
Note: After a bus specific NM which is included in a coordination cluster has
signaled to Nm that all other nodes on the network is ready to go to sleep (See
[SWS_Nm_00192]), it must continue monitoring its bus to identify if any node starts
requesting the network again, implying that the bus is no longer ready to go to sleep.
When this occurs, the bus specific NM shall call the callback Nm_RemoteSleepCan-
cellation of Nm. (See [SWS_Nm_00193]).
Note: The Remote Sleep Indication and Cancellation functionality is further specified
in the respective bus specific NM.
Rationale: The Nm_SynchronizationPoint shall be called by the bus specific
NM in order to inform the coordination algorithm of a suitable point in time to
initiate the coordinated shutdown. For cyclic networks this is typically at cycle
boundaries. For non-cyclic networks this must be defined by other means. Each NM
Coordination Cluster can be configured to make use of synchronization indications or
not (See [SWS_Nm_00172]), and if they are used, the coordination algorithm filters
indications and only acts on indications from networks that are configured as synchro-
nizing networks.
Note: Please note for implementation of <bus>Nm: Cyclic networks invoke the Nm_-
SynchronizationPoint repeatedly when no other nodes request the network. The
invocation is typically made at boundaries in the bus specific NM protocol when
changes in the NM voting will occur.

57 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

It is assumed that any call to <BusNm>_ReleaseNetwork made between two of these


Nm_SynchronizationPoint will be acted upon at the same point in time as the next
Nm_SynchronizationPoint would have been invoked.
Rationale: The synchronization indication shall start when Nm_RemoteSleepIndi-
cation has been notified and continue until either the network has been released (
<BusNm>_NetworkRelease) or the Nm_RemoteSleepCanncellation is called.
Note:: For the use case of coordinating Flexray-channel A + B if there is no other
Network inside the NM Cluster, hence,if an NM Coordinator contains only one
NM Channel, the NmActiveCoordinator for this NmChannelConfig needs to be
set to TRUE and the NmChannelSleepMaster needs be set to FALSE to allow the
channel to coordinate itself . Note: The Value of "NmSynchronizingNetwork" is
only relevant if this network is in the same coordination cluster with other networks.

7.5.3 Prerequisites for synchronized PNC shutdown functionality

The synchronized PNC shutdown functionality makes use of the following interface of
the bus specific NM:
• <BusNm>_RequestSynchronizedPncShutdown -
[SWS_Nm_00166][SWS_Nm_00506]
The synchronized PNC shutdown functionality requires that the following callback of
the Nm can be invoked by the bus specific NM:
• Nm_ForwardSynchronizedPncShutdown - [SWS_Nm_91004]
The synchronized PNC shutdown functionality provides the following API, to be called
by the ComM:
• Nm_RequestSynchronizedPncShutdown - [SWS_Nm_91005]

7.5.4 Configuration of global parameters for bus specific networks

The Nm’s configuration contains parameters that regulate support of optional features
found in the bus specific NMs. Since Nm is only a pass-through interface layer re-
garding features that are not used by the NM Coordinator functionality, enabling these
in Nm’s configuration will in many cases only enable the pass-through of the controlling
API functions and the callback indications from the bus specific layers.
Many of the parameters defined for NM are used only as a source for global configu-
ration of all bus specific NM modules. Corresponding parameters of the bus specific
NMs are derived from these parameters.

58 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

7.6 NM_BUSNM_LOCALNM
[SWS_Nm_00483] dIf BusNmType is NM_BUSNM_LOCALNM and ComM requests Nm_-
PassiveStartUp() or Nm_NetworkRequest() then Nm shall inform ComM about
start of network by calling ComM_Nm_NetworkMode().
Rationale : Buses of type NM_LOCAL_NM which are coordinated do not have a network
management message but are synchronized e.g. by a master - slave concept like LIN).
These Bus-Types are always directly started on request by ComM but the shutdown
will be done by coordinator algorithm.c()

7.7 Multicore Distribution


In its role as central module dealing with different network types the Nm interaction
spans across partitions in case the Com-Stack is distributed and so shall provide re-
quired multi-core features to ensure a clean architecture and keep the network depen-
dent clusters free of multi-partition (multi-core) addons.
[SWS_Nm_00484] dThe Nm module shall apply appropriate mechanisms to allow calls
of its APIs from other partitions than its main function, e.g. by providing a Nm satellite.c
(SRS_BSW_00459)
[SWS_Nm_00485] dNm shall interact with <Bus>Nm (i.e. call <Bus>Nm APIs) only
in the partition, where the respective <Bus>Nm module is assigned to.c(SRS_BSW_-
00459)
[SWS_Nm_00486] dThe Nm kernel shall be assigned to the same partition as ComM
kernel in order to keep the interaction between these two modules on an intra-partition
basis.c(SRS_BSW_00459)
Note: Even though the basic software (and the Com-Stack in particular) is distributed
across several partitions, ComM [9] and Nm Masters should reside in the same par-
tition in order to keep mode interfaces between the two modules simple (for further
information see chapter Master/Satellite-approach in [10, Guide to BSW Distribution]).

7.8 Additional Functionality

7.8.1 Nm_CarWakeUpIndication

[SWS_Nm_00252] dIf the <bus>Nm calls Nm_CarWakeUpIndication and NmCar-


WakeUpCallout is defined, the NM Interface shall call the callout function defined by
NmCarWakeUpCallout with nmNetworkHandle as parameter.c(SRS_Nm_02503)
[SWS_Nm_00285] dIf the <bus>Nm calls Nm_CarWakeUpIndication and Nm-
CarWakeUpCallout is not defined, the NM Interface shall call the function

59 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

BswM_Nm_CarWakeUpIndication with nmNetworkHandle as parameter.c(SRS_Nm_-


02503)
Note: The application, called by NmCarWakeUpCallout, is responsible to manage
the Car Wake Up (CWU) request and distribute the Request to other Nm channels by
setting the CWU bit in its own Nm message. This application drops the CWU request
if the request is not repeated within a specific time.
Note: The callout is declared as specified within SWS_BSW_00039 and
SWS_BSW_00135.

7.8.2 Nm_StateChangeNotification

[SWS_Nm_00249] dIf NmStateReportEnabled is set to TRUE and NmStateRe-


portSignalRef is configured, when one of the state transitions mentioned in Table
7.1 occur, Nm_StateChangeNotification shall call Com_SendSignal(uint8,
Com_SignalIdType, const void*) for the signal referenced by NmStateRe-
portSignalRef with the value according to Table 7.1c(SRS_Nm_00051)
Note: The transmitted signal has to be at least a 6 bit signal in Com that should be
part of the NM message.
[SWS_Nm_00487] dWhen Nm_StateChangeNotification is called to report a
change of the Nm state, Nm shall call BswM_Nm_StateChangeNotification()
with the reported current state.c(SRS_Nm_00051)

Bit Value Name Description


0 1 NM_RM_BSM NM in state RepeatMessage
(transition from BusSleepMode)
1 2 NM_RM_PBSM NM in state RepeatMessage
(transition from
PrepareBusSleepMode)
2 4 NM_NO_RM NM in state NormalOperation
(transition from RepeatMessage)
3 8 NM_NO_RS NM in state NormalOperation
(transition from ReadySleep)
4 16 NM_RM_RS NM in state RepeatMessage
(transition from ReadySleep)
5 32 NM_RM_NO NM in state RepeatMessage
(transition from NormalOperation)

Table 7.1: Network Management States

[SWS_Nm_00501]{DRAFT} dIf NmDynamicPncToChannelMappingEn-


abled is set to TRUE and Nm_StateChangeNotification is called, then
ComM_Nm_RepeatMessageLeftIndication() shall be called if nmPrevi-
ousState is set to NM_STATE_REPEAT_MESSAGE.c()

60 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

7.9 Error classification


Section 7.2 "Error Handling" of the document [2, SWS_BSW General] describes the
error handling of the Basic Software in detail. Above all, it constitutes a classification
scheme consisting of five error types which may occur in BSW modules.
Based on this foundation, the following section specifies particular errors arranged in
the respective subsections below.

7.9.1 Development Errors

[SWS_Nm_00232] d
Type of error Related error code Error value
API service used without Nm interface initialization NM_E_UNINIT 0x00
API Service called with wrong parameter but not NM_E_INVALID_CHANNEL 0x01
with NULL-pointer
API service called with a NULL pointer NM_E_PARAM_POINTER 0x02

c(SRS_BSW_00327, SRS_BSW_00337, SRS_BSW_00385, SRS_BSW_00386)

7.9.2 Runtime Errors

There are no runtime errors.

7.9.3 Transient Faults

There are no transient faults.

7.9.4 Production Errors

There are no production errors.

7.9.5 Extended Production Errors

There are no extended production errors.

61 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

8 API specification

8.1 Imported types


In this chapter all types included from the following modules are listed.
[SWS_Nm_00117] d
Module Header File Imported Type
Com Com.h Com_SignalIdType
ComStack_Types ComStack_Types.h NetworkHandleType
ComStack_Types.h PNCHandleType
Std Std_Types.h Std_ReturnType
Std_Types.h Std_VersionInfoType

c(SRS_BSW_00301)

8.2 Type definitions

8.2.1 Nm_ModeType

[SWS_Nm_00274] d
Name Nm_ModeType
Kind Enumeration
Range NM_MODE_BUS_SLEEP – Bus-Sleep Mode
NM_MODE_PREPARE_ – Prepare-Bus Sleep Mode
BUS_SLEEP
NM_MODE_ – Synchronize Mode
SYNCHRONIZE
NM_MODE_NETWORK – Network Mode
Description Operational modes of the network management.
Available via NmStack_types.h

c(SRS_Nm_00044)

8.2.2 Nm_StateType

[SWS_Nm_00275] d

62 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Name Nm_StateType
Kind Enumeration
Range NM_STATE_UNINIT 0x00 Uninitialized State
NM_STATE_BUS_SLEEP 0x01 Bus-Sleep State
NM_STATE_PREPARE_ 0x02 Prepare-Bus State
BUS_SLEEP
NM_STATE_READY_ 0x03 Ready Sleep State
SLEEP
NM_STATE_NORMAL_ 0x04 Normal Operation State
OPERATION
NM_STATE_REPEAT_ 0x05 Repeat Message State
MESSAGE
NM_STATE_ 0x06 Synchronize State
SYNCHRONIZE
NM_STATE_OFFLINE 0x07 Offline State
Description States of the network management state machine.
Available via NmStack_types.h

c(SRS_Nm_00050)

8.2.3 Nm_BusNmType

[SWS_Nm_00276] d
Name Nm_BusNmType
Kind Enumeration
Range NM_BUSNM_CANNM – CAN NM type
NM_BUSNM_FRNM – FR NM type
NM_BUSNM_UDPNM – UDP NM type
NM_BUSNM_GENERICNM – Generic NM type
NM_BUSNM_UNDEF – NM type undefined; it shall be defined as FFh
NM_BUSNM_J1939NM – SAE J1939 NM type (address claiming)
NM_BUSNM_LOCALNM – Local NM Type
Description BusNm Type
Available via NmStack_types.h

c(SRS_Nm_00044, SRS_Nm_00154, SRS_Nm_02515)

8.2.4 Nm_ConfigType

[SWS_Nm_00282] d

63 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Name Nm_ConfigType
Kind Structure
Elements implementation specific
Type –
Comment –
Description Configuration data structure of the Nm module.
Available via Nm.h

c(SRS_BSW_00414)

8.3 Function definitions

8.3.1 Standard services provided by NM Interface

8.3.1.1 Nm_Init

[SWS_Nm_00030] d
Service Name Nm_Init
Syntax void Nm_Init (
const Nm_ConfigType* ConfigPtr
)

Service ID [hex] 0x00


Sync/Async Synchronous
Reentrancy Non Reentrant
Parameters (in) ConfigPtr Pointer to the selected configuration set.
Parameters (inout) None
Parameters (out) None
Return value None
Description Initializes the NM Interface.
Available via Nm.h

c(SRS_BSW_00101, SRS_BSW_00344, SRS_BSW_00358, SRS_BSW_00405,


SRS_BSW_00414)
[SWS_Nm_00127] dCaveats of Nm_Init: This service function has to be called af-
ter the initialization of the respective bus interface.c(SRS_BSW_00101, SRS_BSW_-
00416)
[SWS_Nm_00283] dThe Configuration pointer ConfigPtr shall always have a
NULL_PTR value.c(SRS_BSW_00414)
Note: The Configuration pointer ConfigPtr is currently not used and shall therefore
be set NULL_PTR value.

64 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

8.3.1.2 Nm_PassiveStartUp

[SWS_Nm_00031] d
Service Name Nm_PassiveStartUp
Syntax Std_ReturnType Nm_PassiveStartUp (
NetworkHandleType NetworkHandle
)

Service ID [hex] 0x01


Sync/Async Asynchronous
Reentrancy Non-reentrant for the same NetworkHandle, reentrant otherwise
Parameters (in) NetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Passive start of network management has failed
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description This function calls the <BusNm>_PassiveStartUp function in case NmBusType is not set to
NM_BUSNM_LOCALNM (e.g. CanNm_PassiveStartUp function is called for NM_BUSNM_
CANNM).
Available via Nm.h

c(SRS_Nm_00046, SRS_Nm_00051, SRS_Nm_00151, SRS_Nm_02513, SRS_Nm_-


02536)
[SWS_Nm_00128] dCaveats of Nm_PassiveStartUp: The <BusNm> and the Nm
itself are initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00488] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_PassiveStartUp shall raise the error NM_E_INVALID_CHANNEL
if the parameter NetworkHandle is not a configured network handle.c(SRS_BSW_-
00323, SRS_BSW_00369, SRS_BSW_00386)

8.3.1.3 Nm_NetworkRequest

[SWS_Nm_00032] d
Service Name Nm_NetworkRequest
Syntax Std_ReturnType Nm_NetworkRequest (
NetworkHandleType NetworkHandle
)

Service ID [hex] 0x02


Sync/Async Asynchronous
Reentrancy Non-reentrant for the same NetworkHandle, reentrant otherwise
5

65 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

4
Parameters (in) NetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Requesting of bus communication has failed
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description This function calls the <BusNm>_NetworkRequest (e.g. CanNm_NetworkRequest function is
called if channel is configured as CAN) function in case NmBusType is not set to NM_BUSNM_
LOCALNM.
Available via Nm.h

c(SRS_Nm_00046, SRS_Nm_00047, SRS_Nm_00051, SRS_Nm_02513)


[SWS_Nm_00129] dCaveats of Nm_NetworkRequest: The <BusNm> and the Nm
itself are initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00130] dIf Nm_NetworkRequest is called with a network handle where
NmPassiveModeEnabled is set to TRUE it shall not execute any functionality and
return with E_NOT_OK. If NmDevErrorDetect is set to TRUE then it shall raise the
error NM_E_INVALID_CHANNEL in this case.c(SRS_Nm_00150)
[SWS_Nm_00489] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_NetworkRequest shall raise the error NM_E_INVALID_CHANNEL
if the parameter NetworkHandle is not a configured network handle.c(SRS_BSW_-
00323, SRS_BSW_00369, SRS_BSW_00386)

8.3.1.4 Nm_NetworkRelease

[SWS_Nm_00046] d
Service Name Nm_NetworkRelease
Syntax Std_ReturnType Nm_NetworkRelease (
NetworkHandleType NetworkHandle
)

Service ID [hex] 0x03


Sync/Async Asynchronous
Reentrancy Non-reentrant for the same NetworkHandle, reentrant otherwise
Parameters (in) NetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Releasing of bus communication has failed
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
5

66 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

4
Description This function calls the <BusNm>_NetworkRelease bus specific function in case NmBusType is
not set to NM_BUSNM_LOCALNM (e.g. CanNm_NetworkRelease function is called if channel
is configured as CAN).
Available via Nm.h

c(SRS_Nm_00048, SRS_Nm_00051)
[SWS_Nm_00131] dCaveats of Nm_NetworkRelease: The <BusNm> and the Nm
itself are initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00132] dIf Nm_NetworkRelease is called with a network handle where
NmPassiveModeEnabled is set to TRUE it shall not execute any functionality and
return with E_NOT_OK. If NmDevErrorDetect is set to TRUE then it shall raise the
error NM_E_INVALID_CHANNEL in this case.c(SRS_Nm_00150)
[SWS_Nm_00490] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_NetworkRelease shall raise the error NM_E_INVALID_CHANNEL
if the parameter NetworkHandle is not a configured network handle.c(SRS_BSW_-
00323, SRS_BSW_00369, SRS_BSW_00386)

8.3.2 Communication control services provided by NM Interface

The following services are provided by NM Interface to allow the Diagnostic Communi-
cation Manager (DCM) to control the transmission of NM Messages.
Note: To run the coordination algorithm correctly, it has to be ensured that
NM PDU transmission ability is enabled before the ECU is shut down. If <BusNm>
_NetworkRelease is called while NM PDU transmission ability is disabled, the ECU
will shut down after NM PDU transmission ability has been re-enabled again. Therefore
the ECU can also shut down in case of race conditions (e.g. diagnostic session left
shortly before enabling communication) or a wrong usage of communication control.

8.3.2.1 Nm_DisableCommunication

[SWS_Nm_00033] d
Service Name Nm_DisableCommunication
Syntax Std_ReturnType Nm_DisableCommunication (
NetworkHandleType NetworkHandle
)

Service ID [hex] 0x04


Sync/Async Asynchronous
5

67 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

4
Reentrancy Non-reentrant for the same NetworkHandle, reentrant otherwise
Parameters (in) NetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Disabling of NM PDU transmission ability has failed.
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description Disables the NM PDU transmission ability. For that purpose <BusNm>_DisableCommunication
shall be called in case NmBusType is not set to NM_BUSNM_LOCALNM (e.g. CanNm_Disable
Communication function is called if channel is configured as CAN).
Available via Nm.h

c(SRS_Nm_02513, SRS_Nm_02512)
[SWS_Nm_00133] dCaveats of Nm_DisableCommunication: The <BusNm> and
the Nm itself are initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00134] dConfiguration of Nm_DisableCommunication: This function is
only available if NmComControlEnabled is set to TRUE.c(SRS_Nm_00150)
[SWS_Nm_00286] dIf Nm_DisableCommunication is called with a network handle
where NmPassiveModeEnabled is set to TRUE it shall not execute any functionality
and return with E_NOT_OK. If NmDevErrorDetect is set to TRUE then it shall raise
the error NM_E_INVALID_CHANNEL in this case.c(SRS_Nm_00150)
[SWS_Nm_00491] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_DisableCommunication shall raise the error NM_E_INVALID_-
CHANNEL if the parameter NetworkHandle is not a configured network handle.c
(SRS_BSW_00323, SRS_BSW_00369, SRS_BSW_00386)

8.3.2.2 Nm_EnableCommunication

[SWS_Nm_00034] d
Service Name Nm_EnableCommunication
Syntax Std_ReturnType Nm_EnableCommunication (
NetworkHandleType NetworkHandle
)

Service ID [hex] 0x05


Sync/Async Asynchronous
Reentrancy Non-reentrant for the same NetworkHandle, reentrant otherwise
Parameters (in) NetworkHandle Identification of the NM-channel
Parameters (inout) None
5

68 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

4
Parameters (out) None
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Enabling of NM PDU transmission ability has failed.
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description Enables the NM PDU transmission ability. For that purpose <BusNm>_EnableCommunication
shall be called in case NmBusType is not set to NM_BUSNM_LOCALNM. (e.g. CanNm_Enable
Communication function is called if channel is configured as CAN).
Available via Nm.h

c(SRS_Nm_00047, SRS_Nm_02512)
[SWS_Nm_00135] dCaveats of Nm_EnableCommunication: The <BusNm> and the
Nm itself are initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00136] dConfiguration of Nm_EnableCommunication: This function is
only available if NmComControlEnabled is set to TRUE.c(SRS_Nm_00150)
[SWS_Nm_00287] dIf Nm_EnableCommunication is called with a network handle
where NmPassiveModeEnabled is set to TRUE it shall not execute any functionality
and return with E_NOT_OK. If NmDevErrorDetect is set to TRUE then it shall raise
the error NM_E_INVALID_CHANNEL in this case.c(SRS_Nm_00150)
[SWS_Nm_00492] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_EnableCommunication shall raise the error NM_E_INVALID_-
CHANNEL if the parameter NetworkHandle is not a configured network handle.c
(SRS_BSW_00323, SRS_BSW_00369, SRS_BSW_00386)

8.3.3 Partial Network services provided by NM Interface

8.3.3.1 Nm_RequestSynchronizedPncShutdown

[SWS_Nm_91005]{DRAFT} d
Service Name Nm_RequestSynchronizedPncShutdown (draft)
Syntax Std_ReturnType Nm_RequestSynchronizedPncShutdown (
NetworkHandleType NetworkHandle,
PNCHandleType PncId
)

Service ID [hex] 0x24


Sync/Async Synchronous
Reentrancy Non Reentrant for the same NetworkHandle, reentrant otherwise
Parameters (in) NetworkHandle Identification of the NM-channel
PncId Identification of the Pnc which is requested for a synchronized
shutdown across the PNC network topology
5

69 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

4
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Request for a synchronized PNC shutdown has
failed, e.g.
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description This function forward the request for a synchronized PNC shutdown of a particular PNC given
by PncId to the affected <Bus>Nm by calling <Bus>Nm_RequestSynchronizedPncShutdown
The function call is only valid if NmStandardBusType is not set to NM_BUSNM_LOCALNM (e.g.
CanNm_RequestSynchronizedPncShutdown function is called for NM_BUSNM_CANNM).
Tags:atp.Status=draft
Available via Nm.h

c(SRS_Nm_02545, SRS_Nm_02543)
[SWS_Nm_00508]{DRAFT} dIf the pre-processor switch NmDevErrorDetect is set
to TRUE, the function Nm_RequestSynchronizedPncShutdown shall raise the er-
ror NM_E_INVALID_CHANNEL if the parameter NetworkHandle is not a configured
network handle.c(SRS_BSW_00323, SRS_BSW_00369, SRS_BSW_00386)

8.3.4 Extra services provided by NM Interface

The following services are provided by NM Interface for OEM specific extensions of the
NM stack and are not required by any AUTOSAR module.

8.3.4.1 Nm_SetUserData

[SWS_Nm_00035] d
Service Name Nm_SetUserData
Syntax Std_ReturnType Nm_SetUserData (
NetworkHandleType NetworkHandle,
const uint8* nmUserDataPtr
)

Service ID [hex] 0x06


Sync/Async Synchronous
Reentrancy Non-reentrant for the same NetworkHandle, reentrant otherwise
Parameters (in) NetworkHandle Identification of the NM-channel
nmUserDataPtr User data for the next transmitted NM message
Parameters (inout) None
Parameters (out) None
5

70 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

4
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Setting of user data has failed
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description Set user data for NM messages transmitted next on the bus. For that purpose <BusNm>_Set
UserData shall be called in case NmBusType is not set to NM_BUSNM_LOCALNM. (e.g. Can
Nm_SetUserData function is called if channel is configured as CAN).
Available via Nm.h

c(SRS_Nm_02503)
[SWS_Nm_00137] dCaveats of Nm_SetUserData: The <BusNm> and the Nm itself
are initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00138] dConfiguration of Nm_SetUserData: This function is only avail-
able if NmUserDataEnabled is set to TRUE.c(SRS_Nm_00150)
[SWS_Nm_00288] dIf Nm_SetUserData is called with a network handle where Nm-
PassiveModeEnabled is set to TRUE it shall not execute any functionality and return
with E_NOT_OK. If NmDevErrorDetect is set to TRUE then it shall raise the error
NM_E_INVALID_CHANNEL in this case.c(SRS_Nm_00150)
[SWS_Nm_00241] dConfiguration of Nm_SetUserData: If NmComUserDataSup-
port is TRUE the API Nm_SetUserData shall not be available.c(SRS_Nm_00150)
[SWS_Nm_00493] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_SetUserData shall raise the error NM_E_INVALID_CHANNEL if the
parameter NetworkHandle is not a configured network handle.c(SRS_BSW_00323,
SRS_BSW_00369, SRS_BSW_00386)

8.3.4.2 Nm_GetUserData

[SWS_Nm_00036] d
Service Name Nm_GetUserData
Syntax Std_ReturnType Nm_GetUserData (
NetworkHandleType NetworkHandle,
uint8* nmUserDataPtr
)

Service ID [hex] 0x07


Sync/Async Synchronous
Reentrancy Reentrant
Parameters (in) NetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) nmUserDataPtr Pointer where user data out of the last successfully received NM
message shall be copied to
5

71 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

4
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Getting of user data has failed
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description Get user data out of the last successfully received NM message. For that purpose <BusNm>_
GetUserData shall be called in case NmBusType is not set to NM_BUSNM_LOCALNM. (e.g.
CanNm_GetUserData function is called if channel is configured as CAN).
Available via Nm.h

c(SRS_Nm_02504)
[SWS_Nm_00139] dCaveats of Nm_GetUserData: The <BusNm> and the Nm itself
are initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00140] dConfiguration of Nm_GetUserData: This function is only avail-
able if NmUserDataEnabled is set to TRUE.c(SRS_Nm_00150)
[SWS_Nm_00494] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_GetUserData shall raise the error NM_E_INVALID_CHANNEL if the
parameter NetworkHandle is not a configured network handle.c(SRS_BSW_00323,
SRS_BSW_00369, SRS_BSW_00386)

8.3.4.3 Nm_GetPduData

[SWS_Nm_00037] d
Service Name Nm_GetPduData
Syntax Std_ReturnType Nm_GetPduData (
NetworkHandleType NetworkHandle,
uint8* nmPduData
)

Service ID [hex] 0x08


Sync/Async Synchronous
Reentrancy Reentrant
Parameters (in) NetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) nmPduData Pointer where NM PDU shall be copied to.
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Getting of NM PDU data has failed
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description Get the whole PDU data out of the most recently received NM message. For that purpose <Bus
Nm>_GetPduData shall be called in case NmBusType is not set to NM_BUSNM_LOCALNM.
(e.g. CanNm_GetPduData function is called if channel is configured as CAN).
Available via Nm.h

c(SRS_Nm_02506)

72 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

[SWS_Nm_00141] dCaveats of Nm_GetPduData: The <BusNm> and the Nm itself


are initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00495] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_GetPduData shall raise the error NM_E_INVALID_CHANNEL if the
parameter NetworkHandle is not a configured network handle.c(SRS_BSW_00323,
SRS_BSW_00369, SRS_BSW_00386)

8.3.4.4 Nm_RepeatMessageRequest

[SWS_Nm_00038] d
Service Name Nm_RepeatMessageRequest
Syntax Std_ReturnType Nm_RepeatMessageRequest (
NetworkHandleType NetworkHandle
)

Service ID [hex] 0x09


Sync/Async Asynchronous
Reentrancy Non-reentrant for the same NetworkHandle, reentrant otherwise
Parameters (in) NetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Setting of Repeat Message Request Bit has failed
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description Set Repeat Message Request Bit for NM messages transmitted next on the bus. For that
purpose <BusNm>_RepeatMessageRequest shall be called in case NmBusType is not set to
NM_BUSNM_LOCALNM. (e.g. CanNm_RepeatMessageRequest function is called if channel is
configured as CAN). This will force all nodes on the bus to transmit NM messages so that they
can be identified.
Available via Nm.h

c(SRS_Nm_00153)
[SWS_Nm_00143] dCaveats of Nm_RepeatMessageRequest: The <BusNm> and
the Nm itself are initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00289] dIf Nm_RepeatMessageRequest is called with a network handle
where NmPassiveModeEnabled is set to TRUE it shall not execute any functionality
and return with E_NOT_OK. If NmDevErrorDetect is set to TRUE then it shall raise
the error NM_E_INVALID_CHANNEL in this case.c(SRS_Nm_00150)
[SWS_Nm_00496] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_RepeatMessageRequest shall raise the error NM_E_INVALID_-
CHANNEL if the parameter NetworkHandle is not a configured network handle.c
(SRS_BSW_00323, SRS_BSW_00369, SRS_BSW_00386)

73 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

8.3.4.5 Nm_GetNodeIdentifier

[SWS_Nm_00039] d
Service Name Nm_GetNodeIdentifier
Syntax Std_ReturnType Nm_GetNodeIdentifier (
NetworkHandleType NetworkHandle,
uint8* nmNodeIdPtr
)

Service ID [hex] 0x0a


Sync/Async Synchronous
Reentrancy Non-reentrant for the same NetworkHandle, reentrant otherwise
Parameters (in) NetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) nmNodeIdPtr Pointer where node identifier out of the last successfully received
NM-message shall be copied to
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Getting of the node identifier out of the last received
NM-message has failed
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description Get node identifier out of the last successfully received NM-message. The function <BusNm>_
GetNodeIdentifier shall be called in case NmBusType is not set to NM_BUSNM_LOCALNM.
(e.g. CanNm_GetNodeIdentifier function is called if channel is configured as CAN).
Available via Nm.h

c(SRS_Nm_02505)
[SWS_Nm_00145] dCaveats of Nm_GetNodeIdentifier: The <BusNm> and the
Nm itself are initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00497] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_GetNodeIdentifier shall raise the error NM_E_INVALID_CHAN-
NEL if the parameter NetworkHandle is not a configured network handle.c(SRS_-
BSW_00323, SRS_BSW_00369, SRS_BSW_00386)

8.3.4.6 Nm_GetLocalNodeIdentifier

[SWS_Nm_00040] d
Service Name Nm_GetLocalNodeIdentifier
Syntax Std_ReturnType Nm_GetLocalNodeIdentifier (
NetworkHandleType NetworkHandle,
uint8* nmNodeIdPtr
)

Service ID [hex] 0x0b


5

74 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

4
Sync/Async Synchronous
Reentrancy Non-reentrant for the same NetworkHandle, reentrant otherwise
Parameters (in) NetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) nmNodeIdPtr Pointer where node identifier of the local node shall be copied to
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Getting of the node identifier of the local node has
failed
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description Get node identifier configured for the local node. For that purpose <BusNm>_GetLocalNode
Identifier shall be called in case NmBusType is not set to NM_BUSNM_LOCALNM. (e.g. Can
Nm_GetLocalNodeIdentifier function is called if channel is configured as CAN).
Available via Nm.h

c(SRS_Nm_02508)
[SWS_Nm_00147] dCaveats of Nm_GetLocalNodeIdentifier: The <BusNm>
and the Nm itself are initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00498] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_GetLocalNodeIdentifier shall raise the error NM_E_INVALID_-
CHANNEL if the parameter NetworkHandle is not a configured network handle.c
(SRS_BSW_00323, SRS_BSW_00369, SRS_BSW_00386)

8.3.4.7 Nm_CheckRemoteSleepIndication

[SWS_Nm_00042] d
Service Name Nm_CheckRemoteSleepIndication
Syntax Std_ReturnType Nm_CheckRemoteSleepIndication (
NetworkHandleType nmNetworkHandle,
boolean* nmRemoteSleepIndPtr
)

Service ID [hex] 0x0d


Sync/Async Synchronous
Reentrancy Non-reentrant for the same NetworkHandle, reentrant otherwise
Parameters (in) nmNetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) nmRemoteSleepIndPtr Pointer where check result of remote sleep indication shall be
copied to
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Checking of remote sleep indication bits has failed
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
5

75 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

4
Description Check if remote sleep indication takes place or not. For that purpose <BusNm>_CheckRemote
SleepIndication shall be called in case NmBusType is not set to NM_BUSNM_LOCALNM. (e.g.
CanNm_CheckRemoteSleepIndication function is called if channel is configured as CAN).
Available via Nm.h

c(SRS_Nm_02513)
[SWS_Nm_00149] dCaveats of Nm_CheckRemoteSleepIndication: The
<BusNm> and the Nm itself are initialized correctly.c(SRS_BSW_00101, SRS_-
BSW_00416)
[SWS_Nm_00290] dIf Nm_CheckRemoteSleepIndication is called with a network
handle where NmPassiveModeEnabled is set to TRUE it shall not execute any func-
tionality and return with E_NOT_OK. If NmDevErrorDetect is set to TRUE then it shall
raise the error NM_E_INVALID_CHANNEL in this case.c(SRS_Nm_00150)
[SWS_Nm_00150] dConfiguration of Nm_CheckRemoteSleepIndication: This
function is only available if NmRemoteSleepIndEnabled is set to TRUE.c(SRS_Nm_-
00150)
[SWS_Nm_00499] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_CheckRemoteSleepIndication shall raise the error NM_E_IN-
VALID_CHANNEL if the parameter nmNetworkHandle is not a configured network
handle.c(SRS_BSW_00323, SRS_BSW_00369, SRS_BSW_00386)

8.3.4.8 Nm_GetState

[SWS_Nm_00043] d
Service Name Nm_GetState
Syntax Std_ReturnType Nm_GetState (
NetworkHandleType nmNetworkHandle,
Nm_StateType* nmStatePtr,
Nm_ModeType* nmModePtr
)

Service ID [hex] 0x0e


Sync/Async Synchronous
Reentrancy Reentrant
Parameters (in) nmNetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) nmStatePtr Pointer where state of the network management shall be copied
to
nmModePtr Pointer to the location where the mode of the network
management shall be copied to
5

76 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

4
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Getting of NM state has failed
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description Returns the state of the network management. The function <BusNm>_GetState shall be
called in case NmBusType is not set to NM_BUSNM_LOCALNM. (e.g. CanNm_GetState
function is called if channel is configured as CAN).
Available via Nm.h

c(SRS_Nm_00050)
[SWS_Nm_00151] dCaveats of Nm_GetState: The <BusNm> and the Nm itself are
initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00500] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_GetState shall raise the error NM_E_INVALID_CHANNEL if the pa-
rameter nmNetworkHandle is not a configured network handle.c(SRS_BSW_00323,
SRS_BSW_00369, SRS_BSW_00386)

8.3.4.9 Nm_GetVersionInfo

[SWS_Nm_00044] d
Service Name Nm_GetVersionInfo
Syntax void Nm_GetVersionInfo (
Std_VersionInfoType* nmVerInfoPtr
)

Service ID [hex] 0x0f


Sync/Async Synchronous
Reentrancy Reentrant
Parameters (in) None
Parameters (inout) None
Parameters (out) nmVerInfoPtr Pointer to where to store the version information of this module.
Return value None
Description This service returns the version information of this module.
Available via Nm.h

c(SRS_BSW_00003, SRS_BSW_00407, SRS_BSW_00482)

8.3.4.10 Nm_PnLearningRequest

[SWS_Nm_91003]{DRAFT} d

77 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Service Name Nm_PnLearningRequest (draft)


Syntax Std_ReturnType Nm_PnLearningRequest (
NetworkHandleType NetworkHandle
)

Service ID [hex] 0x22


Sync/Async Asynchronous
Reentrancy Non Reentrant for the same NetworkHandle, reentrant otherwise
Parameters (in) NetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: No error
E_NOT_OK: PN Learning Request has failed or is not configured
for the networkHandle
Description Set Repeat Message Request Bit and Partial Network Learning Bit for NM messages
transmitted next on the bus. For that purpose <BusNm>_PnLearningRequest shall be called
(e.g. CanNm_PnLearningRequest function if channel is configured as CAN). This will force all
nodes to enter the PNC Learning Phase and re-enter Repeat Message Stat. This is needed for
the optional Dynamic PNC-to-channel-mapping feature.
Tags:atp.Status=draft
Available via Nm.h

c()
Note: Caveats of Nm_PnLearningRequest: The <BusNm> and the Nm itself are
initialized correctly.
[SWS_Nm_00502]{DRAFT} dNm_PnLearningRequest shall only be available if Nm-
DynamicPncToChannelMappingSupport is set to TRUE.c()
[SWS_Nm_00503]{DRAFT} dIf Nm_PnLearningRequest is called with a network
handle for a bus system where NmDynamicPncToChannelMappingEnabled is set
to FALSE Nm shall not execute any functionality and return with E_NOT_OK. If NmDev-
ErrorDetect is set to TRUE then it shall raise the error NM_E_INVALID_CHANNEL
in this case.c()
[SWS_Nm_00505]{DRAFT} dIf the pre-processor switch NmDevErrorDetect is set
to TRUE, the function Nm_PnLearningRequest shall raise the error NM_E_IN-
VALID_CHANNEL if the parameter NetworkHandle is not a configured network han-
dle.c(SRS_BSW_00323, SRS_BSW_00369, SRS_BSW_00386)

8.4 Call-back notifications


Callback notifications are called by the lower layer’s bus-specific Network Manage-
ment modules. For the Base functionality of Nm ( section 7.1) the call-backs shall be
forwarded to the upper layer’s ComM. For the NM Coordinator functionality of Nm (
section 7.2) the call-backs will provide indications used to control the NM Coordinator
and the optional Dynamic PNC-to-channel-mapping feature.

78 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

[SWS_Nm_00028] dAll callbacks of the Nm shall assume that they can run either in
task or in interrupt context.c(SRS_BSW_00333)

8.4.1 Standard Call-back notifications

8.4.1.1 Nm_NetworkStartIndication

[SWS_Nm_00154] d
Service Name Nm_NetworkStartIndication
Syntax void Nm_NetworkStartIndication (
NetworkHandleType nmNetworkHandle
)

Service ID [hex] 0x11


Sync/Async Asynchronous
Reentrancy Reentrant
Parameters (in) nmNetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value None
Description Notification that a NM-message has been received in the Bus-Sleep Mode, what indicates that
some nodes in the network have already entered the Network Mode.
Available via Nm.h

c(SRS_BSW_00359, SRS_Nm_02513)
[SWS_Nm_00155] dThe indication through callback function Nm_Network-
StartIndication: shall be forwarded to ComM by calling the ComM_Nm_-
NetworkStartIndication.c(SRS_Nm_02513)

8.4.1.2 Nm_NetworkMode

[SWS_Nm_00156] d
Service Name Nm_NetworkMode
Syntax void Nm_NetworkMode (
NetworkHandleType nmNetworkHandle
)

Service ID [hex] 0x12


Sync/Async Asynchronous
Reentrancy Reentrant
Parameters (in) nmNetworkHandle Identification of the NM-channel
5

79 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

4
Parameters (inout) None
Parameters (out) None
Return value None
Description Notification that the network management has entered Network Mode.
Available via Nm.h

c(SRS_BSW_00359, SRS_Nm_00051)
[SWS_Nm_00158] dThe indication through callback function Nm_NetworkMode: shall
be forwarded to ComM by calling the ComM_Nm_NetworkMode.c(SRS_Nm_00051)

8.4.1.3 Nm_BusSleepMode

[SWS_Nm_00162] d
Service Name Nm_BusSleepMode
Syntax void Nm_BusSleepMode (
NetworkHandleType nmNetworkHandle
)

Service ID [hex] 0x14


Sync/Async Asynchronous
Reentrancy Reentrant
Parameters (in) nmNetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value None
Description Notification that the network management has entered Bus-Sleep Mode.
Available via Nm.h

c(SRS_BSW_00359, SRS_Nm_00051)
[SWS_Nm_00163] dThe indication through callback function Nm_BusSleepMode:
shall be forwarded to ComM by calling the ComM_Nm_BusSleepMode.c(SRS_Nm_-
00051)

8.4.1.4 Nm_PrepareBusSleepMode

[SWS_Nm_00159] d

80 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Service Name Nm_PrepareBusSleepMode


Syntax void Nm_PrepareBusSleepMode (
NetworkHandleType nmNetworkHandle
)

Service ID [hex] 0x13


Sync/Async Asynchronous
Reentrancy Reentrant
Parameters (in) nmNetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value None
Description Notification that the network management has entered Prepare Bus-Sleep Mode.
Available via Nm.h

c(SRS_BSW_00359, SRS_Nm_00051)
[SWS_Nm_00161] dThe indication through callback function Nm_PrepareBus-
SleepMode: shall be forwarded to ComM by calling ComM_Nm_PrepareBusSleep-
Mode.c(SRS_Nm_00051)

8.4.1.5 NM_SynchronizeMode

[SWS_Nm_91002] d
Service Name Nm_SynchronizeMode
Syntax void Nm_SynchronizeMode (
NetworkHandleType nmNetworkHandle
)

Service ID [hex] 0x21


Sync/Async Asynchronous
Reentrancy Reentrant but not for the same channel
Parameters (in) nmNetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value None
Description Notification that the network management has entered Synchronize Mode.
Available via Nm.h

c()

8.4.1.6 Nm_RemoteSleepIndication

[SWS_Nm_00192] d

81 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Service Name Nm_RemoteSleepIndication


Syntax void Nm_RemoteSleepIndication (
NetworkHandleType nmNetworkHandle
)

Service ID [hex] 0x17


Sync/Async Asynchronous
Reentrancy Reentrant
Parameters (in) nmNetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value None
Description Notification that the network management has detected that all other nodes on the network are
ready to enter Bus-Sleep Mode.
Available via Nm.h

c(SRS_BSW_00359, SRS_Nm_00052)
[SWS_Nm_00277] dConfiguration of Nm_RemoteSleepIndication: This function is
only available if NmRemoteSleepIndEnabled is set to TRUE.c(SRS_Nm_00150)
The notification that all other nodes on the network are ready to enter Bus-Sleep Mode
is only needed for internal purposes of the NM Coordinator.
Note: When NM Coordinator functionality is disabled Nm_RemoteSleepIndication
can be an empty function.

8.4.1.7 Nm_RemoteSleepCancellation

[SWS_Nm_00193] d
Service Name Nm_RemoteSleepCancellation
Syntax void Nm_RemoteSleepCancellation (
NetworkHandleType nmNetworkHandle
)

Service ID [hex] 0x18


Sync/Async Asynchronous
Reentrancy Reentrant
Parameters (in) nmNetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value None
Description Notification that the network management has detected that not all other nodes on the network
are longer ready to enter Bus-Sleep Mode.
Available via Nm.h

c(SRS_BSW_00359, SRS_Nm_02509)

82 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

[SWS_Nm_00278] dConfiguration of Nm_RemoteSleepCancellation: This func-


tion is only available if NmRemoteSleepIndEnabled is set to TRUE.c(SRS_Nm_-
00150)
The notification that not all other nodes on the network are longer ready to enter Bus-
Sleep Mode is only needed for internal purposes of the NM Coordinator.
Note: When NM Coordinator functionality is disabled Nm_RemoteSleepCancella-
tion can be an empty function.

8.4.1.8 Nm_SynchronizationPoint

[SWS_Nm_00194] d
Service Name Nm_SynchronizationPoint
Syntax void Nm_SynchronizationPoint (
NetworkHandleType nmNetworkHandle
)

Service ID [hex] 0x19


Sync/Async Asynchronous
Reentrancy Reentrant
Parameters (in) nmNetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value None
Description Notification to the NM Coordinator functionality that this is a suitable point in time to initiate the
coordinated shutdown on.
Available via Nm.h

c(SRS_BSW_00359, SRS_Nm_02516)
The notification that this is a suitable point in time to initiate the coordinated shut-
down is only needed for internal purposes of the NM Coordinator.

8.4.1.9 Nm_CoordReadyToSleepIndication

[SWS_Nm_00254] d
Service Name Nm_CoordReadyToSleepIndication
Syntax void Nm_CoordReadyToSleepIndication (
NetworkHandleType nmChannelHandle
)

Service ID [hex] 0x1e


5

83 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

4
Sync/Async Synchronous
Reentrancy Non Reentrant
Parameters (in) nmChannelHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value None
Description Sets an indication, when the NM Coordinator Sleep Ready bit in the Control Bit Vector is set
Available via Nm.h

c(SRS_BSW_00359, SRS_Nm_02535)
[SWS_Nm_00255] dConfiguration of Nm_CoordReadyToSleepIndication: Op-
tional
If NmCoordinatorSyncSupport is set to TRUE , the Nm shall provide the API Nm_-
CoordReadyToSleepIndication.c(SRS_Nm_00150)

8.4.1.10 Nm_CoordReadyToSleepCancellation

[SWS_Nm_00272] d
Service Name Nm_CoordReadyToSleepCancellation
Syntax void Nm_CoordReadyToSleepCancellation (
NetworkHandleType nmChannelHandle
)

Service ID [hex] 0x1f


Sync/Async Synchronous
Reentrancy Non Reentrant
Parameters (in) nmChannelHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value None
Description Cancels an indication, when the NM Coordinator Sleep Ready bit in the Control Bit Vector is set
back to 0.
Available via Nm.h

c(SRS_BSW_00359, SRS_Nm_02535)
[SWS_Nm_00273] dConfiguration of Nm_CoordReadyToSleepCancellation: Op-
tional
If NmCoordinatorSyncSupport is set to TRUE , the Nm shall provide the API Nm_-
CoordReadyToSleepCancellation.c(SRS_Nm_00150)

84 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

8.4.1.11 Nm_ForwardSynchronizedPncShutdown

[SWS_Nm_91004]{DRAFT} d
Service Name Nm_ForwardSynchronizedPncShutdown (draft)
Syntax void Nm_ForwardSynchronizedPncShutdown (
void
)

Service ID [hex] 0x23


Sync/Async Synchronous
Reentrancy Non Reentrant -reentrant for the same NetworkHandle, reentrant otherwise
Parameters (in) None
Parameters (inout) None
Parameters (out) None
Return value None
Description Notification that the network management has received a PN shutdown message on a
particular NM-channel. This is used to grant a nearly synchronized PNC shutdown across the
entire PN topology.
Tags:atp.Status=draft
Available via Nm.h

c(SRS_Nm_02544)

8.4.2 Extra Call-back notifications

The following call-back notifications are provided by NM Interface for OEM specific
extensions of bus specific NM components and are not required by any AUTOSAR
module. In the context of the Basic functionality and NM Coordinator functionality they
have no specific usage.

8.4.2.1 Nm_PduRxIndication

[SWS_Nm_00112] d
Service Name Nm_PduRxIndication
Syntax void Nm_PduRxIndication (
NetworkHandleType nmNetworkHandle
)

Service ID [hex] 0x15


Sync/Async Asynchronous
Reentrancy Reentrant
5

85 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

4
Parameters (in) nmNetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value None
Description Notification that a NM message has been received.
Available via Nm.h

c(SRS_BSW_00359)
The notification that an NM message has been received is only needed for OEM
specific extensions of the NM Coordinator.

[SWS_Nm_00164] dConfiguration of Nm_PduRxIndication: This function is only


available if NmPduRxIndicationEnabled is set to TRUE.c(SRS_Nm_00150)

8.4.2.2 Nm_StateChangeNotification

[SWS_Nm_00114] d
Service Name Nm_StateChangeNotification
Syntax void Nm_StateChangeNotification (
NetworkHandleType nmNetworkHandle,
Nm_StateType nmPreviousState,
Nm_StateType nmCurrentState
)

Service ID [hex] 0x16


Sync/Async Asynchronous
Reentrancy Reentrant
Parameters (in) nmNetworkHandle Identification of the NM-channel
nmPreviousState Previous state of the NM-channel
nmCurrentState Current (new) state of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value None
Description Notification that the state of the lower layer <BusNm> has changed.
Available via Nm.h

c(SRS_BSW_00359, SRS_Nm_00050)
The notification that the state of the bus-specific NM has changed is only needed for
OEM specific extensions and for the optional Dynamic PNC-to-channel-mapping fea-
ture.
[SWS_Nm_00165] dConfiguration of Nm_StateChangeNotification: This func-
tion is only available if NmStateChangeIndEnabled is set to TRUE.c(SRS_Nm_-
00150)

86 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

8.4.2.3 Nm_RepeatMessageIndication

[SWS_Nm_00230] d
Service Name Nm_RepeatMessageIndication
Syntax void Nm_RepeatMessageIndication (
NetworkHandleType nmNetworkHandle,
boolean pnLearningBitSet
)

Service ID [hex] 0x1a


Sync/Async Asynchronous
Reentrancy Reentrant
Parameters (in) nmNetworkHandle Identification of the NM-channel
pnLearningBitSet TRUE if also the Partial Network Learning Bit was received,
FALSE otherwise
Parameters (inout) None
Parameters (out) None
Return value None
Description Service to indicate that an NM message with set Repeat Message Re- quest Bit has been
received. This is needed for node detection and the Dynamic PNC-to-channel-mapping feature.
Available via Nm.h

c(SRS_BSW_00359, SRS_Nm_00153)
The notification that an NM message with the set Repeat Message Bit has been re-
ceived is only needed for OEM specific extensions and for the optional Dynamic PNC-
to-channel-mapping feature.
[SWS_Nm_00504]{DRAFT} dIf Nm_RepeatMessageIndication is called with
pnLearningBitSet set to TRUE and NmDynamicPncToChannelMappingEn-
abled is set to TRUE for the provided nmNetworkHandle Nm shall call
ComM_Nm_PncLearningBitIndication with the corresponding network handle.c
()

8.4.2.4 Nm_TxTimeoutException

[SWS_Nm_00234] d
Service Name Nm_TxTimeoutException
Syntax void Nm_TxTimeoutException (
NetworkHandleType nmNetworkHandle
)

Service ID [hex] 0x1b


Sync/Async Asynchronous
Reentrancy Reentrant
5

87 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

4
Parameters (in) nmNetworkHandle –
Parameters (inout) None
Parameters (out) None
Return value None
Description Service to indicate that an attempt to send an NM message failed.
Available via Nm.h

c(SRS_BSW_00359)
The notification that an attempt to send an NM message failed is only needed for OEM
specific extensions of the Nm.

8.4.2.5 Nm_CarWakeUpIndication

[SWS_Nm_00250] d
Service Name Nm_CarWakeUpIndication
Syntax void Nm_CarWakeUpIndication (
NetworkHandleType nmChannelHandle
)

Service ID [hex] 0x1d


Sync/Async Synchronous
Reentrancy Reentrant
Parameters (in) nmChannelHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value None
Description This function is called by a <Bus>Nm to indicate reception of a CWU request.
Available via Nm.h

c(SRS_BSW_00359, SRS_Nm_02503)
[SWS_Nm_00251] dConfiguration of Nm_CarWakeUpIndication: Optional
If NmCarWakeUpRxEnabled is TRUE, The Nm shall provide the API Nm_CarWake-
UpIndication.c(SRS_Nm_00150)

8.5 Scheduled functions


Since the Base functionality (Chapter 7.1) does not contain any logic that needs to be
invoked outside the scope of call from the upper or lower layer, the main function is
only needed to implement the NM Coordinator functionality (Chapter 7.2).
[SWS_Nm_00020] dA scheduled main function shall only contain logic related to the
NM Coordinator functionality.c(SRS_BSW_00373)

88 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

[SWS_Nm_00121] dIn case the main function is called before the Nm has been ini-
tialized, the main function shall immediately return without yielding an error.c(SRS_-
BSW_00450)
Rationale: In case the NM Coordinator functionality is not used and/or disabled, calling
the main function shall not yield in an error, but nothing should be performed.

8.5.1 Nm_MainFunction

[SWS_Nm_00118] d
Service Name Nm_MainFunction
Syntax void Nm_MainFunction (
void
)

Service ID [hex] 0x10


Description This function implements the processes of the NM Interface, which need a fix cyclic scheduling.
Available via SchM_Nm.h

c(SRS_BSW_00424, SRS_BSW_00425)
[SWS_Nm_00279] dIf NmCoordinatorSupportEnabled is set to TRUE, the Nm_-
MainFunction API shall be available.c(SRS_Nm_00150)

8.6 Expected interfaces


This chapter lists all interfaces required from other modules.

8.6.1 Mandatory Interfaces

This chapter lists all interfaces required from other modules.


[SWS_Nm_00119] d
API Function Header File Description
ComM_Nm_BusSleepMode ComM_Nm.h Notification that the network management has
entered Bus-Sleep Mode. This callback function
should perform a transition of the hardware and
transceiver to bus-sleep mode.
5

89 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

4
API Function Header File Description
ComM_Nm_ForwardSynchronizedPnc ComM_Nm.h If an ECU in role of an intermediate PNC
Shutdown coordinator receives a PN shutdown message via a
<Bus>Nm, then ComM is immediately indicated via
ComM_Nm_ForwardSynchronizedPncShutdown to
forward the request for a synchronized PNC
shutdown of the affected PNCs. Therefore, ComM
will immediately release the affected PNC state
machines and forward the PN information to the
affected ComM Channels and the corresponding
NM channels, respectively. Note: This supports a
nearly synchronized PNC shutdown across the PN
topology from the top-level PNC coordinator down to
the subordinated PNC node.
Tags:atp.Status=draft
ComM_Nm_NetworkMode ComM_Nm.h Notification that the network management has
entered Network Mode.
ComM_Nm_NetworkStartIndication ComM_Nm.h Indication that a NM-message has been received in
the Bus Sleep Mode, what indicates that some
nodes in the network have already entered the
Network Mode.
ComM_Nm_PrepareBusSleepMode ComM_Nm.h Notification that the network management has
entered Prepare Bus-Sleep Mode. Reentrancy:
Reentrant (but not for the same NM-Channel)
ComM_Nm_RestartIndication ComM_Nm.h If NmIf has started to shut down the coordinated
busses, AND not all coordinated busses have
indicated bus sleep state, AND on at least on one of
the coordinated busses NM is restarted, THEN the
NM Interface shall call the callback function ComM_
Nm_RestartIndication with the nmNetworkHandle of
the channels which have already indicated bus
sleep state.

c(SRS_Nm_02515, SRS_Nm_02536)

8.6.2 Optional Interfaces

This chapter defines all interfaces that are required to fulfill an optional functionality of
the module.
[SWS_Nm_00166] d
API Function Header File Description
BswM_Nm_CarWakeUpIndication BswM_Nm.h Function called by Nm to indicate a CarWakeup.
CanNm_PassiveStartUp CanNm.h Passive startup of the AUTOSAR CAN NM. It
triggers the transition from Bus-Sleep Mode or
Prepare Bus Sleep Mode to the Network Mode in
Repeat Message State.
Caveats: CanNm is initialized correctly.
5

90 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

4
API Function Header File Description
CanNm_PnLearningRequest CanNm.h Set Repeat Message Request Bit and Partial
Network Learning Bit for NM messages transmitted
next on the bus. This will force all nodes to enter the
PNC Learning Phase. This is needed for the
optional Dynamic PNC-to-channel-mapping feature.
Tags:atp.Status=draft
CanNm_RequestSynchronizedPnc CanNm.h Requests transmission of a NM-PDU with PNSR bit
Shutdown set to 1 (PN shutdown message)
Tags:atp.Status=draft
Com_SendSignal Com.h The service Com_SendSignal updates the signal
object identified by SignalId with the signal
referenced by the SignalDataPtr parameter.
ComM_Nm_PncLearningBitIndication ComM_Nm.h Service to indicate that an NM message with set
PNC Learning Bit has been received.
Tags:atp.Status=draft
ComM_Nm_RepeatMessageLeft ComM_Nm.h Notification that the state of all <BusNm> has left
Indication RepeatMessage. This interface is used to indicate
by the optional Dynamic PNC-to-channel-mapping
feature to indicate that learning phase ends.
Tags:atp.Status=draft
Det_ReportError Det.h Service to report development errors.
FrNm_PassiveStartUp FrNm.h Initiates the Passive Startup of the FlexRay NM.
FrNm_PnLearningRequest FrNm.h Set Repeat Message Request Bit and Partial
Network Learning Bit for NM messages transmitted
next on the bus. This will force all nodes to enter the
PNC Learning Phase. This is needed for the
optional Dynamic PNC-to-channel-mapping feature.
Tags:atp.Status=draft
FrNm_RequestSynchronizedPnc FrNm.h Requests transmission of a NM-PDU with PNSR bit
Shutdown set to 1 (PN shutdown message)
Tags:atp.Status=draft
J1939Nm_PassiveStartUp J1939Nm.h Passive startup of the NM. It triggers the transition
from Bus-Sleep Mode to the Network Mode without
requesting the network.
UdpNm_PassiveStartUp UdpNm.h Passive startup of the AUTOSAR UdpNm. It triggers
the transition from Bus-Sleep Mode or Prepare Bus
Sleep Mode to the Network Mode in Repeat
Message State.
Caveats: UdpNm is initialized correctly.
UdpNm_PnLearningRequest UdpNm.h Set Repeat Message Request Bit and Partial
Network Learning Bit for NM messages transmitted
next on the bus. This will force all nodes on the bus
to enter the PNC Learning Phase. This is needed
for the optional Dynamic PNC-to-channel-mapping
feature.
Tags:atp.Status=draft
UdpNm_RequestSynchronizedPnc UdpNm.h Requests transmission of a NM-PDU with PNSR bit
Shutdown set to 1 (PN shutdown message)
Tags:atp.Status=draft

c(SRS_Nm_00150, SRS_Nm_02515)

91 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

8.6.3 Configurable Interfaces

In this chapter all interfaces are listed where the target function could be configured.
The target function is usually a call-back function. The names of these kind of inter-
faces are not fixed because they are configurable.

8.6.3.1 NmCarWakeUpCallout

[SWS_Nm_00291] d
Service Name <NmCarWakeUpCallout>
Syntax void <NmCarWakeUpCallout> (
NetworkHandleType nmNetworkHandle
)

Service ID [hex] 0x20


Sync/Async Asynchronous
Reentrancy Non Reentrant
Parameters (in) nmNetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value None
Description Callout function to be called by Nm_CarWakeUpIndication()
Available via Nm_Externals.h

c(SRS_Nm_02504)

8.7 Version Check


For details refer to the chapter 5.1.8 "Version Check" in [2, SWS_BSWGeneral].

92 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

9 Sequence diagrams

9.1 Basic functionality


The role of the Basic functionality of the Nm is to act as a dispatcher of functions be-
tween the ComM and the Bus Specific NM modules. Therefore, no sequence diagram
is provided.

9.2 Seq of NM Coordinator functionality


Figure shows the sequence diagram for the shutdown of network of the NM
Coordinator functionality.

93 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

«module» «module» «module» «module» «module» «module»


ComM Nm FrNm CanNm FrSm CanSM

Network Mode Network Mode


Normal Operation Normal Operation

Nm_NetworkRelease(Std_ReturnType,
NetworkHandleType)

Nm_RemoteSleepIndication

(NetworkHandleType)

Nm_RemoteSleepIndication



(NetworkHandleType)


Repetition cycle
boundary()
Nm_SynchronizationPoint
(NetworkHandleType)
Start shutdown
timers()

par synchronous NM shutdown Shutdown timer expires


[FlexRay] ()

FrNm_RequestBusSynchronization(Std_ReturnType,
NetworkHandleType)
FrNm_NetworkRelease(Std_ReturnType,
NetworkHandleType)

Repetition cycle
boundary()

Network Mode
Ready Sleep

Last repetition
Nm_BusSleepMode(NetworkHandleType) cycle finished()

ComM_Nm_BusSleepMode Bus Sleep Mode


(NetworkHandleType)

FrSM_RequestComMode(ComM_ModeType,
NetworkHandleType)

[CAN]
Shutdown timer expires
()

CanNm_RequestBusSynchronization(Std_ReturnType,
NetworkHandleType)
CanNm_NetworkRelease(Std_ReturnType,
NetworkHandleType)
Network Mode
Ready Sleep

Timer expires
()
Nm_PrepareBusSleepMode(NetworkHandleType)

ComM_Nm_PrepareBusSleepMode Prepare Bus-Sleep Mode


(NetworkHandleType)

CanSM_RequestComMode(Std_ReturnType,
NetworkHandleType, ComM_ModeType)
Timer expires
()

Nm_BusSleepMode(NetworkHandleType)
ComM_Nm_BusSleepMode
(NetworkHandleType) Bus-Sleep Mode

CanSM_RequestComMode(Std_ReturnType,
NetworkHandleType, ComM_ModeType)

Figure 9.1: Nm Coordination

94 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

10 Configuration specification
The following chapter contains tables of all configuration parameters and switches
used to determine the functional units of the Generic Network Management Interface.
The default values of configuration parameters are denoted as bold.

In general, this chapter defines configuration parameters and their clustering into con-
tainers. section 10.1 describes fundamentals. section 10.2, section 10.3 and section
10.4 specifies the structure (containers) and the parameters of the Nm. The section
10.5 specifies published information of the Nm.
AUTOSARParameterDefinition:
EcucDefinitionCollection

+module CanNm: EcucModuleDef

lowerMultiplicity = 0
upperMultiplicity = 1

FrNm: EcucModuleDef
+module
lowerMultiplicity = 0
upperMultiplicity = 1

UdpNm: EcucModuleDef
+module
lowerMultiplicity = 0
upperMultiplicity = 1

J1939Nm: EcucModuleDef
+module
lowerMultiplicity = 0
upperMultiplicity = 1

Figure 10.1: Network Management Overview

10.1 How to read this chapter


For details refer to the [2, chapter 10.1 “Introduction to configuration specification” in
SWS_BSWGeneral]

10.2 Configuration parameters


The following Chapters summarize all configuration parameters for the Nm. The de-
tailed meanings of most parameters are described in chapter 7 and chapter 8.
Note that the behavior and configuration of Nm is closely dependent on the behavior
and configuration of the different bus specific NM modules used.

95 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

10.2.1 Nm

Module SWS Item ECUC_Nm_00243


Module Name Nm
Module Description The Generic Network Management Interface module
Post-Build Variant false
Support
Supported Config VARIANT-LINK-TIME, VARIANT-PRE-COMPILE
Variants
Included Containers
Container Name Multiplicity Scope / Dependency
NmChannelConfig 1..* This container contains the configuration (parameters)
of the bus channel(s). The channel parameter shall be
harmonized within the whole communication stack.
NmGlobalConfig 1 This container contains all global configuration
parameters of the Nm Interface.

Nm: EcucModuleDef NmGlobalConfig: +subContainer NmGlobalConstants:


EcucParamConfContainerDef EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = 1 upperMultiplicity = 1
lowerMultiplicity = 1

+subContainer NmGlobalProperties:
EcucParamConfContainerDef

+container
+subContainer NmGlobalFeatures:
EcucParamConfContainerDef

NmEcucPartitionRef:
+reference EcucReferenceDef

lowerMultiplicity = 0
upperMultiplicity = 1

+destination

EcucPartition:
+container EcucParamConfContainerDef
NmChannelConfig:
EcucParamConfContainerDef lowerMultiplicity = 0
upperMultiplicity = *
upperMultiplicity = *
lowerMultiplicity = 1

Figure 10.2: Nm configuration container overview

10.3 Global configurable parameters

10.3.1 NmGlobalConfig

SWS Item [ECUC_Nm_00196]


Container Name NmGlobalConfig
Parent Container Nm

96 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Description This container contains all global configuration parameters of the Nm


Interface.
Configuration Parameters

Name NmEcucPartitionRef [ECUC_Nm_00245]


Parent Container NmGlobalConfig
Description Reference to EcucPartition, where Nm module is assigned to.
Multiplicity 0..1
Type Reference to EcucPartition
Post-Build Variant false
Multiplicity
Post-Build Variant false
Value
Multiplicity Pre-compile time X All Variants
Configuration Class
Link time –
Post-build time –
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local

Included Containers
Container Name Multiplicity Scope / Dependency
NmGlobalConstants 1
NmGlobalFeatures 1
NmGlobalProperties 1

97 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

NmNumberOfChannels:
NmGlobalConfig: NmGlobalConstants: EcucIntegerParamDef
+subContainer EcucParamConfContainerDef +parameter
EcucParamConfContainerDef
min = 1
upperMultiplicity = 1 max = 255
lowerMultiplicity = 1

NmDevErrorDetect:
NmGlobalProperties: +parameter EcucBooleanParamDef
EcucParamConfContainerDef
defaultValue = false

+parameter NmVersionInfoApi:
EcucBooleanParamDef
+subContainer
defaultValue = false

NmCycletimeMainFunction:
+parameter EcucFloatParamDef

min = 0
max = INF
lowerMultiplicity = 0
upperMultiplicity = 1

+subContainer NmGlobalFeatures: +parameter NmComControlEnabled:


EcucParamConfContainerDef EcucBooleanParamDef

+parameter NmUserDataEnabled:
NmCoordinatorSupportEnabled:
+parameter EcucBooleanParamDef
EcucBooleanParamDef

defaultValue = false
+parameter NmStateChangeIndEnabled:
EcucBooleanParamDef
NmRemoteSleepIndEnabled: +parameter
EcucBooleanParamDef
NmCarWakeUpRxEnabled:
+parameter
EcucBooleanParamDef
NmBusSynchronizationEnabled: +parameter defaultValue = false
EcucBooleanParamDef

NmCarWakeUpCallout:
NmGlobalCoordinatorTime: +parameter EcucFunctionNameDef
EcucFloatParamDef
+parameter lowerMultiplicity = 0
min = 0 upperMultiplicity = 1
max = INF
lowerMultiplicity = 0
upperMultiplicity = 1
+parameter NmCoordinatorSyncSupport:
EcucBooleanParamDef
NmDynamicPncToChannelMappingSupport: +parameter
EcucBooleanParamDef
+parameter NmPduRxIndicationEnabled:
EcucBooleanParamDef

NmSynchronizedPncShutdownEnabled: +parameter
EcucBooleanParamDef

defaultValue = false
lowerMultiplicity = 0
upperMultiplicity = 1

Figure 10.3: NmGlobalConfig overview

10.3.2 NmGlobalConstants

SWS Item [ECUC_Nm_00198]


Container Name NmGlobalConstants
Parent Container NmGlobalConfig
Description
Configuration Parameters

98 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Name NmNumberOfChannels [ECUC_Nm_00201]


Parent Container NmGlobalConstants
Description Number of NM channels allowed within one ECU.
Multiplicity 1
Type EcucIntegerParamDef
Range 1 .. 255
Default Value
Post-Build Variant false
Value
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local

No Included Containers

10.3.3 NmGlobalProperties

SWS Item [ECUC_Nm_00199]


Container Name NmGlobalProperties
Parent Container NmGlobalConfig
Description
Configuration Parameters

Name NmCycletimeMainFunction [ECUC_Nm_00205]


Parent Container NmGlobalProperties
Description The period between successive calls to the Main Function of the NM
Interface in seconds.
Multiplicity 0..1
Type EcucFloatParamDef
Range ]0 .. INF[
Default Value
Post-Build Variant false
Multiplicity
Post-Build Variant false
Value
Multiplicity Pre-compile time X VARIANT-PRE-COMPILE
Configuration Class
Link time X VARIANT-LINK-TIME
Post-build time –
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time –

99 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Scope / Dependency scope: local


dependency: If NmCoordinatorSupportEnabled is set to TRUE, then
the NmCycletimeMainFunction shall be configured.

Name NmDevErrorDetect [ECUC_Nm_00203]


Parent Container NmGlobalProperties
Description Switches the development error detection and notification on or off.
• true: detection and notification is enabled.
• false: detection and notification is disabled.

Multiplicity 1
Type EcucBooleanParamDef
Default Value false
Post-Build Variant false
Value
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local

Name NmVersionInfoApi [ECUC_Nm_00204]


Parent Container NmGlobalProperties
Description Pre-processor switch for enabling Version Info API support.
Multiplicity 1
Type EcucBooleanParamDef
Default Value false
Post-Build Variant false
Value
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local

No Included Containers

10.3.4 NmGlobalFeatures

SWS Item [ECUC_Nm_00200]


Container Name NmGlobalFeatures
Parent Container NmGlobalConfig
Description
Configuration Parameters

100 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Name NmBusSynchronizationEnabled [ECUC_Nm_00208]


Parent Container NmGlobalFeatures
Description Pre-processor switch for enabling bus synchronization support of the
<BusNm>s. This feature is required for NM Coordinator nodes only.
Multiplicity 1
Type EcucBooleanParamDef
Default Value
Post-Build Variant false
Value
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local
dependency: This parameter must be enabled if
NmCoordinatorSupportEnabled is enabled.

Name NmCarWakeUpCallout [ECUC_Nm_00234]


Parent Container NmGlobalFeatures
Description Name of the callout function to be called if Nm_CarWakeUpIndication()
is called. If this parameter is not configured, the Nm will call
BswM_Nm_CarWakeUpIndication.
Multiplicity 0..1
Type EcucFunctionNameDef
Default Value
Regular Expression
Post-Build Variant false
Multiplicity
Post-Build Variant false
Value
Multiplicity Pre-compile time X VARIANT-PRE-COMPILE
Configuration Class
Link time X VARIANT-LINK-TIME
Post-build time –
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time –
Scope / Dependency scope: local
dependency: only available if NmCarWakeUpRxEnabled == TRUE

Name NmCarWakeUpRxEnabled [ECUC_Nm_00235]


Parent Container NmGlobalFeatures
Description Enables or disables CWU detection. FALSE - CarWakeUp not
supported TRUE - CarWakeUp supported
Multiplicity 1
Type EcucBooleanParamDef
Default Value false
Post-Build Variant false
Value

101 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Value Configuration Pre-compile time X VARIANT-PRE-COMPILE


Class
Link time X VARIANT-LINK-TIME
Post-build time –
Scope / Dependency scope: local

Name NmComControlEnabled [ECUC_Nm_00210]


Parent Container NmGlobalFeatures
Description Pre-processor switch for enabling the Communication Control support.
Multiplicity 1
Type EcucBooleanParamDef
Default Value
Post-Build Variant false
Value
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local

Name NmCoordinatorSupportEnabled [ECUC_Nm_00206]


Parent Container NmGlobalFeatures
Description Pre-processor switch for enabling NM Coordinator support.
Multiplicity 1
Type EcucBooleanParamDef
Default Value false
Post-Build Variant false
Value
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local
dependency: Only valid if at least one NM channel exists which has
NmPassiveModeEnabled set to FALSE.

Name NmCoordinatorSyncSupport [ECUC_Nm_00240]


Parent Container NmGlobalFeatures
Description Enables/disables the coordinator synchronisation support.
Multiplicity 1
Type EcucBooleanParamDef
Default Value
Post-Build Variant false
Value
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time –

102 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Scope / Dependency scope: local


dependency: NmCoordinatorSyncSupport shall only be valid if
NmCoordinatorSupportEnabled is TRUE.

Name NmDynamicPncToChannelMappingSupport [ECUC_Nm_00246]


Parent Container NmGlobalFeatures
Description Precompile time switch to enable the dynamic
PNC-to-channel-mapping handling.

False: Dynamic PNC-to-channel-mapping is disabled True: Dynamic


PNC-to-channel-mapping is enabled

Tags:
atp.Status=draft
Multiplicity 1
Type EcucBooleanParamDef
Default Value
Post-Build Variant false
Value
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local

Name NmGlobalCoordinatorTime [ECUC_Nm_00237]


Parent Container NmGlobalFeatures
Description This parameter defines the maximum shutdown time of a connected
and coordinated NM-Cluster. Note:This includes nested connections.
Multiplicity 0..1
Type EcucFloatParamDef
Range [0 .. INF]
Default Value
Post-Build Variant false
Multiplicity
Post-Build Variant false
Value
Multiplicity Pre-compile time X All Variants
Configuration Class
Link time –
Post-build time –
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local
dependency: NmGlobalCoordinatorTime shall only be valid if
NmCoordinatorSupportEnabled is TRUE.

103 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Name NmPduRxIndicationEnabled [ECUC_Nm_00214]


Parent Container NmGlobalFeatures
Description Pre-processor switch for enabling the PDU Rx Indication.
Multiplicity 1
Type EcucBooleanParamDef
Default Value
Post-Build Variant false
Value
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local

Name NmRemoteSleepIndEnabled [ECUC_Nm_00207]


Parent Container NmGlobalFeatures
Description Pre-processor switch for enabling Remote Sleep Indication support.
This feature is required for a Gateway or Nm Coordinator functionality.

Note that this feature should not be used if all NM channels have
Passive Mode enabled.
Multiplicity 1
Type EcucBooleanParamDef
Default Value
Post-Build Variant false
Value
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local
dependency: If NmCoordinatorSupportEnabled == TRUE then
NmRemoteSleepIndEnabled = TRUE

Name NmStateChangeIndEnabled [ECUC_Nm_00215]


Parent Container NmGlobalFeatures
Description Pre-processor switch for enabling the Network Management state
change notification.
Multiplicity 1
Type EcucBooleanParamDef
Default Value
Post-Build Variant false
Value
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local
dependency: NmStateChangeIndEnabled = TRUE
if NmDynamicPncToChannelMappingEnabled == TRUE

104 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Name NmSynchronizedPncShutdownEnabled [ECUC_Nm_00249]


Parent Container NmGlobalFeatures
Description Enables or disables support of synchronized PNC shutdown.

FALSE: synchronized PNC shutdown is disabled

TRUE: synchronized PNC shutdown is enabled

Tags:
atp.Status=draft
Multiplicity 0..1
Type EcucBooleanParamDef
Default Value false
Post-Build Variant false
Multiplicity
Post-Build Variant false
Value
Multiplicity Pre-compile time X VARIANT-PRE-COMPILE
Configuration Class
Link time X VARIANT-LINK-TIME
Post-build time –
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time –
Scope / Dependency scope: local

Name NmUserDataEnabled [ECUC_Nm_00211]


Parent Container NmGlobalFeatures
Description Pre-processor switch for enabling User Data support.
Multiplicity 1
Type EcucBooleanParamDef
Default Value
Post-Build Variant false
Value
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local

No Included Containers

10.4 Channel configurable parameters

10.4.1 NmChannelConfig

105 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

SWS Item [ECUC_Nm_00197]


Container Name NmChannelConfig
Parent Container Nm
Description This container contains the configuration (parameters) of the bus
channel(s). The channel parameter shall be harmonized within the
whole communication stack.
Configuration Parameters

Name NmActiveCoordinator [ECUC_Nm_00236]


Parent Container NmChannelConfig
Description This parameter indicates whether a NM channel - part of a Nm
Coordination cluster - will be coordinated actively
(NmActiveCoordinator = TRUE) or passively (NmActiveCoordinator =
FALSE).
Multiplicity 0..1
Type EcucBooleanParamDef
Default Value
Post-Build Variant false
Multiplicity
Post-Build Variant false
Value
Multiplicity Pre-compile time X All Variants
Configuration Class
Link time –
Post-build time –
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local
dependency: If the NmCoordinatorSyncSupport is set to true this
feature is available. Only one channel per Coordination cluster can
have NmActiveCoordinator = FALSE. This parameter is mandatory if
this channel belongs to a Coordination cluster (see
ECUC_Nm_00221). Value cannot be set to FALSE in case
BusNmType is set to NM_BUSNM_LOCALNM (i.e. no passive
coordination for this type).

106 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Name NmChannelSleepMaster [ECUC_Nm_00227]


Parent Container NmChannelConfig
Description This parameter shall be set to indicate if the sleep of this network can
be absolutely decided by the local node only and that no other nodes
can oppose that decision.

If this parameter is set to TRUE, the Nm shall assume that the channel
is always ready to go to sleep and that no calls to
Nm_RemoteSleepIndication or Nm_RemoteSleepCancellation will be
made from the <BusNm> representing this channel.

If this parameter is set to FALSE, the Nm shall not assume that the
network is ready to sleep until a call has been made to
Nm_RemoteSleepCancellation.
Multiplicity 1
Type EcucBooleanParamDef
Default Value
Post-Build Variant false
Value
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time –
Scope / Dependency scope: local
dependency: If the parameter NmCoordClusterIndex is not defined,
this parameter is not valid.

Name NmComUserDataSupport [ECUC_Nm_00241]


Parent Container NmChannelConfig
Description This parameter indicates whether on a NM channel user data is
accessed via Com signals or by SetUserData API.
Multiplicity 0..1
Type EcucBooleanParamDef
Default Value false
Post-Build Variant false
Multiplicity
Post-Build Variant false
Value
Multiplicity Pre-compile time X All Variants
Configuration Class
Link time –
Post-build time –
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local
dependency: NmComUserDataSupport shall be equal to
<Bus>NmComUserDataSupport

107 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Name NmCoordClusterIndex [ECUC_Nm_00221]


Parent Container NmChannelConfig
Description If this parameter is undefined for a channel, the corresponding bus
does not belong to an NM coordination cluster.
Multiplicity 0..1
Type EcucIntegerParamDef
Range 0 .. 255
Default Value
Post-Build Variant false
Multiplicity
Post-Build Variant false
Value
Multiplicity Pre-compile time X VARIANT-PRE-COMPILE
Configuration Class
Link time X VARIANT-LINK-TIME
Post-build time –
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time –
Scope / Dependency scope: local
dependency: If NmCoordClusterIndex is defined than
NmPassiveModeEnabled has to be FALSE for this channel.

Name NmDynamicPncToChannelMappingEnabled [ECUC_Nm_00248]


Parent Container NmChannelConfig
Description Channel-specific parameter to enable the dynamic
PNC-to-channel-mapping feature.

False: Dynamic PNC-to-channel-mapping is disabled True: Dynamic


PNC-to-channel-mapping is enabled

Tags:
atp.Status=draft
Multiplicity 0..1
Type EcucBooleanParamDef
Default Value false
Post-Build Variant false
Value
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time –
Scope / Dependency scope: local
dependency: Shall only be TRUE if
NmDynamicPncToChannelMappingSupport is TRUE

108 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Name NmPassiveModeEnabled [ECUC_Nm_00242]


Parent Container NmChannelConfig
Description This parameter indicates whether a NM channel is active,e.g. can
request communication and keep the bus awake, or passive, e.g. can
just be woken up and kept awake by other ECUs.
Multiplicity 1
Type EcucBooleanParamDef
Default Value
Post-Build Variant false
Value
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local
dependency: if ComMNmVariant == FULL then
NmPassiveModeEnabled = FALSE; NmPassiveModeEnabled shall be
equal to <Bus>NmPassiveModeEnabled

Name NmStateReportEnabled [ECUC_Nm_00231]


Parent Container NmChannelConfig
Description Specifies if the NMS shall be set for the corresponding network. false:
No NMS shall be set true: The NMS shall be set
Multiplicity 1
Type EcucBooleanParamDef
Default Value
Post-Build Variant false
Value
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local
dependency: only available if NmStatChangeIndEnabled and
NmComUserDataSupport are configured to TRUE.

Name NmSynchronizingNetwork [ECUC_Nm_00223]


Parent Container NmChannelConfig
Description If this parameter is true, then this network is a synchronizing network
for the NM coordination cluster which it belongs to. The network is
expected to call Nm_SynchronizationPoint() at regular intervals.
Multiplicity 1
Type EcucBooleanParamDef
Default Value
Post-Build Variant false
Value
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time –

109 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Scope / Dependency scope: local


dependency: If the parameter NmCoordClusterIndex is not defined,
this parameter is not valid. Only one network can be configured as
synchronizing network (NmSynchronizingNetwork = TRUE) per
coordination cluster (same NmCoordClusterIndex value per channel).
NmSynchronizingNetwork can only be set to true if
NmActiveCoordinator is true for all networks which have the same
NmCoordClusterIndex.

Name NmComMChannelRef [ECUC_Nm_00217]


Parent Container NmChannelConfig
Description Reference to the corresponding ComM Channel.
Multiplicity 1
Type Symbolic name reference to ComMChannel
false
Post-Build Variant
Value
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time –
Scope / Dependency scope: local

Name NmStateReportSignalRef [ECUC_Nm_00232]


Parent Container NmChannelConfig
Description Reference to the signal for setting the NMS by calling
Com_SendSignal for the respective channel.
Multiplicity 0..1
Type Symbolic name reference to ComSignal
Post-Build Variant false
Multiplicity
Post-Build Variant false
Value
Multiplicity Pre-compile time X All Variants
Configuration Class
Link time –
Post-build time –
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local
dependency: Signal must be configured in COM. Only available if
NmStateReportEnabled == true

Included Containers
Container Name Multiplicity Scope / Dependency
NmBusType 1

110 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

NmChannelConfig: ComMChannel:
EcucParamConfContainerDef +reference NmComMChannelRef: EcucReferenceDef +destination EcucParamConfContainerDef
requiresSymbolicNameValue = true
upperMultiplicity = * lowerMultiplicity = 1
lowerMultiplicity = 1 upperMultiplicity = 256
NmCoordClusterIndex: EcucIntegerParamDef

+parameter lowerMultiplicity = 0
upperMultiplicity = 1
min = 0
max = 255

NmActiveCoordinator: EcucBooleanParamDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = 1
+parameter NmDynamicPncToChannelMappingEnabled:
EcucBooleanParamDef
+parameter NmSynchronizingNetwork: EcucBooleanParamDef defaultValue = false
lowerMultiplicity = 0
upperMultiplicity = 1

+parameter NmChannelSleepMaster: EcucBooleanParamDef

+parameter NmPassiveModeEnabled: EcucBooleanParamDef

NmComUserDataSupport: EcucBooleanParamDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = 1
defaultValue = false

+subContainer NmBusType: EcucChoiceContainerDef

+choice +choice

NmGenericBusNmConfig: EcucParamConfContainerDef NmStandardBusNmConfig:


EcucParamConfContainerDef
lowerMultiplicity = 0
upperMultiplicity = 1 lowerMultiplicity = 0
upperMultiplicity = 1

+parameter +parameter +parameter

NmGenericBusNmPrefix: NmGenericBusNmShutdownTime: NmStandardBusType:


EcucStringParamDef EcucFloatParamDef EcucEnumerationParamDef

min = 0
max = INF

+parameter NmStateReportEnabled:
EcucBooleanParamDef

NmStateReportSignalRef: ComSignal: EcucParamConfContainerDef


+reference EcucReferenceDef +destination
lowerMultiplicity = 0
lowerMultiplicity = 0 upperMultiplicity = *
upperMultiplicity = 1
requiresSymbolicNameValue = true

Figure 10.4: NmChannelConfig overview

10.4.2 NmBusType

SWS Item [ECUC_Nm_00218]


Container Name NmBusType
Parent Container NmChannelConfig
Description
Configuration Parameters

111 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

Container Choices
Container Name Multiplicity Scope / Dependency
NmGenericBusNmConfig 0..1
NmStandardBusNm 0..1
Config

10.4.3 NmGenericBusNmConfig

SWS Item [ECUC_Nm_00225]


Container Name NmGenericBusNmConfig
Parent Container NmBusType
Description
Configuration Parameters

Name NmGenericBusNmPrefix [ECUC_Nm_00219]


Parent Container NmGenericBusNmConfig
Description The prefix which identifies the generic <BusNm>. This will be used to
determine the API name to be called by Nm for the provided interfaces
of the <BusNm>. This string will used for the module prefix before the
"_" character in the API call name.
Multiplicity 1
Type EcucStringParamDef
Default Value
Regular Expression
Post-Build Variant false
Value
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time –
Scope / Dependency scope: local

Name NmGenericBusNmShutdownTime [ECUC_Nm_00239]


Parent Container NmGenericBusNmConfig
Description This parameter shall be used to calculate shutdown delay time.
Multiplicity 1
Type EcucFloatParamDef
Range [0 .. INF]
Default Value
Post-Build Variant false
Value
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time –
Scope / Dependency scope: local

112 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

No Included Containers

10.4.4 NmStandardBusNmConfig

SWS Item [ECUC_Nm_00226]


Container Name NmStandardBusNmConfig
Parent Container NmBusType
Description
Configuration Parameters

Name NmStandardBusType [ECUC_Nm_00220]


Parent Container NmStandardBusNmConfig
Description Identifies the bus type of the channel for standard AUTOSAR
<BusNm>s and is used to determine which set of API calls to be called
by Nm for the <BusNm>s. Note: The Ethernet bus’ NM is UdpNm !
Multiplicity 1
Type EcucEnumerationParamDef
Range NM_BUSNM_CANNM CAN bus
NM_BUSNM_FRNM FlexRay bus
NM_BUSNM_J1939NM J1939 bus (address claiming)
NM_BUSNM_LOCALNM Local Bus (e.g. LIN bus)
NM_BUSNM_UDPNM Ethernet bus (using UDP)
Post-Build Variant false
Value
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time –
Scope / Dependency scope: local
dependency: Configuring value to NM_BUSNM_LOCALNM is only
allowed if NmCoordClusterIndex for the corresponding channel is
defined (i.e channel is coordinated).

No Included Containers

10.5 Published Information


For details refer to the chapter 10.3 “Published Information” in [2, SWS_BSWGeneral].

113 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


Specification of Network Management Interface
AUTOSAR CP R20-11

A Not applicable requirements


[SWS_Nm_00999] Not applicable requirements dThese requirements are not
applicable to this specification.c(SRS_Nm_00043, SRS_Nm_00052, SRS_Nm_-
00053, SRS_Nm_00054, SRS_Nm_00137, SRS_Nm_00142, SRS_Nm_00143,
SRS_Nm_00144, SRS_Nm_00145, SRS_Nm_00146, SRS_Nm_00147, SRS_Nm_-
00148, SRS_Nm_02509, SRS_Nm_02510, SRS_Nm_02517, SRS_Nm_02518,
SRS_Nm_02519, SRS_Nm_02520, SRS_Nm_02521, SRS_Nm_02522, SRS_Nm_-
02523, SRS_Nm_02524, SRS_Nm_02525, SRS_Nm_02526, SRS_Nm_02527,
SRS_Nm_02528, SRS_Nm_02529, SRS_Nm_02530, SRS_Nm_02531, SRS_Nm_-
02532, SRS_Nm_02533, SRS_Nm_02534, SRS_BSW_00004, SRS_BSW_00005,
SRS_BSW_00006, SRS_BSW_00007, SRS_BSW_00009, SRS_BSW_00010, SRS_-
BSW_00158, SRS_BSW_00160, SRS_BSW_00161, SRS_BSW_00162, SRS_-
BSW_00164, SRS_BSW_00167, SRS_BSW_00168, SRS_BSW_00170, SRS_-
BSW_00172, SRS_BSW_00300, SRS_BSW_00302, SRS_BSW_00304, SRS_-
BSW_00305, SRS_BSW_00306, SRS_BSW_00307, SRS_BSW_00308, SRS_-
BSW_00309, SRS_BSW_00310, SRS_BSW_00312, SRS_BSW_00314, SRS_-
BSW_00318, SRS_BSW_00321, SRS_BSW_00325, SRS_BSW_00328, SRS_-
BSW_00331, SRS_BSW_00334, SRS_BSW_00335, SRS_BSW_00336, SRS_-
BSW_00339, SRS_BSW_00341, SRS_BSW_00342, SRS_BSW_00343, SRS_-
BSW_00346, SRS_BSW_00347, SRS_BSW_00350, SRS_BSW_00351, SRS_-
BSW_00360, SRS_BSW_00361, SRS_BSW_00371, SRS_BSW_00374, SRS_-
BSW_00375, SRS_BSW_00377, SRS_BSW_00378, SRS_BSW_00379, SRS_-
BSW_00380, SRS_BSW_00383, SRS_BSW_00388, SRS_BSW_00389, SRS_-
BSW_00390, SRS_BSW_00392, SRS_BSW_00393, SRS_BSW_00394, SRS_-
BSW_00395, SRS_BSW_00397, SRS_BSW_00398, SRS_BSW_00399, SRS_-
BSW_00400, SRS_BSW_00401, SRS_BSW_00402, SRS_BSW_00403, SRS_-
BSW_00404, SRS_BSW_00406, SRS_BSW_00408, SRS_BSW_00409, SRS_-
BSW_00410, SRS_BSW_00411, SRS_BSW_00413, SRS_BSW_00415, SRS_-
BSW_00416, SRS_BSW_00417, SRS_BSW_00422, SRS_BSW_00423, SRS_-
BSW_00424, SRS_BSW_00426, SRS_BSW_00427, SRS_BSW_00428, SRS_-
BSW_00429, SRS_BSW_00432, SRS_BSW_00433, SRS_BSW_00437, SRS_-
BSW_00438, SRS_BSW_00439, SRS_BSW_00440, SRS_BSW_00441, SRS_-
BSW_00447, SRS_BSW_00448, SRS_BSW_00449, SRS_BSW_00451, SRS_-
BSW_00452, SRS_BSW_00453, SRS_BSW_00454, SRS_BSW_00456, SRS_-
BSW_00457, SRS_BSW_00458, SRS_BSW_00459, SRS_BSW_00460, SRS_-
BSW_00461, SRS_BSW_00462, SRS_BSW_00463, SRS_BSW_00464, SRS_-
BSW_00465, SRS_BSW_00466, SRS_BSW_00467, SRS_BSW_00469, SRS_-
BSW_00470, SRS_BSW_00471, SRS_BSW_00472, SRS_BSW_00473, SRS_-
BSW_00396, SRS_BSW_00477, SRS_BSW_00479, SRS_BSW_00480, SRS_-
BSW_00481)

114 of 114 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface

You might also like