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

AUTOSAR SWS NetworkManagementInterface

a

Uploaded by

Stefan
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)
28 views

AUTOSAR SWS NetworkManagementInterface

a

Uploaded by

Stefan
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/ 105

Specification of NetworkManagement Interface

AUTOSAR CP Release 4.4.0

Specification of
Document Title NetworkManagement Interface
Document Owner AUTOSAR
Document Responsibility AUTOSAR
Document Identification No 228

Document Status Final


Part of AUTOSAR Standard Classic Platform
Part of Standard Release 4.4.0

Document Change History


Date Release Changed by Description

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
• 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

1 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

• 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
• 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

2 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

• 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 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Table of Contents
1 Introduction and functional overview 8

2 Acronyms and Abbreviations 9

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

7 Functional specification 35
7.1 Base functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
7.2 NM Coordinator functionality . . . . . . . . . . . . . . . . . . . . . . . . 35
7.2.1 Applicability of the NM Coordinator functionality . . . . . . . 36
7.2.2 Keeping coordinated busses alive . . . . . . . . . . . . . . . 37
7.2.3 Shutdown of coordinated busses . . . . . . . . . . . . . . . . 38
7.2.4 Coordination of nested sub-busses . . . . . . . . . . . . . . 40
7.2.5 Calculation of shutdown timers . . . . . . . . . . . . . . . . . 44
7.2.6 Synchronization Use Case 1 - Synchronous command . . . 44
7.2.7 Synchronization Use Case 2 - Synchronous initiation . . . . 45
7.2.8 Synchronization Use Case 3 - Synchronous network sleep . 45
7.2.8.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . 46
7.3 Wakeup and abortion of the coordinated shutdown . . . . . . . . . . . 48
7.3.1 External network wakeup . . . . . . . . . . . . . . . . . . . . 48
7.3.2 Coordinated wakeup . . . . . . . . . . . . . . . . . . . . . . . 48
7.3.3 Abortion of the coordinated shutdown . . . . . . . . . . . . . 48
7.4 Prerequisites of bus specific Network Management modules . . . . . . 50
7.4.1 Prerequisites for basic functionality . . . . . . . . . . . . . . 51
7.4.2 Prerequisites for NM Coordinator functionality . . . . . . . . 52
7.4.3 Configuration of global parameters for bus specific networks 54

5 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

7.5 NM_BUSNM_LOCALNM . . . . . . . . . . . . . . . . . . . . . . . . . . 54
7.6 Additional Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
7.6.1 Nm_CarWakeUpIndication . . . . . . . . . . . . . . . . . . . 55
7.6.2 Nm_StateChangeNotification . . . . . . . . . . . . . . . . . . 55
7.7 Error classification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
7.7.1 Development Errors . . . . . . . . . . . . . . . . . . . . . . . 56
7.7.2 Runtime Errors . . . . . . . . . . . . . . . . . . . . . . . . . . 56
7.7.3 Transient Faults . . . . . . . . . . . . . . . . . . . . . . . . . 56
7.7.4 Production Errors . . . . . . . . . . . . . . . . . . . . . . . . 56
7.7.5 Extended Production Errors . . . . . . . . . . . . . . . . . . . 56
7.8 Error detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
7.9 Error notification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
8 API specification 58
8.1 Imported types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
8.2 Type definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
8.2.1 Nm_ModeType . . . . . . . . . . . . . . . . . . . . . . . . . . 58
8.2.2 Nm_StateType . . . . . . . . . . . . . . . . . . . . . . . . . . 58
8.2.3 Nm_BusNmType . . . . . . . . . . . . . . . . . . . . . . . . . 59
8.2.4 Nm_ConfigType . . . . . . . . . . . . . . . . . . . . . . . . . 59
8.3 Function definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
8.3.1 Standard services provided by NM Interface . . . . . . . . . 60
8.3.1.1 Nm_Init . . . . . . . . . . . . . . . . . . . . . . . . . 60
8.3.1.2 Nm_PassiveStartUp . . . . . . . . . . . . . . . . . . 60
8.3.1.3 Nm_NetworkRequest . . . . . . . . . . . . . . . . . 61
8.3.1.4 Nm_NetworkRelease . . . . . . . . . . . . . . . . . . 62
8.3.2 Communication control services provided by NM Interface . 63
8.3.2.1 Nm_DisableCommunication . . . . . . . . . . . . . . 63
8.3.2.2 Nm_EnableCommunication . . . . . . . . . . . . . . 64
8.3.3 Extra services provided by NM Interface . . . . . . . . . . . . 65
8.3.3.1 Nm_SetUserData . . . . . . . . . . . . . . . . . . . . 65
8.3.3.2 Nm_GetUserData . . . . . . . . . . . . . . . . . . . 66
8.3.3.3 Nm_GetPduData . . . . . . . . . . . . . . . . . . . . 67
8.3.3.4 Nm_RepeatMessageRequest . . . . . . . . . . . . . 67
8.3.3.5 Nm_GetNodeIdentifier . . . . . . . . . . . . . . . . . 68
8.3.3.6 Nm_GetLocalNodeIdentifier . . . . . . . . . . . . . . 69
8.3.3.7 Nm_CheckRemoteSleepIndication . . . . . . . . . . 70
8.3.3.8 Nm_GetState . . . . . . . . . . . . . . . . . . . . . . 71
8.3.3.9 Nm_GetVersionInfo . . . . . . . . . . . . . . . . . . . 71
8.4 Call-back notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
8.4.1 Standard Call-back notifications . . . . . . . . . . . . . . . . 72
8.4.1.1 Nm_NetworkStartIndication . . . . . . . . . . . . . . 72
8.4.1.2 Nm_NetworkMode . . . . . . . . . . . . . . . . . . . 73
8.4.1.3 Nm_BusSleepMode . . . . . . . . . . . . . . . . . . 73
8.4.1.4 Nm_PrepareBusSleepMode . . . . . . . . . . . . . . 74
8.4.1.5 NM_SynchronizeMode . . . . . . . . . . . . . . . . . 75

6 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

8.4.1.6 Nm_RemoteSleepIndication . . . . . . . . . . . . . . 75
8.4.1.7 Nm_RemoteSleepCancellation . . . . . . . . . . . . 76
8.4.1.8 Nm_SynchronizationPoint . . . . . . . . . . . . . . . 76
8.4.1.9 Nm_CoordReadyToSleepIndication . . . . . . . . . . 77
8.4.1.10 Nm_CoordReadyToSleepCancellation . . . . . . . . 78
8.4.2 Extra Call-back notifications . . . . . . . . . . . . . . . . . . 78
8.4.2.1 Nm_PduRxIndication . . . . . . . . . . . . . . . . . . 78
8.4.2.2 Nm_StateChangeNotification . . . . . . . . . . . . . 79
8.4.2.3 Nm_RepeatMessageIndication . . . . . . . . . . . . 80
8.4.2.4 Nm_TxTimeoutException . . . . . . . . . . . . . . . 80
8.4.2.5 Nm_CarWakeUpIndication . . . . . . . . . . . . . . . 81
8.5 Scheduled functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
8.5.1 Nm_MainFunction . . . . . . . . . . . . . . . . . . . . . . . . 82
8.6 Expected interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
8.6.1 Mandatory Interfaces . . . . . . . . . . . . . . . . . . . . . . 82
8.6.2 Optional Interfaces . . . . . . . . . . . . . . . . . . . . . . . . 83
8.6.3 Configurable Interfaces . . . . . . . . . . . . . . . . . . . . . 84
8.6.3.1 NmCarWakeUpCallout . . . . . . . . . . . . . . . . . 84
8.7 Version Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
9 Sequence diagrams 86
9.1 Basic functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
9.2 Seq of NM Coordinator functionality . . . . . . . . . . . . . . . . . . . . 86
10 Configuration specification 88
10.1 How to read this chapter . . . . . . . . . . . . . . . . . . . . . . . . . . 88
10.2 Configuration parameters . . . . . . . . . . . . . . . . . . . . . . . . . 88
10.2.1 Nm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
10.3 Global configurable parameters . . . . . . . . . . . . . . . . . . . . . . 89
10.3.1 NmGlobalConfig . . . . . . . . . . . . . . . . . . . . . . . . . 89
10.3.2 NmGlobalConstants . . . . . . . . . . . . . . . . . . . . . . . 90
10.3.3 NmGlobalProperties . . . . . . . . . . . . . . . . . . . . . . . 91
10.3.4 NmGlobalFeatures . . . . . . . . . . . . . . . . . . . . . . . . 92
10.4 Channel configurable parameters . . . . . . . . . . . . . . . . . . . . . 97
10.4.1 NmChannelConfig . . . . . . . . . . . . . . . . . . . . . . . . 97
10.4.2 NmBusType . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
10.4.3 NmGenericBusNmConfig . . . . . . . . . . . . . . . . . . . . 103
10.4.4 NmStandardBusNmConfig . . . . . . . . . . . . . . . . . . . 104
10.5 Published Information . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
A Not applicable requirements 105

7 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

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.

9 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

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.

10 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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.
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.

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.

11 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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.

Figure 5.1: Nm’s interfaces to other modules

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:

12 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

• 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.4 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.

5.2 File structure

5.2.1 Code file structure

[SWS_Nm_00247] d The code file structure shall not be defined within this specifica-
tion completely. At this point it shall be pointed out that the code-file structure shall
include the following files named:

13 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

c(SRS_BSW_00159, SRS_BSW_00345, SRS_BSW_00419)

5.2.2 Header file structure

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


module:
• StandardTypes.h (for AUTOSAR standard types )
Note: PlatformTypes.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] d The 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)

14 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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]

15 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

16 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

17 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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_00233]
Software Modules
shall check passed
API parameters for
validity
[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
[SRS_BSW_00334] All Basic Software [SWS_Nm_00999]
Modules shall provide
an XML file that
contains the meta
data

18 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Requirement Description Satisfied by


[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

19 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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
[SRS_BSW_00369] All AUTOSAR Basic [SWS_Nm_00233]
Software Modules
shall not return
specific development
error codes via the
API

20 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Requirement Description Satisfied by


[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
[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

21 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Requirement Description Satisfied by


[SRS_BSW_00386] The BSW shall specify [SWS_Nm_00232] [SWS_Nm_00233]
the configuration for
detecting an error
[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
[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

22 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Requirement Description Satisfied by


[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
[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

23 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Requirement Description Satisfied by


[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]
[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

24 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Requirement Description Satisfied by


[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
[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

25 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Requirement Description Satisfied by


[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
[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.

26 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Requirement Description Satisfied by


[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_00999]
concurrently execute a
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
[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

27 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Requirement Description Satisfied by


[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
[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

28 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Requirement Description Satisfied by


[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]
[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
[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.

29 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Requirement Description Satisfied by


[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]
[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

30 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Requirement Description Satisfied by


[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
[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

31 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Requirement Description Satisfied by


[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
[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

32 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Requirement Description Satisfied by


[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
[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]

33 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Requirement Description Satisfied by


[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]

34 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

7 Functional specification
The NM Interface functionality consists of two 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.

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] d The 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] d The 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] d The 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.
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.

35 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Note: Consider that certain bus types have different nomenclature on the terms Net-
work, Channel, Cluster.
[SWS_Nm_00292] d If the NM Coordinator functionality is configured, the configuration
parameter NmCycletimeMainFunction shall be configured with the cycle time of the
rate at which two successive calls to the Nm’s main function (see [SWS_Nm_00118])
are made. 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] d The 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] d The NM-Coordinator shall support two or more NM-
Coordinators connected to the same NM Cluster. c(SRS_Nm_02535)
[SWS_Nm_00051] d The NM Coordinator shall be able to coordinate busses run-
ning the official AUTOSAR bus specific NMs as well as all other generic bus NMs im-
plementing the required functionality, callbacks and interfaces as specified in subsec-
tion 7.4.2. c(SRS_Nm_00044, SRS_Nm_02515)
Note: Coordinator Support for J1939Nm is not needed as the J1939Nm does not
support shutdown handling.
[SWS_Nm_00055] d The 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] d It shall be possible to configure multiple NM coordination clusters
that shall be coordinated independently. c(SRS_Nm_00045)
[SWS_Nm_00168] d Each 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] d Shutdown 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)
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-

36 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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] d As 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] d As 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_RemoteSleepCancellation. 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_NetworkRequest.
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] d If 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)
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

37 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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] d When 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] d If the configuration parameter NmSynchronizingNetwork is
TRUE for any of the busses in a coordination cluster, the coordination shutdown shall be
delayed until a network that is configured as synchronizing network for this coordination
cluster invoked Nm_SynchronizationPoint. c(SRS_Nm_00044)

38 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

[SWS_Nm_00293] d If 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 shutdown process AND if there is no internal network mode request for that chan-
nel 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 con-
figuration 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] d If 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] d If 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] d When 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] d If 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 subsec-
tion 7.2.5 or with following formulas:
CanNm: Ready Sleep Time + Prepare BusSleep Time
FrNm: Ready Sleep Time, e.g.: (FrNmReadySleepCnt+1) * FrNmRepetitionCycle *
”Duration of one Flexray Cycle“
GenericNm: NmGenericBusNmShutdownTime

39 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

[SWS_Nm_00176] d When 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>_NetworkRelease. 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] d Nm shall keep track of all networks that have been released
but have not yet reported ”bus-sleep mode“. If the shutdown is aborted, these net-
works shall still be considered active networks. (See Section subsection 7.3.3). c
(SRS_Nm_02516)
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.

40 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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] d The functionality of coordinating nested sub busses shall
be available 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].

41 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

[SWS_Nm_00257] d On 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] d The 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] d If 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] d If 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.

42 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Note: On its actively coordinated channel(s) a NM


Coordinator a call of Nm_CoordReadyToSleepIndication and
Nm_CoordReadyToSleepCancellationis not expected.
[SWS_Nm_00262] d The 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] d NmGlobalCoordinatorTime 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] d NM 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 rea-
son. c(SRS_Nm_02535, SRS_Nm_02537)
Note: Details about aborted shutdown can be found in subsection 7.3.3.

43 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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 synchronization parameter NmSynchronizingNetwork shall be set to FALSE
for all networks and no bus specific NM shall be configured to invoke the
Nm_SynchronizationPoint callback.
To achieve the fastest possible shutdown, the shutdown timer parameter NmGlobal-
CoordinatorTime needs to be set to 0.0.

44 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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 NmSynchronizingNet-
work 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

45 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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.

46 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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 Nm-
GlobalCoordinatorTime 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

47 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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 for-


ward wakeup indications from the networks (indicated by the bus spe-
cific NMs calling the callback Nm_NetworkStartIndication) to the ComM
by calling ComM_Nm_NetworkStartIndication(). ComM will then call
Nm_PassiveStartUp, which will be forwarded by Nm to the corresponding interface
of the bus specific NM.
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] d If the ComM calls Nm_PassiveStartUp() for a network
that is part of a coordinated cluster of networks, the Nm coordinator functional-
ity 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>_NetworkRequest 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

48 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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_CoordReadyToSleepCancellation.
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] d The 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] d If 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] d If 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)

49 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

[SWS_Nm_00185] d If 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] d If 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] d If a coordinated shutdown has been initiated and Nm re-
ceives E_NOT_OK on a <BusNm>_NetworkRelease, the shutdown shall be im-
mediately 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 net-
works 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 Prerequisites of bus specific Network Management modules


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

50 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

7.4.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 correspond-
ing functions <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_BusSleepMode 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]

51 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

• 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.4.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]

52 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

• 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_BusSleepMode and Nm_PrepareBusSleepMode are used by the coor-
dination algorithm 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_RemoteSleepCancellation 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.

53 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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_RemoteSleepIndication has been notified and continue until ei-
ther 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.4.3 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.

7.5 NM_BUSNM_LOCALNM
[SWS_Nm_00483] d If 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()

54 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

7.6 Additional Functionality

7.6.1 Nm_CarWakeUpIndication

[SWS_Nm_00252] d If 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] d If the <bus>Nm calls Nm_CarWakeUpIndication and Nm-
CarWakeUpCallout is not defined, the NM Interface shall call the func-
tion 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.6.2 Nm_StateChangeNotification

[SWS_Nm_00249] d When NmStateReportEnabled is set to TRUE,


Nm_StateChangeNotification shall call Com_SendSignal(uint8,
Com_SignalIdType, const void*) with NmStateReportSignalRef as
Com_SignalIdType. NmStateReportSignalRef points to a 6 bit signal, called
Network Management State (NMS). The NMS needs to be configuered in Com. The
NMS shall be set to the value according to Table 7.1
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

55 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

7.7 Error classification

7.7.1 Development Errors

[SWS_Nm_00232] d The Nm shall be able to detect the following errors and excep-
tions depending on its configuration according to Table 7.2. c(SRS_BSW_00327,
SRS_BSW_00337, SRS_BSW_00385, SRS_BSW_00386)

Type of error Relevance Related error code Value


[hex]
API service used without Nm interface Development NM_E_UNINIT 0x00
initialization
API Service called with wrong parameter Development NM_E_INVALID_CHANNEL 0x01
but not with NULL-pointer
API service called with a NULL pointer Development NM_E_PARAM_POINTER 0x02

Table 7.2: Supported Development Errors

7.7.2 Runtime Errors

This module does not specify any runtime errors.

7.7.3 Transient Faults

This module does not specify any transient faults.

7.7.4 Production Errors

This module does not specify any production errors.

7.7.5 Extended Production Errors

This module does not specify any extended production errors.

7.8 Error detection


For details refer to the chapter 7.3 “Error Detection” in [2, SWS_BSWGeneral].

56 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

7.9 Error notification


[SWS_Nm_00233] d If the pre-processor switch NmDevErrorDetect is set to TRUE,
all function calls containing a NetworkHandleType parameter shall raise the error
NM_E_INVALID_CHANNEL if the network parameter is not a configured network han-
dle. c(SRS_BSW_00323, SRS_BSW_00369, SRS_BSW_00386)
Note: The handling of NULL-pointers is specified within [2, SWS_BSW General], see
SWS_BSW_00212.

57 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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 ComStackTypes.h NetworkHandleType
Std_Types StandardTypes.h Std_ReturnType
StandardTypes.h Std_VersionInfoType

Table 8.1: Nm_ImportedTypes

c(SRS_BSW_00301)

8.2 Type definitions

8.2.1 Nm_ModeType

[SWS_Nm_00274] d

Name: Nm_ModeType
Type: Enumeration
Range: NM_MODE_BUS_SLEEP – Bus-Sleep Mode
NM_MODE_PREPARE_BUS_SLEEP – Prepare-Bus Sleep Mode
NM_MODE_SYNCHRONIZE – Synchronize Mode
NM_MODE_NETWORK – Network Mode
Description: Operational modes of the network management.
Available NmStack_types.h
via:

Table 8.2: Nm_ModeType

c(SRS_Nm_00044)

8.2.2 Nm_StateType

[SWS_Nm_00275] d

Name: Nm_StateType
Type: Enumeration
Range: NM_STATE_UNINIT 0x00 Uninitialized State
NM_STATE_BUS_SLEEP 0x01 Bus-Sleep State

58 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

NM_STATE_PREPARE_BUS_SLEEP 0x02 Prepare-Bus State


NM_STATE_READY_SLEEP 0x03 Ready Sleep State
NM_STATE_NORMAL_OPERATION 0x04 Normal Operation State
NM_STATE_REPEAT_MESSAGE 0x05 Repeat Message State
NM_STATE_SYNCHRONIZE 0x06 Synchronize State
NM_STATE_OFFLINE 0x07 Offline State
Description: States of the network management state machine.
Available NmStack_types.h
via:

Table 8.3: Nm_StateType

c(SRS_Nm_00050)

8.2.3 Nm_BusNmType

[SWS_Nm_00276] d

Name: Nm_BusNmType
Type: 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 NmStack_types.h
via:

Table 8.4: Nm_BusNmType

c(SRS_Nm_00044, SRS_Nm_00154, SRS_Nm_02515)

8.2.4 Nm_ConfigType

[SWS_Nm_00282] d

Name: Nm_ConfigType
Type: Structure
Range: implementation –
specific
Description: Configuration data structure of the Nm module.
Available Nm.h
via:

59 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Table 8.5: Nm_ConfigType

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

Table 8.6: Nm_Init

c(SRS_BSW_00101, SRS_BSW_00344, SRS_BSW_00358, SRS_BSW_00405,


SRS_BSW_00414)
[SWS_Nm_00127] d Caveats of Nm_Init: This service function has to be
called after the initialization of the respective bus interface. c(SRS_BSW_00101,
SRS_BSW_00416)
[SWS_Nm_00283] d The 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.

8.3.1.2 Nm_PassiveStartUp

[SWS_Nm_00031] d

60 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

Table 8.7: Nm_PassiveStartUp

c(SRS_Nm_00046, SRS_Nm_00051, SRS_Nm_00151, SRS_Nm_02513,


SRS_Nm_02536)
[SWS_Nm_00128] d Caveats of Nm_PassiveStartUp: The <BusNm> and the Nm
itself are initialized correctly. c(SRS_BSW_00101, SRS_BSW_00416)

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
Parameters (in): NetworkHandle Identification of the NM-channel
Parameters (inout): None
Parameters (out): None

61 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

Table 8.8: Nm_NetworkRequest

c(SRS_Nm_00046, SRS_Nm_00047, SRS_Nm_00051, SRS_Nm_02513)


[SWS_Nm_00129] d Caveats of Nm_NetworkRequest: The <BusNm> and the Nm
itself are initialized correctly. c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00130] d If 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)

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)
Description: This function calls the <BusNm>_NetworkRelease bus specific func-
tion 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

62 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Table 8.9: Nm_NetworkRelease

c(SRS_Nm_00048, SRS_Nm_00051)
[SWS_Nm_00131] d Caveats of Nm_NetworkRelease: The <BusNm> and the Nm
itself are initialized correctly. c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00132] d If 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)

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 ses-
sion 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
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)

63 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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_DisableCommunication function is called if channel is config-
ured as CAN).
Available via: Nm.h

Table 8.10: Nm_DisableCommunication

c(SRS_Nm_02513, SRS_Nm_02512)
[SWS_Nm_00133] d Caveats of Nm_DisableCommunication: The <BusNm> and
the Nm itself are initialized correctly. c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00134] d Configuration of Nm_DisableCommunication: This function is
only available if NmComControlEnabled is set to TRUE. c(SRS_Nm_00150)
[SWS_Nm_00286] d If 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)

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
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_EnableCommunication function is called if channel is configured
as CAN).
Available via: Nm.h

Table 8.11: Nm_EnableCommunication

64 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

c(SRS_Nm_00047, SRS_Nm_02512)
[SWS_Nm_00135] d Caveats of Nm_EnableCommunication: The <BusNm> and
the Nm itself are initialized correctly. c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00136] d Configuration of Nm_EnableCommunication: This function is
only available if NmComControlEnabled is set to TRUE. c(SRS_Nm_00150)
[SWS_Nm_00287] d If 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)

8.3.3 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.3.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
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>_SetUserData shall be called in
case NmBusType is not set to NM_BUSNM_LOCALNM. (e.g.
CanNm_SetUserData function is called if channel is configured as
CAN).
Available via: Nm.h

Table 8.12: Nm_SetUserData

65 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

c(SRS_Nm_02503)
[SWS_Nm_00137] d Caveats of Nm_SetUserData: The <BusNm> and the Nm itself
are initialized correctly. c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00138] d Configuration of Nm_SetUserData: This function is only avail-
able if NmUserDataEnabled is set to TRUE. c(SRS_Nm_00150)
[SWS_Nm_00288] d If 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] d Configuration of Nm_SetUserData: If NmComUserDataSup-
port is TRUE the API Nm_SetUserData shall not be available. c(SRS_Nm_00150)

8.3.3.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
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

Table 8.13: Nm_GetUserData

c(SRS_Nm_02504)
[SWS_Nm_00139] d Caveats of Nm_GetUserData: The <BusNm> and the Nm itself
are initialized correctly. c(SRS_BSW_00101, SRS_BSW_00416)

66 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

[SWS_Nm_00140] d Configuration of Nm_GetUserData: This function is only avail-


able if NmUserDataEnabled is set to TRUE. c(SRS_Nm_00150)

8.3.3.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 <BusNm>_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

Table 8.14: Nm_GetPduData

c(SRS_Nm_02506)
[SWS_Nm_00141] d Caveats of Nm_GetPduData: The <BusNm> and the Nm itself
are initialized correctly. c(SRS_BSW_00101, SRS_BSW_00416)

8.3.3.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

67 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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 config-
ured as CAN). This will force all nodes on the bus to transmit NM mes-
sages so that they can be identified.
Available via: Nm.h

Table 8.15: Nm_RepeatMessageRequest

c(SRS_Nm_00153)
[SWS_Nm_00143] d Caveats of Nm_RepeatMessageRequest: The <BusNm> and
the Nm itself are initialized correctly. c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00289] d If 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)

8.3.3.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 success-
fully received NM-message shall be copied to

68 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

Table 8.16: Nm_GetNodeIdentifier

c(SRS_Nm_02505)
[SWS_Nm_00145] d Caveats of Nm_GetNodeIdentifier: The <BusNm> and the
Nm itself are initialized correctly. c(SRS_BSW_00101, SRS_BSW_00416)

8.3.3.6 Nm_GetLocalNodeIdentifier

[SWS_Nm_00040] d

Service name: Nm_GetLocalNodeIdentifier


Syntax: Std_ReturnType Nm_GetLocalNodeIdentifier(
NetworkHandleType NetworkHandle,
uint8* nmNodeIdPtr
)
Service ID[hex]: 0x0b
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>_GetLocalNodeIdentifier shall be called
in case NmBusType is not set to NM_BUSNM_LOCALNM. (e.g.
CanNm_GetLocalNodeIdentifier function is called if channel is config-
ured as CAN).
Available via: Nm.h

69 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Table 8.17: Nm_GetLocalNodeIdentifier

c(SRS_Nm_02508)
[SWS_Nm_00147] d Caveats of Nm_GetLoclaNodeIdentifier: The <BusNm>
and the Nm itself are initialized correctly. c(SRS_BSW_00101, SRS_BSW_00416)

8.3.3.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): nmRemoteSleepInd Pointer where check result of remote sleep indica-
Ptr tion 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)
Description: Check if remote sleep indication takes place or not.
For that purpose <BusNm>_CheckRemoteSleepIndication 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

Table 8.18: Nm_CheckRemoteSleepIndication

c(SRS_Nm_02513)
[SWS_Nm_00149] d Caveats of Nm_CheckRemoteSleepIndication: The
<BusNm> and the Nm itself are initialized correctly. c(SRS_BSW_00101,
SRS_BSW_00416)
[SWS_Nm_00290] d If Nm_CheckRemoteSleepIndication is called with a network
handle where NmPassiveModeEnabled is set to TRUE it shall not execute any func-

70 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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] d Configuration of Nm_CheckRemoteSleepIndication: This
function is only available if NmRemoteSleepIndEnabled is set to TRUE. c
(SRS_Nm_00150)

8.3.3.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 net-
work management shall be copied to
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

Table 8.19: Nm_GetState

c(SRS_Nm_00050)
[SWS_Nm_00151] d Caveats of Nm_GetState: The <BusNm> and the Nm itself are
initialized correctly. c(SRS_BSW_00101, SRS_BSW_00416)

8.3.3.9 Nm_GetVersionInfo

[SWS_Nm_00044] d

71 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

Table 8.20: Nm_GetVersionInfo

c(SRS_BSW_00003, SRS_BSW_00407, SRS_BSW_00482)

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.
[SWS_Nm_00028] d All 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

72 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Description: Notification that a NM-message has been received in the Bus-Sleep


Mode, what indicates that some nodes in the network have already en-
tered the Network Mode.
Available via: Nm.h

Table 8.21: Nm_NetworkStartIndication

c(SRS_BSW_00359, SRS_Nm_02513)
[SWS_Nm_00155] d The indication through callback function
Nm_NetworkStartIndication: 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
Parameters (inout): None
Parameters (out): None
Return value: None
Description: Notification that the network management has entered Network Mode.
Available via: Nm.h

Table 8.22: Nm_NetworkMode

c(SRS_BSW_00359, SRS_Nm_00051)
[SWS_Nm_00158] d The 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

73 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

Table 8.23: Nm_BusSleepMode

c(SRS_BSW_00359, SRS_Nm_00051)
[SWS_Nm_00163] d The 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

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

Table 8.24: Nm_PrepareBusSleepMode

c(SRS_BSW_00359, SRS_Nm_00051)
[SWS_Nm_00161] d The indication through callback function
Nm_PrepareBusSleepMode: shall be forwarded to ComM by calling
ComM_Nm_PrepareBusSleepMode. c(SRS_Nm_00051)

74 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

Table 8.25: Nm_SynchronizeMode

c()

8.4.1.6 Nm_RemoteSleepIndication

[SWS_Nm_00192] d

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

Table 8.26: Nm_RemoteSleepIndication

c(SRS_BSW_00359, SRS_Nm_00052)
[SWS_Nm_00277] d Configuration of Nm_RemoteSleepIndication: This function
is only available if NmRemoteSleepIndEnabled is set to TRUE. c(SRS_Nm_00150)

75 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

Table 8.27: Nm_RemoteSleepCancellation

c(SRS_BSW_00359, SRS_Nm_02509)
[SWS_Nm_00278] d Configuration of Nm_RemoteSleepCancellation: This
function 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_RemoteSleepCancellation 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

76 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

Table 8.28: Nm_SynchronizationPoint

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
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 Con-
trol Bit Vector is set
Available via: Nm.h

Table 8.29: Nm_CoordReadyToSleepIndication

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

77 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

Table 8.30: Nm_CoordReadyToSleepCancellation

c(SRS_BSW_00359, SRS_Nm_02535)
[SWS_Nm_00273] d Configuration of Nm_CoordReadyToSleepCancellation:
Optional
If NmCoordinatorSyncSupport is set to TRUE , the Nm shall provide the API
Nm_CoordReadyToSleepCancellation. c(SRS_Nm_00150)

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

78 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

Table 8.31: Nm_PduRxIndication

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] d Configuration 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

Table 8.32: Nm_StateChangeNotification

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 of the NM Coordinator.

79 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

[SWS_Nm_00165] d Configuration of Nm_StateChangeNotification: This


function is only available if NmStateChangeIndEnabled is set to TRUE. c
(SRS_Nm_00150)

8.4.2.3 Nm_RepeatMessageIndication

[SWS_Nm_00230] d

Service name: Nm_RepeatMessageIndication


Syntax: void Nm_RepeatMessageIndication(
NetworkHandleType nmNetworkHandle
)
Service ID[hex]: 0x1a
Sync/Async: Asynchronous
Reentrancy: Reentrant
Parameters (in): nmNetworkHandle Identification of the NM-channel
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.
Available via: Nm.h

Table 8.33: Nm_RepeatMessageIndication

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 of the NM Coordinator.

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

80 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Table 8.34: Nm_TxTimeoutException

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

Table 8.35: Nm_CarWakeUpIndication

c(SRS_BSW_00359, SRS_Nm_02503)
[SWS_Nm_00251] d Configuration of Nm_CarWakeUpIndication: Optional
If NmCarWakeUpRxEnabled is TRUE, The Nm shall provide the API
Nm_CarWakeUpIndication. 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] d A scheduled main function shall only contain logic related to the
NM Coordinator functionality. c(SRS_BSW_00373)

81 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

[SWS_Nm_00121] d In case the main function is called before the Nm has been
initialized, 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

Table 8.36: Nm_MainFunction

c(SRS_BSW_00424, SRS_BSW_00425)
[SWS_Nm_00279] d If 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 man-
agement has entered Bus-Sleep
Mode.
This callback function should per-
form a transition of the hardware
and transceiver to bus-sleep mode.
ComM_Nm_NetworkMode ComM_Nm.h Notification that the network man-
agement has entered Network
Mode.

82 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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_PrepareBusSleep ComM_Nm.h Notification that the network man-
Mode agement 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 nmNet-
workHandle of the channels which
have already indicated bus sleep
state.

Table 8.37: Nm Mandatory Interfaces

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.
Com_SendSignal Com.h The service Com_SendSignal up-
dates the signal object identified by
SignalId with the signal referenced
by the SignalDataPtr parameter.

83 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Det_ReportError Det.h Service to report development er-


rors.
FrNm_PassiveStartUp FrNm.h Initiates the Passive Startup of the
FlexRay NM.
J1939Nm_PassiveStartUp J1939Nm.h Passive startup of the NM. It trig-
gers 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.

Table 8.38: Nm Optional Interfaces

c(SRS_Nm_00150, SRS_Nm_02515)

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

Table 8.39: NmCarWakeUpCallout

84 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

c(SRS_Nm_02504)

8.7 Version Check


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

85 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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.

86 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

«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
cycle finished()
Nm_BusSleepMode(NetworkHandleType)

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

87 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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 sec-
tion 10.4 specifies the structure (containers) and the parameters of the Nm. The sec-
tion 10.5 specifies published information of the Nm.

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.

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.

88 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Figure 10.1: Nm configuration container overview

10.3 Global configurable parameters

10.3.1 NmGlobalConfig

SWS Item [ECUC_Nm_00196]


Container Name NmGlobalConfig
Description This container contains all global configuration parameters of the Nm
Interface.
Configuration Parameters

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

89 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Figure 10.2: NmGlobalConfig overview

10.3.2 NmGlobalConstants

SWS Item [ECUC_Nm_00198]


Container Name NmGlobalConstants
Description
Configuration Parameters

Name NmNumberOfChannels [ECUC_Nm_00201]


Parent Container NmGlobalConstants
Description Number of NM channels allowed within one ECU.
Multiplicity 1
Type EcucIntegerParamDef
Range 1 .. 255

90 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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
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 –
Scope / Dependency scope: local
dependency: If NmCoordinatorSupportEnabled is set to TRUE, then
the NmCycletimeMainFunction shall be configured.

91 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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
Description
Configuration Parameters

92 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

93 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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 –

94 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Scope / Dependency scope: local


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

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.

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

95 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

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

96 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

No Included Containers

10.4 Channel configurable parameters

10.4.1 NmChannelConfig

SWS Item [ECUC_Nm_00197]


Container Name NmChannelConfig
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).

97 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

98 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

99 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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 –
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

100 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

101 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

Figure 10.3: NmChannelConfig overview

10.4.2 NmBusType

SWS Item [ECUC_Nm_00218]


Container Name NmBusType
Description
Configuration Parameters

102 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

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

No Included Containers

103 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

10.4.4 NmStandardBusNmConfig

SWS Item [ECUC_Nm_00226]


Container Name NmStandardBusNmConfig
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].

104 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —
Specification of NetworkManagement Interface
AUTOSAR CP Release 4.4.0

A Not applicable requirements


[SWS_Nm_00999] Not applicable requirements d These requirements are not ap-
plicable 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)

105 of 105 Document ID 228: AUTOSAR_SWS_NetworkManagementInterface


— AUTOSAR CONFIDENTIAL —

You might also like