AUTOSAR SWS UDPNetworkManagement

Download as pdf or txt
Download as pdf or txt
You are on page 1of 103

Specification of UDP Network Management

AUTOSAR CP R20-11

Document Title Specification of UDP Network


Management
Document Owner AUTOSAR
Document Responsibility AUTOSAR
Document Identification No 414

Document Status published


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

Document Change History


Date Release Changed by Change Description
2020-11-30 R20-11 AUTOSAR  Updates for CONC 641 VSNM
Release  Updates for Light CONC 685
Management  Minor changes
2019-11-28 R19-11 AUTOSAR  Det error handling corrected
Release  Harmonization of API
Management  Minor corrections
 Changed Document Status from
Final to published
2018-10-31 4.4.0 AUTOSAR  Header file cleanup
Release  Minor corrections
Management
2017-12-08 4.3.1 AUTOSAR  Node Detection Configuration per
Release channel
Management  Det error handling corrected
 Bug fixes and editorial changes
2016-11-30 4.3.0 AUTOSAR  Added Trigger Transmit feature
Release  Car Wakeup support completed
Management  Immediate TX Transmission
corrected
 Editorial changes
2015-07-31 4.2.2 AUTOSAR  Revised Error Classification
Release  Added support for Car Wakeup
Management  Bug fixes and editorial changes
2014-10-31 4.2.1 AUTOSAR  Harmonization of API description
Release  Revised Partial Networking
Management Requirements
 Extended Production Errors
 Editorial Changes

1 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Document Change History


Date Release Changed by Change Description
2014-03-31 4.1.3 AUTOSAR  Minor bug fixes
Release  Editorial Changes
Management
2013-10-31 4.1.2 AUTOSAR  Revised Spontaneous Transmission
Release  Editorial changes
Management  Removed chapter(s) on change
documentation

2013-03-15 4.1.1 AUTOSAR  Added support for Partial


Administration Networking
 Added updated production errors
 Editorial changes
2011-12-22 4.0.3 AUTOSAR  Support coordinated shutdown
Administration  New traceability mechanism
2010-09-30 3.1.5 AUTOSAR  ComStack Harmonization
Administration  Harmonization of NM interfaces
2010-02-02 3.1.4 AUTOSAR  Initial Release
Administration

2 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Disclaimer

This work (specification and/or software implementation) and the material contained
in it, as released by AUTOSAR, is for the purpose of information only. AUTOSAR
and the companies that have contributed to it shall not be liable for any use of the
work.
The material contained in this work is protected by copyright and other types of
intellectual 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.

3 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Table of Contents

1 Introduction and Functional Overview ................................................................... 7


2 Acronyms and abbreviations.................................................................................. 8
3 Related documentation .......................................................................................... 9
3.1 Input documents............................................................................................... 9
3.2 Related standards and norms ........................................................................ 10
3.3 Related specification ...................................................................................... 10
4 Constraints and assumptions............................................................................... 11
4.1 Limitations ...................................................................................................... 11
4.2 Applicability to car domains ........................................................................... 11
5 Dependencies on other modules ......................................................................... 12
5.1 File Structure .................................................................................................. 12
5.1.1 Code File Structure ................................................................................. 12
6 Requirements traceability .................................................................................... 13
7 Functional specification ........................................................................................ 18
7.1 Coordination algorithm ................................................................................... 18
7.2 Operational Modes ......................................................................................... 19
7.2.1 Network Mode ......................................................................................... 19
7.2.2 Prepare Bus-Sleep Mode ........................................................................ 22
7.2.3 Bus-Sleep Mode ...................................................................................... 23
7.3 Network states ............................................................................................... 25
7.4 Initialization .................................................................................................... 25
7.5 Execution........................................................................................................ 26
7.5.1 Processor architecture ............................................................................ 26
7.5.2 Timing parameters .................................................................................. 26
7.6 Communication Scheduling ........................................................................... 27
7.6.1 NM Message Transmission..................................................................... 27
7.6.2 NM Message Reception .......................................................................... 29
7.7 Additional features ......................................................................................... 30
7.7.1 Detection of Remote Sleep Indication (optional) .................................... 30
7.7.2 User Data (optional) ................................................................................ 30
7.7.3 Passive Mode (optional) .......................................................................... 31
7.7.4 State change notification (optional)......................................................... 32
7.7.5 Communication Control (optional) .......................................................... 32
7.7.6 NM Coordinator synchronization support (optional) ............................... 33
7.8 Partial Networking .......................................................................................... 34
7.8.1 Rx Handling of NM PDUs........................................................................ 34
7.8.2 Tx Handling of NM PDUs ........................................................................ 35
7.8.3 NM PDU Filter Algorithm ......................................................................... 36
7.8.4 Aggregation of Internal and External Requested Partial Networks ........ 37
7.8.5 Aggregation of External Requested Partial Networks ............................ 39
7.8.6 Spontaneous Transmission of NM-PDUs via UdpNm_NetworkRequest41
7.9 Payload (PDU) Structure ............................................................................... 42
7.10 Functional requirements on UdpNm API .................................................... 44
4 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement
Specification of UDP Network Management
AUTOSAR CP R20-11

7.11 Car Wakeup ................................................................................................ 44


7.12 Error Classification...................................................................................... 45
7.12.1 Development Errors ............................................................................. 45
7.12.2 Run Time Errors ................................................................................... 46
7.12.3 Transient Faults ................................................................................... 46
7.12.4 Production Errors ................................................................................. 46
7.12.5 Extended Production Errors................................................................. 46
7.13 Scheduling of the main function ................................................................. 46
7.14 Application notes ........................................................................................ 47
7.14.1 Wakeup notification.............................................................................. 47
7.14.2 Coordination of coupled networks ....................................................... 47
7.15 Version check ............................................................................................. 47
7.16 Parameter check......................................................................................... 47
8 API specification ................................................................................................... 48
8.1 Imported Types .............................................................................................. 48
8.2 Type Definitions ............................................................................................. 49
8.2.1 UdpNm_ConfigType ................................................................................ 49
8.2.2 UdpNm_PduPositionType ....................................................................... 49
8.3 Function definitions ........................................................................................ 50
8.3.1 UdpNm_Init.............................................................................................. 50
8.3.2 UdpNm_PassiveStartUp ......................................................................... 51
8.3.3 UdpNm_NetworkRequest ....................................................................... 51
8.3.4 UdpNm_NetworkRelease ........................................................................ 52
8.3.5 UdpNm_DisableCommunication ............................................................. 53
8.3.6 UdpNm_EnableCommunication .............................................................. 53
8.3.7 UdpNm_SetUserData ............................................................................. 54
8.3.8 UdpNm_GetUserData ............................................................................. 55
8.3.9 UdpNm_GetNodeIdentifier ...................................................................... 56
8.3.10 UdpNm_GetLocalNodeIdentifier .......................................................... 56
8.3.11 UdpNm_RepeatMessageRequest ....................................................... 57
8.3.12 UdpNm_GetPduData ........................................................................... 58
8.3.13 UdpNm_GetState ................................................................................. 59
8.3.14 UdpNm_GetVersionInfo ....................................................................... 59
8.3.15 UdpNm_RequestBusSynchronization ................................................. 60
8.3.16 UdpNm_CheckRemoteSleepIndication ............................................... 61
8.3.17 UdpNm_SetSleepReadyBit ................................................................. 62
8.3.18 UdpNm_Transmit ................................................................................. 62
8.3.19 UdpNm_PnLearningRequest ............................................................... 63
8.3.20 UdpNm_RequestSynchronizedPncShutdown ..................................... 64
8.4 Call-back notifications .................................................................................... 65
8.4.1 UdpNm_SoAdIfTxConfirmation ............................................................... 65
8.4.2 UdpNm_SoAdIfRxIndication ................................................................... 66
8.4.3 UdpNm_SoAdIfTriggerTransmit .............................................................. 66
8.5 Scheduled Functions ..................................................................................... 68
8.5.1 UdpNm_MainFunction_<Instance Id> .................................................... 68
8.6 Expected Interfaces ....................................................................................... 68
8.6.1 Mandatory Interfaces............................................................................... 68
8.6.2 Optional Interfaces .................................................................................. 70
8.6.3 Configurable interfaces ........................................................................... 71
5 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement
Specification of UDP Network Management
AUTOSAR CP R20-11

8.7 Service Interfaces .......................................................................................... 71


8.8 UML State chart diagram ............................................................................... 72
9 Sequence diagrams and Transition Tables ......................................................... 73
9.1 UdpNmTransmission ..................................................................................... 73
9.2 UdpNm Reception .......................................................................................... 73
10 Configuration specification ............................................................................... 75
10.1 How to read this chapter ............................................................................. 75
10.2 Containers and configuration parameters .................................................. 75
10.2.1 UdpNm ................................................................................................. 76
10.2.2 UdpNmGlobalConfig ............................................................................ 76
10.2.3 UdpNmChannelConfig ......................................................................... 83
10.2.4 UdpNmRxPdu ...................................................................................... 97
10.2.5 UdpNmTxPdu....................................................................................... 98
10.2.6 UdpNmUserDataTxPdu ....................................................................... 99
10.2.7 UdpNmPnInfo..................................................................................... 100
10.2.8 UdpNmPnFilterMaskByte .................................................................. 102
10.3 Published parameters ............................................................................... 102
11 Not applicable requirements .......................................................................... 103

6 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

1 Introduction and Functional Overview


This document describes the concept, core functionality, optional features, interfaces
and configuration issues of the AUTOSAR UDP Network Management (UdpNm).
UdpNm is intended to be an optional feature. It is intended to work together with a
TCP/IP Stack, independent of the physical layer of the communication system used.
The AUTOSAR UDP Network Management is a hardware independent protocol that
can be used on TCP/IP based systems (for limitations refer to chapter 4.1). Its main
purpose is to coordinate the transition between normal operation and bus-sleep
mode of the network.
In addition to the core functionality optional features are provided e.g. to implement a
service to detect all present nodes or to detect if all other nodes are ready to sleep.
The UDP Network Management (UdpNm) function provides an adaptation between
Network Management Interface (Nm) and a TCP/IP Stack (TCP/IP). For a general
understanding of the AUTOSAR Network Management functionality please refer to
[9].

Figure 1: Extended AUTOSAR Communication Stack.

7 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

2 Acronyms and abbreviations


Acronym or Description:
Abbreviation:
API Application Programming Interface
BSW Basic Software
CWU Car Wakeup
EthIf Ethernet Interface
DET Default Error Tracer
IP Internet Protocol
NM Network Management
PDU Protocol Data Unit
PNL Partial Network Learning
SDU Service Data Unit
TCP Transmission Control Protocol
TCP/IP A family of communication protocols used in computer networks
UDP User Datagram Protocol
PNI Partial Network Information
UdpNm UDP Network Management

Term: Description:
PDU This means that the NM message transmission has been disabled by the optional
transmission service UdpNm_DisableCommunication.
ability is
disabled
Repeat UdpNm_SoAdIfRxIndication finds the Repeat Message Bit set in the Control Bit
Message Vector of a received NM message.
Request Bit
Indication
NM PDU Refers to the payload transmitted in a packet. It contains the NM User Data as well
as the Control Bit Vector and the Source Node Identifier.
NM Packet Refers to an Ethernet Frame containing an IP as well as a UDP header in addition
to the data (PDU) transmitted by the NM in the payload section.
NM Message Most abstract term referring to any single information item transferred within the
methodology of the NM algorithm.
Bus-Off state Refers to a situation where no cable is connected to the Ethernet HW.
Top-level PNC The top-level PNC coordinator is an ECU that acts as PNC gateway in the network
coordinator and that handles at least one PNC as actively coordinated on all assigned
channels. If synchronized PNC shutdown is enabled, the top-level PNC coordinator
triggers for these PNCs the shutdown, if no other ECU in the network request
them.
Intermediate An intermediate PNC coordinator is an ECU that acts as PNC gateway in the
PNC network and that handles at least one PNC as passively coordinated on at least
coordinator one assigned channel. If synchronized PNC shutdown is enabled, it forwards
received shutdown requests for these PNCs to the corresponding actively
coordinated channels and starts their shutdown accordingly.
Subordinated A subordinated PNC node is an ECU that acts not as a PNC coordinator at all in
PNC node the network. It processes PN shutdown message as usual NM messages.
PN shutdown A top-level PNC coordinator transmit PN shutdown messages to indicate a
message synchronized PNC shutdown across the PN topology. A PN shutdown message is
as NM message which has PNSR bit in the control bit vector and all PNCs which
are indicated for a synchronized shutdown set to '1'.

8 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

3 Related documentation

3.1 Input documents


[1] Layered Software Architecture
AUTOSAR_EXP_LayeredSoftwareArchitecture.pdf

[2] General Requirements on Basic Software Modules


AUTOSAR_SRS_BSWGeneral.pdf

[3] Requirements on Network Management


AUTOSAR_SRS_NetworkManagement.pdf

[4] Specification of Ethernet Interface


AUTOSAR_SWS_EthernetInterface.pdf

[5] Specification of FlexRay Network Management


AUTOSAR_SWS_FlexRayNetworkManagement.pdf

[6] Specification of Communication Stack Types


AUTOSAR_SWS_CommunicationStackTypes.pdf

[7] Specification of ECU Configuration


AUTOSAR_TPS_ECUConfiguration.pdf

[8] Specification of BSW Scheduler


AUTOSAR_SWS_BSW_Scheduler.pdf

[9] Specification of Generic Network Management Interface


AUTOSAR_SWS_NetworkManagementInterface.pdf

[10] Specification of Communication Manager


AUTOSAR_SWS_ComManager.pdf

[11] Specification of ECU State Manager


AUTOSAR_SWS_ECUStateManager.pdf

[12] Specification of Operating System


AUTOSAR_SWS_OS.pdf

[13] Specification of Default Error Tracer


AUTOSAR_SWS_Default ErrorTracer.pdf

[14] Specification of Standard Types


AUTOSAR_SWS_StandardTypes.pdf

[15] Specification of Platform Types


AUTOSAR_SWS_PlatformTypes.pdf

9 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

[16] Specification of Compiler Abstraction


AUTOSAR_SWS_CompilerAbstraction.pdf

[17] Basic Software Module Description Template


AUTOSAR_TPS_BSWModuleDescriptionTemplate.pdf

[18] Specification of Socket Adaptor


AUTOSAR_SWS_SocketAdaptor.pdf

[19] Requirements on Ethernet


AUTOSAR_SRS_Ethernet.pdf

[20] List of Basic Software Modules


AUTOSAR_TR_BSWModuleList

[21] General Specification of Basic Software Modules


AUTOSAR_SWS_BSWGeneral.pdf

[22] Specification of the AUTOSAR Network Management Protocol


AUTOSAR_PRS_NetworkManagementProtocol.pdf

3.2 Related standards and norms


[23] IEEE
http://www.opengroup.org/onlinepubs/000095399/
[24] ISO 14229 Road Vehicles – Unified Diagnostic Services (UDS)

3.3 Related specification

AUTOSAR provides a General Specification on Basic Software modules [21] (SWS


BSW General), which is also valid for UDP Network Management.

Thus, the specification SWS BSW General shall be considered as additional and
required specification for UDP Network Management.

10 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

4 Constraints and assumptions

4.1 Limitations
1. One instance of UdpNm is associated with only one NM-Cluster in one
network. One NM-Cluster can have only one instance of UdpNm in one node.
2. One instance of UdpNm is associated with only one network within the same
ECU.
3. UdpNm is only applicable for TCP/IP based systems.
Figure 2 presents an AUTOSAR NM stack within an example ECU belonging to two
UDP NM-clusters.

id AUTOSAR NM Stack over UDP

:Nm

:UdpNm :UdpNm

:SoAd

Figure 2: AUTOSAR NM stack within an example ECU belonging to two UDP


NM-clusters

[SWS_UdpNm_00131]⌈ The AUTOSAR UdpNm algorithm shall support up to 250


nodes per NM-Cluster by default.
Note: The AUTOSAR UdpNm algorithm can support an arbitrary number of nodes
per NM-cluster (even more than default 250 nodes per cluster, if necessary) – it is
only a matter of configuration, since the upper limit is not fixed and depends on the
trade off between response time, fault-tolerance and resulted bus load configured for
the AUTOSAR UdpNm coordination algorithm. This might depend on the physical
layer used. ⌋()

4.2 Applicability to car domains


N/A

11 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

5 Dependencies on other modules


UDP Network Management (UdpNm) uses services of the TCP/IP Stack and
provides services to the Generic Network Management Interface (Nm).
id UdpNm

Nm

Nm_*
UdpNm_*

UdpNm Det_ReportError
DET

UdpNM_*
SoAd_*

SoAd

Figure 3: Dependencies on other modules.

5.1 File Structure

5.1.1 Code File Structure

[SWS_UdpNm_00081]⌈ The code file structure shall not be fully defined within this
specification. However, the code file structure shall include the following files:
UdpNm_Lcfg.c (for link time configurable parameters)
UdpNm_PBcfg.c (for post build time configurable parameters)
These files shall contain all link time post build time configurable parameters.
⌋(SRS_BSW_00419, SRS_BSW_00346, SRS_BSW_00158, SRS_BSW_00308)

12 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

6 Requirements traceability

Requirement Description Satisfied by


RS_Nm_00153 The Network Management shall SWS_UdpNm_00468
optionally provide a possibility to
detect present nodes
SRS_BSW_00005 Modules of the µC Abstraction SWS_UdpNm_NA_00999
Layer (MCAL) may not have
hard coded horizontal interfaces
SRS_BSW_00006 The source code of software SWS_UdpNm_NA_00999
modules above the µC
Abstraction Layer (MCAL) shall
not be processor and compiler
dependent.
SRS_BSW_00010 The memory consumption of all SWS_UdpNm_NA_00999
Basic SW Modules shall be
documented for a defined
configuration for all supported
platforms.
SRS_BSW_00158 - SWS_UdpNm_00081
SRS_BSW_00160 Configuration files of AUTOSAR SWS_UdpNm_NA_00999
Basic SW module shall be
readable for human beings
SRS_BSW_00161 The AUTOSAR Basic Software SWS_UdpNm_NA_00999
shall provide a microcontroller
abstraction layer which provides
a standardized interface to
higher software layers
SRS_BSW_00162 The AUTOSAR Basic Software SWS_UdpNm_NA_00999
shall provide a hardware
abstraction layer
SRS_BSW_00164 The Implementation of interrupt SWS_UdpNm_NA_00999
service routines shall be done by
the Operating System, complex
drivers or modules
SRS_BSW_00168 SW components shall be tested SWS_UdpNm_NA_00999
by a function defined in a
common API in the Basis-SW
SRS_BSW_00170 The AUTOSAR SW SWS_UdpNm_NA_00999
Components shall provide
information about their
dependency from faults, signal
qualities, driver demands
SRS_BSW_00172 The scheduling strategy that is SWS_UdpNm_NA_00999
built inside the Basic Software
Modules shall be compatible
with the strategy used in the
system
SRS_BSW_00305 Data types naming convention SWS_UdpNm_NA_00999
SRS_BSW_00306 AUTOSAR Basic Software SWS_UdpNm_NA_00999
Modules shall be compiler and
13 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement
Specification of UDP Network Management
AUTOSAR CP R20-11

platform independent
SRS_BSW_00307 Global variables naming SWS_UdpNm_NA_00999
convention
SRS_BSW_00308 AUTOSAR Basic Software SWS_UdpNm_00081
Modules shall not define global
data in their header files, but in
the C file
SRS_BSW_00309 All AUTOSAR Basic Software SWS_UdpNm_NA_00999
Modules shall indicate all global
data with read-only purposes by
explicitly assigning the const
keyword
SRS_BSW_00312 Shared code shall be reentrant SWS_UdpNm_NA_00999
SRS_BSW_00314 All internal driver modules shall SWS_UdpNm_NA_00999
separate the interrupt frame
definition from the service
routine
SRS_BSW_00321 The version numbers of SWS_UdpNm_NA_00999
AUTOSAR Basic Software
Modules shall be enumerated
according specific rules
SRS_BSW_00325 The runtime of interrupt service SWS_UdpNm_NA_00999
routines and functions that are
running in interrupt context shall
be kept short
SRS_BSW_00328 All AUTOSAR Basic Software SWS_UdpNm_NA_00999
Modules shall avoid the
duplication of code
SRS_BSW_00330 It shall be allowed to use macros SWS_UdpNm_NA_00999
instead of functions where
source code is used and runtime
is critical
SRS_BSW_00331 All Basic Software Modules shall SWS_UdpNm_NA_00999
strictly separate error and status
information
SRS_BSW_00333 For each callback function it SWS_UdpNm_NA_00999
shall be specified if it is called
from interrupt context or not
SRS_BSW_00334 All Basic Software Modules shall SWS_UdpNm_NA_00999
provide an XML file that contains
the meta data
SRS_BSW_00335 Status values naming SWS_UdpNm_NA_00999
convention
SRS_BSW_00336 Basic SW module shall be able SWS_UdpNm_NA_00999
to shutdown
SRS_BSW_00341 Module documentation shall SWS_UdpNm_NA_00999
contains all needed informations
SRS_BSW_00346 All AUTOSAR Basic Software SWS_UdpNm_00081
Modules shall provide at least a
basic set of module files
SRS_BSW_00347 A Naming seperation of different SWS_UdpNm_NA_00999
14 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement
Specification of UDP Network Management
AUTOSAR CP R20-11

instances of BSW drivers shall


be in place
SRS_BSW_00375 Basic Software Modules shall SWS_UdpNm_NA_00999
report wake-up reasons
SRS_BSW_00377 A Basic Software Module can SWS_UdpNm_NA_00999
return a module specific types
SRS_BSW_00410 Compiler switches shall have SWS_UdpNm_NA_00999
defined values
SRS_BSW_00413 An index-based accessing of the SWS_UdpNm_NA_00999
instances of BSW modules shall
be done
SRS_BSW_00415 Interfaces which are provided SWS_UdpNm_NA_00999
exclusively for one module shall
be separated into a dedicated
header file
SRS_BSW_00416 The sequence of modules to be SWS_UdpNm_NA_00999
initialized shall be configurable
SRS_BSW_00417 Software which is not part of the SWS_UdpNm_NA_00999
SW-C shall report error events
only after the DEM is fully
operational.
SRS_BSW_00419 If a pre-compile time SWS_UdpNm_00081
configuration parameter is
implemented as "const" it should
be placed into a separate c-file
SRS_BSW_00423 BSW modules with AUTOSAR SWS_UdpNm_NA_00999
interfaces shall be describable
with the means of the SW-C
Template
SRS_BSW_00424 BSW module main processing SWS_UdpNm_NA_00999
functions shall not be allowed to
enter a wait state
SRS_BSW_00425 The BSW module description SWS_UdpNm_NA_00999
template shall provide means to
model the defined trigger
conditions of schedulable
objects
SRS_BSW_00426 BSW Modules shall ensure data SWS_UdpNm_NA_00999
consistency of data which is
shared between BSW modules
SRS_BSW_00427 ISR functions shall be defined SWS_UdpNm_NA_00999
and documented in the BSW
module description template
SRS_BSW_00429 Access to OS is restricted SWS_UdpNm_NA_00999
SRS_BSW_00432 Modules should have separate SWS_UdpNm_NA_00999
main processing functions for
read/receive and write/transmit
data path
SRS_Nm_00046 It shall be possible to trigger the SWS_UdpNm_NA_00999
startup of all Nodes at any Point
in Time.

15 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

SRS_Nm_00050 The NM shall provide the current SWS_UdpNm_NA_00999


state of NM
SRS_Nm_00052 The NM interface shall signal to SWS_UdpNm_NA_00999
the application that all other
ECUs are ready to sleep.
SRS_Nm_00054 There shall be a deterministic SWS_UdpNm_NA_00999
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 communication SWS_UdpNm_00379, SWS_UdpNm_00466,
system error handling for errors SWS_UdpNm_00467
that have impact on the NM
behavior.
SRS_Nm_00142 NM shall guarantee an upper SWS_UdpNm_NA_00999
limit for the bus load generated
by NM itself.
SRS_Nm_00144 NM shall support communication SWS_UdpNm_NA_00999
clusters of up to 64 ECUs
SRS_Nm_00147 The NM algorithm shall be SWS_UdpNm_NA_00999
processor independent.
SRS_Nm_00151 The Network Management SWS_UdpNm_NA_00999
algorithm shall allow any node to
integrate into an already running
NM cluster
SRS_Nm_00153 The Network Management shall SWS_UdpNm_00014, SWS_UdpNm_00111,
optionally provide a possibility to SWS_UdpNm_00112, SWS_UdpNm_00113,
detect present nodes SWS_UdpNm_00119, SWS_UdpNm_00120,
SWS_UdpNm_00121,
SWS_UdpNm_NA_00999
SRS_Nm_00154 The Network Management API SWS_UdpNm_NA_00999
shall be independent from the
communication bus
SRS_Nm_02503 The NM API shall optionally give SWS_UdpNm_00315, SWS_UdpNm_00317,
the possibility to send user data SWS_UdpNm_00377, SWS_UdpNm_00464,
SWS_UdpNm_00479
SRS_Nm_02509 The NM interface shall signal to SWS_UdpNm_NA_00999
the application that at least one
other ECUs is not ready to sleep
anymore.
SRS_Nm_02512 The NM shall give the possibility SWS_UdpNm_00178, SWS_UdpNm_00215,
to enable or disable the network SWS_UdpNm_00216
management related
communication configured for an
active NM node
SRS_Nm_02540 The NM Control Bit Vector shall SWS_UdpNm_00045, SWS_UdpNm_00475
contain a PN shutdown request
bit.
SRS_Nm_02541 The Nm of intermediate PNC SWS_UdpNm_00478
coordinators shall evaluate the
PN shutdown request bit of
received Nm frames.

16 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

SRS_Nm_02542 The NM of the top-level PNC SWS_UdpNm_00475


coordinator shall set the PN
shutdown request bit if a least
one PNC is released
SRS_Nm_02545 NM shall handle requests for SWS_UdpNm_00474, SWS_UdpNm_00475,
synchronized PNC shutdown SWS_UdpNm_00476, SWS_UdpNm_00477,
SWS_UdpNm_00480

17 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

7 Functional specification

7.1 Coordination algorithm


The AUTOSAR UdpNm is based on decentralized direct network management
strategy, which means that every network node performs activities self-sufficient
depending only on the UDP packets received and/or transmitted within the
communication system.

The AUTOSAR UdpNm coordination algorithm is based on periodic NM packets,


which are received by all nodes in the cluster via broadcast transmission. Reception
of NM packets indicates that sending nodes want to keep the NM-cluster awake. If
any node is ready to go to the Bus-Sleep Mode, it stops sending NM packets, but as
long as NM packets from other nodes are received, it postpones transition to the
Bus-Sleep Mode. Finally, if a dedicated timer elapses because no NM packets are
received anymore, every node initiates transition to the Bus-Sleep Mode.
If any node in the NM-cluster requires bus-communication, it can keep the NM-
cluster awake by transmitting NM packets. For more details concerning the wakeup
procedure itself, please refer to [10].

The main concept of the AUTOSAR UdpNm coordination algorithm can be defined
by the following two key-requirements:

[SWS_UdpNm_00087] ⌈ Every network node shall transmit periodic NM PDUs as


long as it requires bus-communication; otherwise it shall not transmit NM PDUs. ⌋()

[SWS_UdpNm_00088] ⌈If UdpNmStayInPbsEnabled is disabled and bus


communication in a UdpNm cluster is released and there are no Network
Management PDUs on the bus for a configurable amount of time determined by
UdpNmTimeoutTime + UdpNmWaitBusSleepTime (both configuration parameters)
transition into the Bus-Sleep Mode shall be performed. ⌋()

The overall state machine of the AUTOSAR UdpNm coordination algorithm can be
defined as follows:

[SWS_UdpNm_00089] ⌈ The AUTOSAR UdpNm state machine shall contain states,


transitions and triggers required for the AUTOSAR UdpNm coordination algorithm as
seen from the point of view of one single node in the NM cluster. ⌋()

Note: A UML state chart of the AUTOSAR UdpNm state machine from the point
of view of one single node in the NM cluster can be found in the API
specifications chapter 8

18 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

7.2 Operational Modes


This chapter describes the operational modes of the AUTOSAR UdpNm coordination
algorithm.
[SWS_UdpNm_00092] ⌈ The AUTOSAR UdpNm shall contain three operational
modes visible at the modules interface:
Network Mode
Prepare Bus-Sleep Mode
Bus-Sleep Mode ⌋()

[SWS_UdpNm_00093] ⌈ Changes of the AUTOSAR UdpNm operational modes shall


be signalled to the upper layer by means of call-back functions. ⌋()

7.2.1 Network Mode

[SWS_UdpNm_00094] ⌈ The Network Mode shall consist of three internal states:


Repeat Message State
Normal Operation State

Ready Sleep State ⌋()

[SWS_UdpNm_00095] ⌈ When the Network Mode is entered from Bus-Sleep Mode


or Prepare Bus-Sleep Mode, by default, the Repeat Message State shall be entered.
⌋()

[SWS_UdpNm_00096] ⌈ When the Network Mode is entered, the NM-Timeout Timer


shall be started. ⌋()

[SWS_UdpNm_00097] ⌈ When the Network Mode is entered, the UdpNm shall notify
the upper layer by calling Nm_NetworkMode. ⌋()

[SWS_UdpNm_00098] ⌈ Upon successful reception of an NM PDU (call of


UdpNm_SoAdIfRxIndication) in Network Mode, the NM-Timeout Timer shall be
restarted. ⌋()

[SWS_UdpNm_00099]⌈ Upon transmission of an NM PDU (call of


UdpNm_SoAdIfTxConfirmation with E_OK) in the Network Mode, the NM-
Timeout Timer shall be restarted. ⌋()

Note: As no transmission confirmation is available from the SoAd or the TCP/IP stack
it is assumed that each Network Management PDU transmission request results in a
successful Network Management PDU transmission.
19 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement
Specification of UDP Network Management
AUTOSAR CP R20-11

[SWS_UdpNm_00206] ⌈ The NM-Timeout Timer shall be reset every time it is started


or restarted. ⌋()
[SWS_UdpNm_00468] {DRAFT} ⌈ If function UdpNm_PnLearningRequest is called
on a channel where UdpNmDynamicPncToChannelMappingEnabled is set to
TRUE and UdpNm is in the Network Mode the UdpNm module shall set the Repeat
Message Bit and the Partial Network Learning Bit in the CBV to 1 on this channel and
change to or restart the Repeat Message State.⌋(RS_Nm_00153)

[SWS_UdpNm_00469] {DRAFT} ⌈ If the bits Partial Network Learning and Repeat


Message Request both are received with value 1 on a channel where
UdpNmDynamicPncToChannelMappingEnabled is set to TRUE and UdpNm is in
the Network Mode the UdpNm module shall set the Partial Network Learning Bit in
the CBV to 1 on this channel and change to or restart the Repeat Message State. ⌋()

7.2.1.1 Repeat Message State

For nodes that are not in passive mode (refer to chapter 7.7.3) the Repeat Message
State ensures, that any transition from Bus-Sleep or Prepare Bus-Sleep to the
Network Mode becomes visible for the other nodes on the network. Additionally it
ensures that any node stays active for a minimum amount of time
(UdpNmRepeatMessageTime). Optionally it can be used for detection of present
nodes.

[SWS_UdpNm_00100] ⌈ When the Repeat Message State is entered from Bus-Sleep


Mode, Prepare-Bus-Sleep Mode, Normal Operation State or Ready Sleep State
transmission of NM packets shall be (re-) started unless passive mode is enabled. ⌋()

[SWS_UdpNm_00101] ⌈ When the NM-Timeout Timer expires in the Repeat


Message State, the NM-Timeout Timer shall be restarted. ⌋()

[SWS_UdpNm_00102] ⌈ The NM shall stay in the Repeat Message State for a


configurable amount of time determined by the UdpNmRepeatMessageTime
(configuration parameter); after that time the Repeat Message State shall be left. ⌋()

[SWS_UdpNm_00103] ⌈ When Repeat Message State is left, the Normal Operation


State shall be entered, if the network has been requested (see
SWS_UdpNm_00104). ⌋()

[SWS_UdpNm_00106] ⌈ When Repeat Message State is left, the Ready Sleep State
shall be entered, if the network has been released (see SWS_UdpNm_00105). ⌋()

20 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

[SWS_UdpNm_00107] ⌈ If UdpNmNodeDetectionEnabled is set to TRUE UdpNm


shall clear the Repeat Message Bit when leaving Repeat Message State. ⌋()

[SWS_UdpNm_00470] {DRAFT}
⌈ If UdpNmDynamicPncToChannelMappingSupport is set to TRUE UdpNm shall
clear the Partial Network Learning Bit when leaving the Repeat Message State. ⌋()

7.2.1.2 Normal Operation State

The Normal Operation State ensures that any node can keep the NM-cluster awake
as long as the network functionality is required.

[SWS_UdpNm_00116] ⌈ When the Normal Operation State is entered from Ready


Sleep State, transmission of NM PDUs shall be started unless passive mode is
enabled or the NM message transmission ability has been disabled. ⌋()

[SWS_UdpNm_00117] ⌈ When the NM-Timeout Timer expires in the Normal


Operation State, the NM-Timeout Timer shall be restarted. ⌋()

[SWS_UdpNm_00118] ⌈ When the network is released and the current state is


Normal Operation State, the Normal Operation State shall be left and the Ready
Sleep state shall be entered (refer to SWS_UdpNm_00105). ⌋()

[SWS_UdpNm_00119] ⌈ If UdpNmNodeDetectionEnabled is set to TRUE and


Repeat Message Request bit is received in the Normal Operation State, UdpNm shall
enter Repeat Message State. ⌋(SRS_Nm_00153)

[SWS_UdpNm_00120] ⌈ If UdpNmNodeDetectionEnabled is set to TRUE and


function UdpNm_RepeatMessageRequest is called in the Normal Operation State,
UdpNm shall enter Repeat Message State. ⌋(SRS_Nm_00153)

[SWS_UdpNm_00121] ⌈ If UdpNmNodeDetectionEnabled is set to TRUE and


function UdpNm_RepeatMessageRequest is called in the Normal Operation State,
UdpNm shall set the Repeat Message Bit. ⌋(SRS_Nm_00153)

7.2.1.3 Ready Sleep State

The Ready Sleep State ensures that any node in the NM-cluster waits with transition
to the Prepare Bus-Sleep Mode as long as any other node keeps the NM-cluster
awake.

21 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

[SWS_UdpNm_00108] ⌈ When the Ready Sleep State is entered from Repeat


Message State or Normal Operation State, transmission of NM PDUs shall be
stopped. ⌋()

Note: If passive mode is enabled no NM PDUs are transmited, no action is required.

[SWS_UdpNm_00109] ⌈ When the NM-Timeout Timer expires in the Ready Sleep


State, the Ready Sleep State shall be left and the Prepare Bus-Sleep Mode shall be
entered. ⌋()

[SWS_UdpNm_00110] ⌈ When the network is requested and the current state is the
Ready Sleep State, the Ready Sleep State shall be left and the Normal Operation
State shall be entered (refer to SWS_UdpNm_00104). ⌋()

[SWS_UdpNm_00111] ⌈ If UdpNmNodeDetectionEnabled is set to TRUE and


Repeat Message Request bit is received in the Ready Sleep State, UdpNm shall
enter Repeat Message State. ⌋(SRS_Nm_00153)

[SWS_UdpNm_00112] ⌈ If UdpNmNodeDetectionEnabled is set to TRUE and


function UdpNm_RepeatMessageRequest is called in the Ready Sleep State,
UdpNm shall enter Repeat Message State. ⌋(SRS_Nm_00153)

[SWS_UdpNm_00113] ⌈ If UdpNmNodeDetectionEnabled is set to TRUE and


function UdpNm_RepeatMessageRequest is called in the Ready Sleep State,
UdpNm shall set the Repeat Message Bit. ⌋(SRS_Nm_00153)

7.2.2 Prepare Bus-Sleep Mode

The purpose of the Prepare Bus Sleep state is to ensure that all nodes have time to
stop their network activity before the Bus Sleep state is entered. Bus activity is
calmed down (i.e. queued messages are transmitted in order to empty all Tx-buffers)
and finally there is no activity on the bus in the Prepare Bus-Sleep Mode.

[SWS_UdpNm_00114] ⌈ When Prepare Bus-Sleep Mode is entered, the UdpNm


shall notify the upper layer by calling Nm_PrepareBusSleepMode. ⌋()

[SWS_UdpNm_00115] ⌈ If UdpNmStayInPbsEnabled is disabled UdpNm shall stay


in the Prepare Bus-Sleep Mode for a configurable amount of time determined by the
UdpNmWaitBusSleepTime (configuration parameter); after that time the Prepare
Bus-Sleep Mode shall be left and the Bus-Sleep Mode shall be entered.⌋()

22 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Note: This requirement implicitly contains that if UdpNmStayInPbsEnabled is


enabled UdpNm will never be left due to a timeout, i.e. UdpNm will stay in Prepare
Bus-Sleep Mode until either ECU goes to Power Off or any restart reason applies
(e.g. see following requirements).

[SWS_UdpNm_00124] ⌈ Upon successful reception of an NM PDU in the Prepare


Bus-Sleep Mode, the Prepare Bus-Sleep Mode shall be left and the Network Mode
shall be entered; by default the Repeat Message State is entered (refer to
SWS_UdpNm_00095).⌋()

[SWS_UdpNm_00123] ⌈When the network is requested in the Prepare Bus-Sleep


Mode, the Prepare Bus-Sleep Mode shall be left and the Network Mode shall be
entered; by default the Repeat Message State is entered (refer to
SWS_UdpNm_00095)⌋()

[SWS_UdpNm_00122] ⌈When the network has been requested (see


SWS_UdpNm_00104) in the Prepare Bus-Sleep Mode and the UdpNm module has
entered Network Mode and if UdpNmImmediateRestartEnabled (configuration
parameter) is TRUE, the UdpNm module shall transmit a Network Management
PDU.⌋()

Rationale: Other nodes in the cluster are still in Prepare Bus-Sleep Mode; in the
exceptional situation described above transition into the Bus-Sleep Mode shall be
avoided and bus-communication shall be restored as fast as possible.

Caused by the transmission offset for Network Management PDUs in UdpNm, the
transmission of the first Network Management PDU in Repeat Message State can be
delayed significantly. In order to avoid a delayed re-start of the network the
transmission of a Network Management PDU can be requested immediately.

Note: If UdpNmImmediateRestartEnabled is TRUE and a wake-up line is used, a


burst of Network Management PDUs occurs if all network nodes get a network
request in Prepare Bus-Sleep Mode.

7.2.3 Bus-Sleep Mode

The purpose of the Bus-Sleep state is to reduce power consumption in the node,
when no messages are to be exchanged.

The communication controller is switched to sleep mode, respective wakeup


mechanisms are activated and finally power consumption is reduced to the adequate
level in the Bus-Sleep Mode.

If UdpNmStayInPbsEnabled is disabled and configurable amount of time


determined by the UdpNmTimeoutTime + UdpNmWaitBusSleepTime (both
configuration parameters) is identically configured for all nodes in the network
23 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement
Specification of UDP Network Management
AUTOSAR CP R20-11

management cluster, all nodes in the network management cluster that are
coordinated with use of the AUTOSAR NM algorithm perform the transition into the
Bus-Sleep Mode at approximately the same time.

Note: The parameters UdpNmTimeoutTime and UdpNmWaitBusSleepTime should


have the same values within all network nodes of the NM-cluster.
Depending on the specific implementation, transition into the Bus-Sleep Mode takes
place approximately at the same time. The time jitter experienced for this transition
depends on the following factors:

internal clock precision (oscillator’s drift),


NM-task cycle time (if tasks are not synchronized with a global time),
NM PDUs waiting time in the Tx-queue (if transmission confirmation is made
immediately after transmit request).

For a best case estimation only oscillator drift should be taken into account for a
configurable amount of time determined by the value UdpNmTimeoutTime +
UdpNmWaitBusSleepTime (both configuration parameters).

[SWS_UdpNm_00126] ⌈ When Bus-Sleep Mode is entered, the UdpNm shall notify


the upper layer by calling Nm_BusSleepMode; this shall not be the case if Bus-Sleep
Mode is entered by default at initialization. ⌋()

[SWS_UdpNm_00127] ⌈ When the UdpNm module receives successfully Network


Management PDU in the Bus-Sleep Mode (call of UdpNm_SoAdIfRxIndication),
the UdpNm module shall notify the upper layer by calling the callback function
Nm_NetworkStartIndication. ⌋()

Rationale: To avoid race conditions and state inconsistencys between Network and
Mode Management, UdpNm will not automatically perform the transition from Bus-
Sleep Mode to Network Mode. UdpNm will only inform the upper layers which have
to make the wake-up decision. NM packet reception in Bus-Sleep Mode must be
handled depending on the current state of the ECU shutdown or startup process.

[SWS_UdpNm_00128] ⌈ If UdpNm_PassiveStartUp is called in the Bus-Sleep


Mode or Prepare Bus Sleep Mode, the UdpNm module shall enter the Network
Mode; by default the Repeat Message State is entered (refer to
SWS_UdpNm_00095 and SWS_UdpNm_00104). ⌋()

Note: In the Prepare Bus-Sleep Mode and Bus-Sleep Mode is assumed that the
network is released, unless bus communication is explicitly requested.

[SWS_UdpNm_00129]: ⌈When the network is requested in Bus-Sleep Mode, the


UdpNm module shall enter the Network Mode; by default the UdpNm module shall

24 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

enter the Repeat Message State (refer to SWS_UdpNm_00095 and


SWS_UdpNm_00104).⌋()

7.3 Network states


Network states (i.e. ‘requested’ and ‘released’) are two additional states of the
AUTOSAR UdpNm state machine that exist in parallel to the state machine. Network
states denote, whether the software components need to communicate on the bus
(the network state is then ‘requested’); or whether the software components don’t
have to communicate on the bus (the bus network state is then ‘released’); note that
if the network is released an ECU may still communicate because some other ECU
still request the network.

[SWS_UdpNm_00104] ⌈The function call UdpNm_NetworkRequest shall request


the network. I.e. the UdpNm module shall change network state to ‘requested’.⌋()

[SWS_UdpNm_00105] ⌈ The function call UdpNm_NetworkRelease shall release


the network. I.e. the UdpNm module shall change network state to ‘released’. ⌋()

7.4 Initialization

[SWS_UdpNm_00141] ⌈ After successful initialization the Network Management


state shall be set to BusSleep Mode. ⌋()

Note: The UdpNm module should be initialized after SoAd is initialized and before
any other network management service is called.

[SWS_UdpNm_00143] ⌈ When initialized, by default, the UdpNm module shall set


the network state to ‘released’. ⌋()

[SWS_UdpNm_00144] ⌈ When initialized, by default, the UdpNm module shall enter


the Bus-Sleep Mode. ⌋()

[SWS_UdpNm_00145] ⌈If AUTOSAR UdpNm is not initialized it shall not prohibit bus
traffic. ⌋()

[SWS_UdpNm_00060] ⌈The function UdpNm_Init shall select the active


configuration set by means of a configuration pointer parameter being passed (see
8.3.1).
⌋()

25 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

[SWS_UdpNm_00033] ⌈After initialization the transmission of NM messages shall be


stopped.
⌋()

[SWS_UdpNm_00025] ⌈After initialization each byte of the user data bytes shall be
set to 0xFF. ⌋()

[SWS_UdpNm_00085] ⌈After initialization the Control Bit Vector shall be set to 0x00.
⌋()

[SWS_UdpNm_00148] ⌈ All instances of UDP NM on different ECUs in one NM


cluster shall use the same UDP receive port.⌋()

7.5 Execution

7.5.1 Processor architecture

[SWS_UdpNm_00146] ⌈ The AUTOSAR UdpNm coordination algorithm shall be


processor independent, meaning it shall not rely on any processor specific hardware
support and thus shall be realizable on any processor architecture that is within the
scope of AUTOSAR. ⌋()

7.5.2 Timing parameters

[SWS_UdpNm_00246] ⌈ The configuration parameter UdpNmTimeoutTime shall


determine the AUTOSAR UdpNm timing parameter NM-Timeout Time. ⌋()

[SWS_UdpNm_00247] ⌈ The configuration parameter UdpNmRepeatMessageTime


shall determine the AUTOSAR UdpNm timing parameter Repeat Message Time. ⌋()

[SWS_UdpNm_00248] ⌈ The configuration parameter UdpNmWaitBusSleepTime


shall determine the AUTOSAR UdpNm timing parameter Wait Bus-Sleep Time. ⌋()

[SWS_UdpNm_00249] ⌈ The optional configuration parameter


UdpNmRemoteSleepIndTime shall determine the AUTOSAR UdpNm timing
parameter Remote Sleep Indication Time. ⌋()

26 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

7.6 Communication Scheduling

7.6.1 NM Message Transmission

Note: The transmission mechanisms described in this chapter are only relevant if the
NM message transmission ability is enabled.

[SWS_UdpNm_00072] ⌈ The transmission of NM messages shall be configurable by


means of UdpNmPassiveModeEnabled (see chapter 10.2). ⌋()

Note: Passive nodes do not transmit NM messages, i.e. they can not actively
influence the shut down decision, but they do receive NM message in order to be
able to shut down synchronously.

Note: The transmission mechanisms described in this chapter are only relevant if
UdpNmPassiveModeEnabled is FALSE.

[SWS_UdpNm_00237] ⌈ The UdpNm module shall provide the periodic transmission


mode. In this transmission mode the UdpNm module shall send Network
Management PDUs periodically. ⌋()

Note: The periodic transmission mode is used in the "Repeat Message State" and
"Normal Operation State".

[SWS_UdpNm_00005] ⌈If the Repeat Message State is not entered via


UdpNm_NetworkRequest OR UdpNmImmediateNmTransmissions is zero the
transmission of NM PDU shall be delayed by UdpNmMsgCycleOffset after entering
the repeat message state. ⌋()

Note: This requirement covers also the case if Repeat Message State is entered from
Network Operation State or Ready Sleep State due to Repeat Message Request or
Bit (see SWS_UdpNm_00111, SWS_UdpNm_00112, SWS_UdpNm_00119,
SWS_UdpNm_00120). This means that in this case the immediate transmission is
not used (even if UdpNmImmediateNmTransmissions > 0 and independent from
configuration of UdpNmPnHandleMultipleNetworkRequests) i.e.
UdpNmMsgCycleOffset will always be applied. This mechanism prevents bursts of
NM messages.

[SWS_UdpNm_00334] ⌈When entering the Repeat Message State from Bus Sleep
Mode or Prepare Bus Sleep Mode because of UdpNm_NetworkRequest() (active
wakeup) and if UdpNmImmediateNmTransmissions is greater zero, the NM PDUs
shall be transmitted using UdpNmImmediateNmCycleTime as cycle time. The
transmission of the first NM PDU shall be triggered as soon as possible. After the
transmission the Message Cycle Timer shall be reloaded with

27 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

UdpNmImmediateNmCycleTime. The UdpNmMsgCycleOffset shall not be


applied in this case. ⌋()

[SWS_UdpNm_00006] ⌈If Normal Operation State is entered from Ready Sleep State
the transmission of NM PDUs shall be started immediately. ⌋()

[SWS_UdpNm_00454] ⌈If UdpNmPnHandleMultipleNetworkRequests is set to


TRUE UdpNm_NetworkRequest shall trigger a state transition from Network Mode
to Repeat Message state. If PDU transmission ability is enabled the NM PDUs shall
be transmitted using UdpNmImmediateNmCycleTime as cycle time. The
transmission of the first NM PDU shall be triggered as soon as possible. After the
transmission the Message Cycle Timer shall be reloaded with
UdpNmImmediateNmCycleTime. The UdpNmMsgCycleOffset shall not be
applied in this case. ⌋()

Note: UdpNmImmediateNmTransmissions has to be greater zero in this case due


to ECUC_UdpNm_00075.

[SWS_UdpNm_00330] ⌈If NM PDUs shall be transmitted with


UdpNmImmediateNmCycleTime (See SWS_UdpNm_00334 and
SWS_UdpNm_00454), UdpNm shall ensure that
UdpNmImmediateNmTransmissions (including first immediate transmission) with
this timing are requested successfully. If a transmission request to SoAd fails
(E_NOT_OK is returned), UdpNm shall retry the transmission request in the next main
function. Afterwards UdpNm shall continue transmitting NM PDUs using the
UdpNmMsgCycleTime. ⌋()

Note: While transmitting NM PDUs using the UdpNmImmediateNmCycleTime no


other Nm PDUs shall be transmitted (i.e. the UdpNmMsgCycleTime transmission
cycle is stopped).

[SWS_UdpNm_00032] {DRAFT} ⌈ If transmission of NM PDUs has been started, the


UdpNm Message Cycle Timer expires and when
UdpNmSynchronizedPncShutdownEnabled is set to either FALSE or if set to
TRUE and no request for a synchronized PNC shutdown is pending, then the UdpNm
modul shall transmit an NM PDU by calling SoAd_IfTransmit. ⌋()

[SWS_UdpNm_00472] {DRAFT} ⌈ If transmission of NM PDUs has been started, the


UdpNm Message Cycle Timer expires and
UdpNmSynchronizedPncShutdownEnabled is set to TRUE and requests for
synchronized PNC shutdown are pending, the transmission of the NM PDU shall be
postponed to the next corresponding UdpNm_Mainfunction_<Instance Id> call. ⌋()

Note:

28 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

 The synchronized PNC shutdown has to be sent immediately and therefore


processing of cylic NM messages transmitted with UdpNmMsgCycleTime has
to be delayed. In rare cases this could lead to a delay of more than one main
function cycle time.
 The NM timing has to consider that an NM message transmitted with
UdpNmMsgCycleTime may be delayed for more than one main function cycle
time. Therefore the following condition has to be fulfilled to tolerate multiple
delays of those NM Messages:
(UdpNmPnResetTime – UdpNmMsgCycleTime) > n *
UdpNmMainFunctionPeriod, where n denotes the number of tolerated
delays before the PnResetTime expires, if no NM message is received.

[SWS_UdpNm_00040] ⌈ If the UdpNm Message Cycle Timer expires it shall be


restarted with UdpNmMsgCycleTime. ⌋()

[SWS_UdpNm_00051] ⌈ If transmission of NM PDUs has been stopped the UdpNm


Message Cycle Timer shall be canceled. ⌋()

[SWS_UdpNm_00007] ⌈ If parameter UdpNmRetryFirstMessageRequest (see


ECUC_UdpNm_00085) is TRUE and if the first transmit request after transition from
Bus Sleep to Repeat Message State is not accepted by SoAd, the message request
shall be repeated in the next main function until one transmit request is accepted by
SoAd. ⌋()

Note: This feature can be used in case of partial network wakeup filter to avoid a
blocking of all messages in case of passive start-up and first message request is not
accepted by SoAd due to EthSM could not enable transmission path fast enough
(e.g. in case of asynchronous transceiver handling).

[SWS_UdpNm_00379] ⌈ If UdpNm_SoAdIfTxConfirmation is called with result


E_NOT_OK, UdpNm shall call the function Nm_TxTimeoutException. ⌋
(SRS_Nm_00137)

7.6.2 NM Message Reception

If an NM message has been successfully received, the SoAd will call


UdpNm_SoAdIfRxIndication.

[SWS_UdpNm_00035] ⌈ Upon a call of UdpNm_SoAdIfRxIndication, the UdpNm


module shall copy the data of the Network Management PDU referenced in the
function parameter to an internal buffer. ⌋()

[SWS_UdpNm_00037] ⌈ When an NM PDU has been received, the Nm function


Nm_PduRxIndication shall be called, if UdpNmPduRXIndicationEnabled
(configuration parameter) is TRUE. ⌋()
29 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement
Specification of UDP Network Management
AUTOSAR CP R20-11

7.7 Additional features

7.7.1 Detection of Remote Sleep Indication (optional)

The “Remote Sleep Indication” denotes a situation, where a node in Normal


Operation State finds all other nodes in the cluster are ready to sleep. The node still
in Normal Operation State will still keep the bus awake.

[SWS_UdpNm_00149] ⌈ Detection of remote sleep indication shall be statically


configurable with use of the UdpNmRemoteSleepIndEnabled switch (configuration
parameter). ⌋()

[SWS_UdpNm_00150] ⌈ If no NM PDUs are received in the Normal Operation State


for a configurable amount of time determined by the UdpNmRemoteSleepIndTime
(configuration parameter), the NM shall notify the Generic Network Management
Interface that all other nodes in the cluster are ready to sleep (the so-called ‘Remote
Sleep Indication’) by calling Nm_RemoteSleepIndication. ⌋()

[SWS_UdpNm_00151] ⌈ If Remote Sleep Indication has been previously detected


and if an NM PDU is received in the Normal Operation State or Ready Sleep State
again, the NM shall notify the Generic Network Management Interface that some
nodes in the cluster are not ready to sleep anymore (the so-called ‘Remote Sleep
Cancellation’) by calling Nm_RemoteSleepCancellation. ⌋()

[SWS_UdpNm_00152] ⌈ If Remote Sleep Indication has been previously detected


and if Repeat Message State is entered from Normal Operation State or Ready
Sleep State, the UdpNm shall notify the Generic Network Management Interface that
some nodes in the cluster are not ready to sleep anymore (the so-called 'Remote
Sleep Cancellation') by calling Nm_RemoteSleepCancellation. ⌋()

[SWS_UdpNm_00154] ⌈ The NM shall reject a check of Remote Sleep Indication in


Bus-Sleep Mode, Prepare Bus-Sleep Mode and Repeat Message State; the service
shall not be executed and E_NOT_OK shall be returned. ⌋()

7.7.2 User Data (optional)

[SWS_UdpNm_00158] ⌈ Support of NM user data shall be statically configurable


using the UdpNmUserDataEnabled switch (configuration parameter). ⌋()

30 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

[SWS_UdpNm_00159] ⌈ When UdpNm_SetUserData is called, the NM user data for


NM packets transmitted next on the bus shall be set; operation of setting the NM user
data shall guarantee data consistency. ⌋()

[SWS_UdpNm_00160] ⌈ When UdpNm_GetUserData is called, the NM user data


contained in the payload of the most recently received NM PDU shall be provided;
operation of providing the NM user data shall guarantee data consistency. ⌋()

Note: If NM user data is configured it will be sent for sure in the Repeat Message
State. In Ready Sleep State the user data will not be sent.

[SWS_UdpNm_00312] ⌈ If UdpNmComUserDataSupport is enabled the API


UdpNm_SetUserData shall not be available. ⌋()

[SWS_UdpNm_00317] ⌈ If UdpNmComUserDataSupport is enabled and NM-PDU


is not configured for triggered transmission in SoAd
(SoAdBswModules/SoAdIfTriggerTransmit = FALSE), the UdpNm shall collect
the NM User Data from the referenced NM I-PDU by calling
PduR_UdpNmTriggerTransmit and combine the user data with the further NM
bytes each time before it requests the transmission of the corresponding NM
message. ⌋(SRS_Nm_02503)

Note: In case of triggered transmission no data is needed at the transmission


request, just the length is needed. The data will be collected within
UdpNm_SoAdIfTriggerTransmit (see chapter 8.4.3
UdpNm_SoAdIfTriggerTransmit).

[SWS_UdpNm_00464] ⌈ If UdpNmComUserDataSupport is enabled and if UdpNm


is in RepeatMessage state or NormalOperation state and if UdpNm_Transmit is
called, UdpNm shall request an additional transmission of the NM PDU with the
current user data. ⌋(SRS_Nm_02503)

7.7.3 Passive Mode (optional)

In Passive Mode the node is only receiving NM messages but not transmitting any
NM messages.

[SWS_UdpNm_00161] ⌈ Passive Mode shall be statically configurable with use of the


UdpNmPassiveModeEnabled switch (configuration parameter). ⌋()

[SWS_UdpNm_00162] ⌈ Passive Mode shall be statically configured consistent for all


instances within one ECU. ⌋()
31 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement
Specification of UDP Network Management
AUTOSAR CP R20-11

[SWS_UdpNm_00163] ⌈ If Passive Mode is used (configuration parameter


UdpNmPassiveModeEnabled) the following options must not be used:

Bus Synchronization
(configuration parameter UdpNmBusSynchronizationEnabled)
Remote Sleep Indication
(configuration parameter UdpNmRemoteSleepIndEnabled)
Node Detection
(configuration parameter UdpNmNodeDetectionEnabled) ⌋()

7.7.4 State change notification (optional)

[SWS_UdpNm_00166] ⌈ All changes of the AUTOSAR UdpNm states shall be


notified to the upper layer by calling Nm_StateChangeNotification if the
callback Nm_StateChangeNotification is enabled (configuration parameter
UdpNmStateChangeIndEnabled is TRUE). ⌋()

7.7.5 Communication Control (optional)

[SWS_UdpNm_00168] ⌈ Communication Control shall be statically configurable with


use of the UdpNmComControlEnabled switch (configuration parameter). ⌋()

[SWS_UdpNm_00170] ⌈ The optional service UdpNm_DisableCommunication


shall disable the NM PDU transmission ability. ⌋()

Note: The NM coordination algorithm cannot work correctly if NM PDU transmission


ability is disabled. Therefore it has to be ensured that the ECU is not shutdown as
long as the NM PDU transmission ability is disabled.

If UdpNm_NetworkRelease is called and NM PDU transmission ability has been


disabled, ECU will shut down. This ensures that ECU can shut down also in case of
race conditions (e.g. diagnostic session left shortly before enabling communication)
or a wrong usage of communication control.

[SWS_UdpNm_00172] ⌈ The optional service UdpNm_DisableCommunication


shall return E_NOT_OK, if the current mode is not Network Mode. ⌋()

[SWS_UdpNm_00173] ⌈ When the Network Management PDU transmission ability is


disabled, the UdpNm module shall stop the UdpNm Message Cycle Timer in order to
stop the transmission of Network Management PDUs. ⌋()

32 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

[SWS_UdpNm_00174] ⌈ When the NM PDU transmission ability is disabled, the NM-


Timeout Timer shall be stopped. ⌋()

[SWS_UdpNm_00175] ⌈ When the NM PDU transmission ability is disabled, the


detection of Remote Sleep Indication Timer shall be suspended. ⌋()

[SWS_UdpNm_00178] ⌈ When the Network Management PDU transmission ability is


enabled, the transmission of NM PDUs shall be started latest within the next NM
main function. ⌋(SRS_Nm_02512)

[SWS_UdpNm_00179] ⌈ When the NM PDU transmission ability is enabled, the NM-


Timeout Timer shall be restarted. ⌋()

[SWS_UdpNm_00180] ⌈ When the NM PDU transmission ability is enabled, the


detection of Remote Sleep Indication Timer shall be resumed. ⌋()

[SWS_UdpNm_00181] ⌈ The optional service


UdpNm_RequestBusSynchronization shall return E_NOT_OK if the NM PDU
transmission ability is disabled. ⌋()

7.7.6 NM Coordinator synchronization support (optional)

When having more than one coordinator connected to the same bus a special bit in
the CBV, the NmCoordinatorSleepReady bit is used to indicate that the main
coordinator requests to start shutdown sequence. The main functionality of the
algorithm is described in the Nm module.

[SWS_UdpNm_00320] ⌈If the UdpNm called


NM_CoordReadyToSleepIndication and is still in Network Mode it shall notify
the Nm by calling Nm_CoordReadyToSleepCancellation on the first reception
of a NM message with the NmCoordinatorSleepReady bit (see CBV) set it to 0
⌋()
[SWS_UdpNm_00364] ⌈If UdpNm has entered Network mode or called
Nm_CoordReadyToSleepCancellation before it shall notify the NM by calling
Nm_CoordReadyToSleepIndication on the first reception of NM message with
the NmCoordinatorSleepReady bit (see CBV) set to 1
⌋()

33 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

[SWS_UdpNm_00321] ⌈If UdpNmCoodinatorSyncSupport is set to TRUE and the


API UdpNm_SetSleepReadyBit is called UdpNm shall set the "NM Coordinator
Sleep Ready Bit" bit to passed value and trigger a single Network Management
PDU.⌋()

[SWS_UdpNm_00322] ⌈The API UdpNm_SetSleepReadyBit() and the feature


"Coordinated Bus Shutdown" shall only be available if
UdpNmCoordinatorSyncSupport is set to TRUE.⌋()

7.8 Partial Networking

7.8.1 Rx Handling of NM PDUs

[SWS_UdpNm_00328]⌈ If the UdpNmPnEnabled is FALSE, the UdpNm shall perform


the normal Rx Indication handling and the partial networking extensions shall be
disabled.⌋()

[SWS_UdpNm_00329] ⌈If UdpNmPnEnabled is TRUE, the PNI bit in the received


NM-PDU is 0 and UdpNmAllNmMessagesKeepAwake is TRUE, the UdpNm module
shall perform the normal Rx Indication handling and omitting the extensions for
partial networking.⌋()

[SWS_UdpNm_00462]⌈ If UdpNmPnEnabled is TRUE, the PNI bit in the received


NM-PDU is 0 and UdpNmAllNmMessagesKeepAwake is FALSE, the UdpNm module
shall ignore the received NM-PDU. ⌋()

[SWS_UdpNm_00331] ⌈If UdpNmPnEnabled is TRUE and the PNI bit in the received
NM-PDU is 1, UdpNm module shall process the Partial Networking Information of the
NM-PDU as described in chapter 7.8.3 to 7.8.5.⌋()

[SWS_UdpNm_00473] {DRAFT} ⌈ If UdpNmSynchronizedPncShutdownEnabled


is TRUE, the PNI bit in the received NM-PDU is 1, the PNSR bit in the received NM-
PDU is 1 and the corresponding ComMChannel configured via
UdpNmComMNetworkHandleRef where this NM-PDU was received is actively
coordinated (ComMPncGatewayType set to COMM_GATEWAY_TYPE_ACTIVE),
then the UdpNm module shall ignore the received NM-PDU. Additionally, the UdpNm
module shall:
 report the runtime error UDPNM_E_INVALID_PN_SYNC_SHUTDOWN_REQUEST
to the Default Error Tracer
 request a transmission of a NM-PDU with the current PN information lastet in
the next main function call of the affected UdpNm-Channel, If
UdpNmTopLevelPncCoordinatorErrorReactionEnabled is set to TRUE
⌋()
34 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement
Specification of UDP Network Management
AUTOSAR CP R20-11

7.8.2 Tx Handling of NM PDUs

[SWS_UdpNm_00332]⌈If UdpNmPnEnabled is TRUE the UdpNm module shall set


the value of the transmitted PNI bit in the CBV to 1.⌋()

Note: The usage of the CBV is mandatory in case Partial Networking is used.

[SWS_UdpNm_00333] ⌈If UdpNmPnEnabled is FALSE the UdpNm module shall set


the value of the transmitted PNI bit in the CBV always to 0.⌋()

[SWS_UdpNm_00474] {DRAFT} ⌈ If UdpNmSynchronizedPncShutdownEnabled


is set to TRUE and the UdpNm module is indicated via
UdpNm_RequestSynchronizedPncShutdown, the UdpNm module shall store the
given PNC (pncId) per given UdpNm-Channel (nmChannelHandle) as pending
request for a synchronized PNC shutdown ⌋( SRS_Nm_02545 )

Note: The aggregation of all PNCs which are requested for a synchronized PNC
shutdown and the transmission as PN shutdown message (set the PNSR bit in the
CBV to 1) is done asynchronously in the context of the corresponding
UdpNm_Mainfunction.

[SWS_UdpNm_00475] {DRAFT} ⌈ If UdpNmSynchronizedPncShutdownEnabled


is set to TRUE, requests for synchronized PNC shutdown are pending and no
transmission confirmation (indicated via UdpNm_TxConfirmation) of a previous
call is pending, then the UdpNm module shall request in the next main function call of
the corresponding NM-channel a transmission of a NM message by calling
SoAd_IfTransmit. In case the NM-PDU is not configured for a triggered
transmission in the SoAd (SoAdBswModules/SoAdIfTriggerTransmit =
FALSE), UdpNm shall set for this message additionally the following data beneath the
normal data:
 Set the PNSR bit in the CBV to 1
 Overwrite the PN information in the user data (after NM User Data has been
fetched, if UdpNmComUserDataSupport is enabled) by setting bits that
corresponds to PNC IDs stored as pending request for a synchronized PNC
shutdown to 1 and all other bits to 0.⌋( SRS_Nm_02540, SRS_Nm_02542,
SRS_Nm_02545 )

Note: The UdpNm modul has to aggregate all PNCs which were indicated for a
synchronized PNC shutdown and transfer the pncId’s to a byte array (PN Info range).
Each bit (PN bit) of the PN Info range represent a particular PNC. The byteIndex and
bitindex within the PN Info range of PN bit shall be determined as follows:
 byteIndex = (PncId div 8)
 bitIndex = (PncId mod 8)

35 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

[SWS_UdpNm_00476] {DRAFT} ⌈If UdpNmSynchronizedPncShutdownEnabled


is set to TRUE, the UdpNm module has requested a transmission due to
synchronized PNC shutdown (see SWS_UdpNm_00475) and
UdpNm_TxConfirmation is called with result E_OK, the UdpNm shall consider
those PNC IDs stored as pending request for a synchronized PNC shutdown as
completed and remove them from storage.⌋( SRS_Nm_02545 )

Note: UdpNm has to ensure that new request for a synchronized PNC shutdown
(indicated via UdpNm_RequestSynchronizedPncShutdown) are not lost, during
an on going transmission of a PN shutdown NM frame.

[SWS_UdpNm_00477] {DRAFT} ⌈ If UdpNmSynchronizedPncShutdownEnabled


is set to TRUE, the UdpNm module has requested a transmission due to
synchronized PNC shutdown (see SWS_UdpNm_00475),
UdpNm_SoAdIfTxConfirmation is called with result E_NOT_OK or an expexted
transmission confirmation (via UdpNm_SoAdIfTxConfirmation) is pending, the
UdpNm module shall keep those PNC IDs stored as pending request for a
synchronized PNC shutdown as long as the corresponding EIRA PN reset timer is
running and the PN is neither externally nor interally requested again. ⌋(
SRS_Nm_02545 )

Note:
 UdpNm has to perform a retry transmission handling for PN shutdown
messages in the context of the corresponding main function calls, if
transmission of the PN shutdown message was not confirmed by the lower
layer (either with E_NOT_OK or UdpNm_SoAdIfTxConfirmation was not
called).The retry transmission requests should cover error cases, were the
lower layer cannot transmit the Nm messages. In the worst case this collide
with a post poned NM message transmitted with UdpNmMsgCycleTime (see
SWS_UdpNm_00472). But in any case, if the capability to transmitted NM
messages is not re-covered within the PN reset time (EIRA), the PNCs will
shutdown not synchronized, which might lead to timeout errors on application
level.
 The dependency to a pending transmission confirmation indicated by the lower
layer, should support reliable communication, e.g. ensure PN shutdown
message was transmitted on the network or avoid transmissions of outdated
PN shutdown messages, if for example queueing in the lower layer is
configured.

7.8.3 NM PDU Filter Algorithm

[SWS_UdpNm_00335] ⌈The range (in bytes) that contains the PN request


information (PN Info Range) in the received NM-PDU is defined by
UdpNmPnInfoOffset (in bytes) starting from byte 0 and UdpNmPnInfoLength (in
bytes). This range is called PN Info Range.⌋()

Example:
- UdpNmPnInfoOffset =3
36 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement
Specification of UDP Network Management
AUTOSAR CP R20-11

- UdpNmPnInfoLength =2

Only Byte 3 and Byte 4 of the NM message contains PN request information

[SWS_UdpNm_00336] ⌈Every bit of the PN Info Range represents one Partial


Network. If the bit is set to 1 the Partial Network is requested. If the bit is set to 0
there is no request for this PN.⌋()

[SWS_UdpNm_00337] ⌈By means of the configuration parameter


UdpNmPnFilterMaskByte the UdpNm is able to detect which PN is relevant for the
ECU and which not.
Each bit of UdpNmPnFilterMasskByte has the following meaning:
0 The PN request is irrelevant for the ECU. The communication stack of the ECU
is not kept awake if this bit is set in a received NM-PDU.
1 The PN request is relevant for the ECU. The communication stack of the ECU
is kept awake if this bit is set in a received NM-PDU.⌋()

[SWS_UdpNm_00338] ⌈ Each PN filter mask byte shall be mapped (bitwise AND)to


the corresponding byte in the PN info range of the NM message. ⌋()

[SWS_UdpNm_00339]⌈If at least one bit within the PN Info Range of the received
NM-PDU matches with a bit in the NM filter mask the PN request information is
relevant for the ECU⌋()

[SWS_UdpNm_00460] ⌈ If no relevant PN is requested in the received NM-PDU and


UdpNmAllNmMessagesKeepAwake is FALSE the PDU shall be dropped from further
processing. ⌋()

[SWS_UdpNm_00461] ⌈ If no relevant PN is requested in the received NM-PDU and


UdpNmAllNmMessagesKeepAwake is TRUE the PDU shall not be dropped from
further Rx Indication handling. ⌋()

7.8.4 Aggregation of Internal and External Requested Partial Networks

Note: This feature is used by every ECU that has to switch I-PDU-Groups because of
the activity of partial networks. (e.g. to prevent false timeouts) I-PDU-Groups shall be
switched on if the corresponding PN is requested internally or externally. I-PDU-
Groups shall not be switched off until all internal and external requests for the
corresponding PN are released.

The logic for switching the IPDU-Groups is implemented by ComM. The UdpNm only
provides the information if a PN is requested or not. The COM module is used to
transfer the data to the upper layers.

37 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

To switch the I-PDU-Groups synchronously on all direct connected ECUs, UdpNm


shall provide the information of a request change to the upper layer at (almost) the
same time on every ECU. This is why the reset timer is restarted on every received
and every sent NM message (see below).

The aggregated state of the internal/external requested PNs is called External


Internal Requests Aggregated (EIRA).

[SWS_UdpNm_00344] ⌈If UdpNmPnEiraCalcEnabled is TRUE, the UdpNm shall


provide the possibility to store external and internal requested PNs combined over all
relevant channels (all UdpNm Channels where UdpNmPnEnabled is TRUE). At
initialization the values of all PNs shall be set to 0 (not requested) ⌋()

[SWS_UdpNm_00347] ⌈If
 UdpNmPnEiraCalcEnabled is TRUE
 a NM-PDU is received
 PNs are requested within this message (bits are set to 1)
 And the requested PNs are set to 1 within the [configured PN filter mask] then
UdpNm shall store the request information (value 1) for these PNs ⌋()

[SWS_UdpNm_00348] ⌈If
 UdpNmPnEiraCalcEnabled is TRUE
 NM-PDU is being requested to send by UdpNM
 PNs are requested within this message(bits are set to 1)
 And the requested PNs are set to 1 within the [configured PN filter mask] then
UdpNm shall store the request information (value 1) for these PNs.⌋()

[SWS_UdpNm_00345] ⌈If UdpNmPnEiraCalcEnabled is TRUE,the UdpNm


module shall provide a possibility to monitor each PN, if this PN is still externally or
internally requested on at least one of the relevant channels.⌋()

Note: This means, only one timer is required to handle one PN on multiple connected
physical channels. For example: only 8 EIRA reset timers are required to handle the
requests of a Gateway with 6 physical channels and 8 partial networks.
This is possible because the switch of PN PDU-Groups is done global for the ECU
and not dependent of the physical channel.

[SWS_UdpNm_00349] ⌈If UdpNmPnEiraCalcEnabled is TRUE and a PN is


requested by message reception or sending (see SWS_UdpNM_00347 and
SWS_UdpNm_00348) the monitoring for this PN shall be restarted with respect to
UdpNmPnResetTime.⌋()

38 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Note: UdpNmPnResetTime shall be configured to a value greater than


UdpNmMsgCycleTime. If UdpNmPnResetTime is configured to a value smaller
than
UdpNmMsgCycleTime and only one ECU requests the PN, the request state
toggles in the EIRA because request state is rested before the requesting ECU is
able to send the next NM message.

Note: UdpNmPnResetTime shall be configured to a value smaller than


UdpNmTimeoutTime to avoid that the timer could elapse after NM already changed
to Prepare Bus Sleep.

[SWS_UdpNm_00351] ⌈If UdpNmPnEiraCalcEnabled is TRUE and a PN is not


requested again within UdpNmPnResetTime the corresponding stored value for this
PN shall be set to 0 (not requested) ⌋()

[SWS_UdpNm_00352] ⌈If UdpNmPnEiraCalcEnabled is TRUE and the stored


value for a PN is set to requested or back to not requested (see
SWS_UdpNm_00347, SWS_UdpNm_00348 and SWS_UdpNm_00351) UdpNm
shall inform upper layers by calling PduR_UdpNmRxIndication() for the
configured EIRA PDU (i.e changed EIRA information shall be passed to COM). ⌋()

Note: If a PN shutdown message is received (PNSR is set to 1), no special handling


is needed, because the according PNC state machines need to stay in
COMM_PNC_READY_SLEEP. Only the ERA PDU is handled in a different way (see
SWS_UdpNm_00478)

[SWS_UdpNm_00372] ⌈If UdpNmPnEiraCalcEnabled is TRUE and


UdpNmPnEraCalcEnabled is TRUE, the PN status information shall be stored
separately for both, the EIRA and ERA information (compare to
SWS_UdpNM_00344 and SWS_UdpNM_00355).⌋()

7.8.5 Aggregation of External Requested Partial Networks

Note: This feature is used by the Gateways to collect only the external PN requests.
The external PN requests are mirrored back to the requesting bus and provided to
other (required) physical channels of a central gateway.

In case of a sub gateway the requests bit must not be mirrored back to the
requesting physical channel in order to avoid static waking between central- and sub
gateways. This logic shall be implemented by the ComM.

The UdpNm module provides the information if the PN is externally requested or not.
The COM module is used for data transmission to the upper layer.The aggregated
state of the external requested PNs is called “External Requests Aggregated” (ERA).

39 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

[SWS_UdpNm_00355] ⌈If UdpNmPnEraCalcEnabled is TRUE, the UdpNM shall


provide the possibility to store external requested PNs on each relevant channel. At
initialization the values of all PNs shall be set to 0 (not requested) ⌋()

[SWS_UdpNm_00357] {DRAFT} ⌈If


 UdpNmPnEraCalcEnabled is TRUE
 a NM-PDU is received
 PNSR bit is 0
 PNs are requested within this message (bits are set to 1)
 and the requested PNs are set to 1 within the [configured PN filter mask] then
UdpNm shall store the request information (value 1) for these PNs⌋()

Note: PNSR Bit set to 1 is only possible if a synchronized PNC shutdown is


requested. A synchronized PNC shutdown should be handled across the PN
topology, therefore it is assumed that either all coordinators have the synchronized
PNC shutdown enabled or all coordinators have the synchronized PNC shutdown
disabled. A mixture of both would lead to an unsynchronized PNC shutdown, which
has to be avoided.

[SWS_UdpNm_00358] ⌈ If UdpNmPnEraCalcEnabled is TRUE, the UdpNm module


shall provide a possibility to monitor each relevant channel and for each PN if this PN
is still externally requested.⌋()

Note: This means, a separate timer is required to handle one PN on multiple physical
channels.
For example: 48 ERA reset timers are required to handle the requests of a gateway
with 6 physical channels and 8 partial networks. It is not possible to combine the
reset timer like EIRA timers, because the external request mustn’t be mirrored back
to the requesting bus by a sub gateway. Thus it is required to detect the physical
channel that is the source of the request bit.

[SWS_UdpNm_00359] ⌈If UdpNmPnEraCalcEnabled is TRUE and a PN is


requested by message reception ( see SWS_UdpNM_00357) the monitoring for this
PN shall be restarted with respect to the UdpNmPnResetTime.⌋()

Note: UdpNmPnResetTime shall be configured to a value greater than


UdpNmMsgCycleTime. If UdpNmPnResetTime is configured to a value smaller than
UdpNmMsgCycleTime and only one ECU requests the PN, the request state toggles
in the ERA because request state is rested before the requesting ECU is able to
send the next NM-PDU.

Note: UdpNmPnResetTime shall be configured to a value smaller than


UdpNmTimeoutTime to avoid that the timer could elapse after NM already changed
to Prepare Bus Sleep.

40 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

[SWS_UdpNm_00360] ⌈If UdpNmPnEraCalcEnabled is TRUE and PN is not


requested again within UdpNmPnResetTime then the corresponding stored value for
this PN shall be set to not requested (value 0)⌋()

[SWS_UdpNm_00361] ⌈If UdpNmPnEraCalcEnabled is TRUE and the stored value


for a PN changes to requested or back to not requested (see SWS_UdpNm_00357
and SWS_UdpNm_00360), the UdpNm module shall inform the upper layers by
calling PduR_UdpNmRxIndication()for the configured ERA PDU (i.e. changed
ERA information shall be passed to the COM module).⌋()

Note: In case both UdpNmPnEiraCalcEnabled and UdpNmPnEraCalcEnabled are


set to TRUE, the PN status information is handled as specified in
SWS_UdpNm_00372.

[SWS_UdpNm_00478] {DRAFT} ⌈ If UdpNmSynchronizedPncShutdownEnabled


is TRUE and the PNSR bit of the received NM PDU is set to 1, then the UdpNm
module shall set the bits in the ERA PDU to 0 of the corresponding bits which are set
to 1 in the received PN info range, stop the according monitoring for these externally
requested PNs (see SWS_UdpNm_00359 ) and inform the upper layers in the given
order:
 call PduR_UdpNmRxIndication() for the configured ERA PDU
 call Nm_ForwardSynchronizedPncShutdown() with the configured
NetworkHandle (UdpNmComMNetworkHandleRef) ⌋( SRS_Nm_02541 )

Note: The PN information of a received PN shutdown message shall be used to


release the PNCs for a synchronized shutdown and pass this ERA information to the
ComM module by writing the corresponding ERA PDU. The synchronized PNC
shutdown has to be handled as fast as possible, therefore the Nm module is
informed immediately.

7.8.6 Spontaneous Transmission of NM-PDUs via UdpNm_NetworkRequest

[SWS_UdpNm_00362]⌈ If UdpNm_NetworkRequest is called,


UdpNmPnHandleMultipleNetworkRequests is set to TRUE and UdpNm is in
Ready Sleep State, Normal Operation State or Repeat Message State, UdpNm shall
change to or restart the Repeat Message State⌋() .

Note: If UdpNmPnHandleMultipleNetworkRequests is set to TRUE the UdpNm


feature 'Immediate Transmission' is mandatory.

Note: The PN Control Module (e.G. ComM) is responsible to call


UdpNm_NetworkRequest if the PN request bits changes.

41 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

7.9 Payload (PDU) Structure


The figure below shows an example for n bytes PDU length:

Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0


Byte 0 Source Node Identifier (default)
Byte 1 Control Bit Vector (default)
Byte 2 User data 0
Byte 3 User data 1
Byte 4 User data 2
Byte 5 User data 3
… …
Byte n User data n-2
Figure 4: NM packet payload (NM PDU) default format.

Note:
The length of the Network Management PDU is defined by the PduLength parameter
in the "global" ECUC module ([EcuC003_Conf], see Ecu Configuration specification).
The difference between number of enabled system bytes and length is the amount of
user data bytes.

[SWS_UdpNm_00074] ⌈ The location of the source node identifier shall be


configurable by means of UDPNM_PDU_NID_POSITION to Byte 0, Byte 1, or off. ⌋()
[SWS_UdpNm_00075] ⌈ The location of the control Bit vector shall be configurable
by means of UDPNM_PDU_CBV_POSITION to Byte 0, Byte 1, or off. ⌋()

[SWS_UdpNm_00076] {DRAFT} ⌈ The length of an NM packet shall not exceed the


MTU(Maximum Transmission Unit)of the underlying physical transport layer. ⌋()

The figure below describes the format of the Control Bit Vector:

Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0


Partial PN
Active NM Repeat
PNI Network Shutdown
CBV Res Wakeup Coordinator Res Message
Bit Learning Request
Bit Sleep Ready Request
Bit Bit
Figure 5: Control Bit Vector.

Note: Bit 1 and 2 were used in R3.2 as NM Coordinator ID (Low Bit)

[SWS_UdpNm_00045] {DRAFT} ⌈ The Control Bit Vector shall consist of:

Bit 0: Repeat Message Request Bit


0: Repeat Message State not requested
1: Repeat Message State requested

42 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Bit 1: PN Shutdown Request Bit (PNSR)


0: NM message does not contain synchronized Partial Network shutdown
request
1: NM message does contain synchronized Partial Network shutdown request
for at least one PNC
Bit 3 :NM Coordinator Sleep Bit
0: Start of synchronized shutdown is not requested by main coordinator
1: Start of synchronized shutdown is requested by main coordinator

Bit 4 Active Wakeup Bit


0: Node has not woken up the network (passive wakeup)
1: Node has woken up the network (active Wakeup)

Bit 5 Partial Network Learning Bit (PNL)


0: PNC learning is not requested
1: PNC learning is requested

Bit 6 Partial Network Information Bit (PNI)


0: NM message contains no Partial Network request information
1: NM message contains Partial Network request information

Bit 2,7 are reserved for future extensions


0 : Disabled / Reserved for future usage ⌋(SRS_Nm_02540)

Note: The Control Bit Vector is initialized with 0x00 during initialization (also refer to
SWS_UdpNm_00085).

[SWS_UdpNm_00013] ⌈ The source node identifier shall be set with the configuration
parameter UDPNM_NODE_ID unless UDPNM_PDU_NID_POSITION is set to off. ⌋()

[SWS_UdpNm_00366]⌈ If the UdpNm performs a state change from BusSleep state


or PrepareBusSleep state to NetworkMode due to a call to
UdpNm_NetworkRequest() (i.e. due to an active wakeup) and
UdpNmActiveWakeupBitEnabled is TRUE, the UdpNm shall set the
ActiveWakeupBit in the CBV. ⌋()

[SWS_UdpNm_00367]⌈ If the UdpNm module leaves the NetworkMode and


UdpNmActiveWakeupBitEnabled is TRUE, the UdpNm module shall clear the
ActiveWakeupBit in the CBV.⌋()

43 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

7.10 Functional requirements on UdpNm API

[SWS_UdpNm_00014] {DRAFT}⌈If UdpNmRepeatMsgIndEnabled is set to TRUE


and the Repeat Message Request bit set to 1 is received UdpNm module shall call
the callback function Nm_RepeatMessageIndication. In case the Partial Network
Learning Bit is also received and UdpNmDynamicPncToChannelMappingEnabled
is set to TRUE the parameter pnLearningBitSet in this function call shall be set to
TRUE, otherwise to FALSE. ⌋(SRS_Nm_00153)

7.11 Car Wakeup

[SWS_UdpNm_00373]⌈ The position of the Car Wakeup bit in the NM-PDU is


defined by the configuration parameters UdpNmCarWakeUpBytePosition and
UdpNmCarWakeUpBitPosition.⌋()

[SWS_UdpNm_00374]⌈ If the Car Wakeup bit within any received NM-PDU is 1,


UdpNmCarWakeUpRxEnabled is TRUE, and UdpNmCarWakeUpFilterEnabled is
FALSE UdpNm shall call Nm_CarWakeUpIndication and perform the standard Rx
indication handling.⌋()

[SWS_UdpNm_00375]⌈ If UdpNm_GetPduData is called in the context of


Nm_CarWakeUpIndication and if UdpNmNodeDetectionEnabled or
UdpNmUserDataEnabled or UdpNmNodeIdEnabled is set to TRUE, UdpNm shall
return the PDU data of the PDU that causes the call of Nm_CarWakeUpIndication.
⌋()

Note: This is required to enable ECU to identify detail about the sender of the Car
Wakeup request

[SWS_UdpNm_00376]⌈ If UdpNmCarWakeUpFilterEnabled is TRUE, the Car


Wakeup bit within any received NM-PDU is 1, UdpNmCarWakeUpRxEnabled is
TRUE and the Node ID in the received NM-PDU is equal to
UdpNmCarWakeUpFilterNodeId the UdpNm module shall call
Nm_CarWakeUpIndication and perform the standard Rx Indication handling⌋()

Note: The Car Wakeup filter is necessary to realize sub gateways that only consider
the Car Wakeup of the central Gateway to avoid wrong wakeups

44 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

7.12 Error Classification


This section describes how the UdpNm module has to manage the error classes that
may occur during the life cycle of this basic software.
The general requirements document of AUTOSAR [2] specifies that all basic
software modules must distinguish (according to the product life cycle) two error
types:
Development errors: these errors should be detected and fixed during the
development phase. In most cases, these errors are software errors. The
detection errors that should only occur during development can be switched
off for production code (by static configuration, namely preprocessor
switches).
Production errors: these errors are hardware errors and software exceptions
that cannot be avoided and are expected to occur in the production (i.e.
series) code. This kind of error is commonly known as a run-time error.

[SWS_UdpNm_00223] ⌈ On errors and exceptions, the UdpNm module shall not


modify its current module state. ⌋()

7.12.1 Development Errors

[SWS_UdpNm_00018]⌈
Error
Type of error Related error code
value

API service used without module initialization UDPNM_E_UNINIT 0x01

UDPNM_E_INVALID_
API service called with wrong channel handle 0x02
CHANNEL

UDPNM_E_INVALID_
API service called with wrong PDU ID. 0x03
PDUID

UdpNm initialization has failed, e.g. selected configuration


UDPNM_E_INIT_FAILED 0x04
set doesn't exist

UDPNM_E_PARAM_
Null pointer has been passed as an argument 0x12
POINTER

⌋()

[SWS_UdpNm_00189] ⌈ Development errors shall not be returned by API functions;


in case of a development error, the respective API function will return E_NOT_OK, if
applicable. ⌋()

45 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

7.12.2 Run Time Errors

[SWS_UdpNm_00465]⌈
Error
Type of error Related error code
value

NM-Timeout timer has expired outside Ready Sleep


UDPNM_E_NETWORK_
State (either in Repeat Message state or in Normal 0x11
TIMEOUT
Operation state)

A NM message with PN Shutdown Request Bit was UDPNM_E_INVALID_PN_


received on a channel that is actively coordinated by the SYNC_SHUTDOWN_ 0x20
ComM PNC Gateway. REQUEST

⌋()

[SWS_UdpNm_00466] ⌈ When the NM-Timeout Timer expires in the Repeat


Message State, the UdpNm module shall report the runtime error
UDPNM_E_NETWORK_TIMEOUT to the Default Error Tracer. ⌋(SRS_Nm_00137)

[SWS_UdpNm_00467] ⌈ When the NM-Timeout Timer expires in the Normal


Operation State, the UdpNm module shall report runtime error
UDPNM_E_NETWORK_TIMEOUT to the Default Error Tracer. ⌋(SRS_Nm_00137)

7.12.3 Transient Faults

There are no transient faults.

7.12.4 Production Errors

There are no production errors.

7.12.5 Extended Production Errors

There are no extended production errors.

7.13 Scheduling of the main function


For details refer to the chapter 8.5 “Scheduled functions” in SWS_BSWGeneral.

46 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

7.14 Application notes

7.14.1 Wakeup notification

Wakeup notification is defined in detail in the ECU State Manager specification [11].

7.14.2 Coordination of coupled networks

[SWS_UdpNm_00185] ⌈ Support of bus synchronization on demand shall be


statically configurable with use of the UdpNmBusSynchronizationEnabled switch
(configuration parameter). ⌋()

Note: Since the shutdown of UdpNm can be done at any time, the call of the API
Nm_SynchronizationPoint is not supported.

7.15 Version check


For details refer to the chapter 5.1.8 “Version Check” in SWS_BSWGeneral.

7.16 Parameter check

[SWS_UdpNm_00196] ⌈ If detection of development errors is enabled by


UDPNM_DEV_ERROR_DETECT (configuration parameter), validity checks for all input
parameters shall be performed for each UDP NM API service call.⌋()

[SWS_UdpNm_00197] ⌈ Parameter type checking shall be performed at compile


time; if types do not match, the compilation process shall be stopped and respective
compilation warnings or errors shall be returned as far as supported by the compiler.
⌋()

[SWS_UdpNm_00198] ⌈ Parameter value check (for parameters of the constant


value) shall be performed at configuration time; if the value is invalid, the
configuration process shall be stopped and the respective configuration error shall be
reported. ⌋()

[SWS_UdpNm_00199] ⌈ Parameter value check (for parameters of the variable


value) shall be performed at execution time; if the value is invalid, execution of a
service shall be denied and the respective development error shall be reported. ⌋()

47 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

8 API specification

[SWS_UdpNm_00244] ⌈ The UdpNm module shall reject the execution of a service


called with an invalid parameter and shall inform the DET. ⌋()

AUTOSAR UdpNm API consists of services, which are UDP specific and can be
called whenever they are required; each service apart from UdpNm_Init refers to
one NM channel only.

[SWS_UdpNm_00190] ⌈ Production errors shall not be returned by API functions; in


case of a production error, the respective API function will return E_NOT_OK, if
applicable. ⌋()

[SWS_UdpNm_00192] ⌈ When NM API service with an invalid network handle is


called, the called function shall not be executed, but instead of that it shall report
UDPNM_E_INVALID_CHANNEL to the Default Error Tracer (if development error
detection is enabled) otherwise it shall return E_NOT_OK to the calling function⌋()

Note: The network handle is invalid if it is different from allowed configured values.

[SWS_UdpNm_00463] ⌈ When UdpNm Callback Notifications with an invalid Pdu ID


are called, the called function shall not be executed and E_NOT_OK shall be returned
if possible. If Development Error Detection is enabled then additionally UdpNm shall
report UDPNM_E_INVALID_PDUID to the Default Error Tracer. ⌋()

[SWS_UdpNm_00314] ⌈ If UdpNmComUserDataSupport is enabled and the


UdpNm User Data length does not match with the length of the referenced I-PDU an
error shall be reported at generation time. ⌋()

Note: NULL Pointer checking is specified within BSW General [21].

8.1 Imported Types


The following types of Std_Types.h are imported:
boolean
uint8
uint16
uint32

[]⌈
Module Header File Imported Type

ComStack_Types ComStack_Types.h NetworkHandleType

48 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

ComStack_Types.h PNCHandleType

ComStack_Types.h PduIdType

ComStack_Types.h PduInfoType

ComStack_Types.h PduLengthType

NmStack_types.h Nm_ModeType
Nm
NmStack_types.h Nm_StateType

Std_Types.h Std_ReturnType
Std
Std_Types.h Std_VersionInfoType

⌋()

8.2 Type Definitions

8.2.1 UdpNm_ConfigType

This type shall contain the parameters of the container UdpNm_GlobalConfig and
its sub containers.
[SWS_UdpNm_00308]⌈
Name UdpNm_ConfigType

Kind Structure

implementation specific

Type --
Elements
This type shall contain the parameters of the container UdpNm_Global
Comment
Config and its sub containers.

Description --

Available
UdpNm.h
via

⌋()

8.2.2 UdpNm_PduPositionType

[SWS_UdpNm_00304]⌈
Name UdpNm_PduPositionType

Kind Enumeration

Range UDPNM_PDU_BYTE_0 0x00 Byte 0 is used

49 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

UDPNM_PDU_BYTE_1 0x01 Byte 1 is used

UDPNM_PDU_OFF 0xFF Node Identification is not used

Description Used to define the position of the control bit vector within the NM PACKET.

Available via UdpNm.h

⌋()

8.3 Function definitions

8.3.1 UdpNm_Init

[SWS_UdpNm_00208]⌈
Service Name UdpNm_Init

void UdpNm_Init (
Syntax const UdpNm_ConfigType* UdpNmConfigPtr
)

Service ID
0x01
[hex]

Sync/Async Synchronous

Reentrancy Non Reentrant

Parameters
UdpNmConfigPtr Pointer to a selected configuration structure
(in)

Parameters
None
(inout)

Parameters
None
(out)

Return value None

Initialize the complete UdpNm module, i.e. all channels which are activated at
configuration time are initialized. A UDP socket shall be set up with the TCP/IP
Description stack.
Caveats: This function has to be called after initialization of the TCP/IP stack.
Configuration: Mandatory

Available via UdpNm.h

⌋()
[SWS_UdpNm_00210] ⌈ If an error has to be indicated to the DET the value 0x00
shall be used as the instance id. ⌋()
Rationale: the value 0 x 00 is not error value but instance ID

50 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

8.3.2 UdpNm_PassiveStartUp

[SWS_UdpNm_00211]⌈
Service Name UdpNm_PassiveStartUp

Std_ReturnType UdpNm_PassiveStartUp (
Syntax NetworkHandleType nmChannelHandle
)

Service ID
0x0e
[hex]

Sync/Async Asynchronous

Reentrancy Reentrant (but not for the same NM-Channel)

Parameters
nmChannelHandle Identification of the NM-channel
(in)

Parameters
None
(inout)

Parameters
None
(out)

E_OK: No error
Return value Std_ReturnType E_NOT_OK: Passive startup of network management has
failed

Passive startup of the AUTOSAR UdpNm. It triggers the transition from Bus-Sleep
Description Mode or Prepare Bus Sleep Mode to the Network Mode in Repeat Message State.
Caveats: UdpNm is initialized correctly.

Available via UdpNm.h

⌋()
[SWS_UdpNm_00147] ⌈If UdpNm_PassiveStartUp is called in the Network Mode,
the UdpNm module shall not execute this service and shall return E_NOT_OK.⌋()

8.3.3 UdpNm_NetworkRequest

[SWS_UdpNm_00213]⌈
Service Name UdpNm_NetworkRequest

Std_ReturnType UdpNm_NetworkRequest (
Syntax NetworkHandleType nmChannelHandle
)

Service ID [hex] 0x02

Sync/Async Asynchronous

Reentrancy Reentrant (but not for the same NM-Channel)

51 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Parameters (in) nmChannelHandle Identification of the NM-channel

Parameters
None
(inout)

Parameters
None
(out)

E_OK: No error
Return value Std_ReturnType
E_NOT_OK: Requesting of network has failed

Request the network, since ECU needs to communicate on the bus. Network
state shall be changed to 'requested'
Description
Caveats: UdpNm is initialized correctly.
Configuration: Optional (Only available if UdpNmPassiveModeEnabled == false)

Available via UdpNm.h

⌋()

8.3.4 UdpNm_NetworkRelease

[SWS_UdpNm_00214]⌈
Service Name UdpNm_NetworkRelease

Std_ReturnType UdpNm_NetworkRelease (
Syntax NetworkHandleType nmChannelHandle
)

Service ID [hex] 0x03

Sync/Async Asynchronous

Reentrancy Reentrant (but not for the same NM-Channel)

Parameters (in) nmChannelHandle Identification of the NM-channel

Parameters
None
(inout)

Parameters
None
(out)

E_OK: No error
Return value Std_ReturnType
E_NOT_OK: Releasing of network has failed

Release the network, since ECU doesn't have to communicate on the bus.
Network state shall be changed to 'released'.
Description
Caveats: UdpNm is initialized correctly.
Configuration: Optional (Only available if UdpNmPassiveModeEnabled == false)

Available via UdpNm.h

⌋()

52 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

8.3.5 UdpNm_DisableCommunication

[SWS_UdpNm_00215]⌈
Service Name UdpNm_DisableCommunication

Std_ReturnType UdpNm_DisableCommunication (
Syntax NetworkHandleType nmChannelHandle
)

Service ID [hex] 0x0c

Sync/Async Asynchronous

Reentrancy Reentrant (but not for the same NM-Channel)

nmChannel
Parameters (in) Identification of the NM-channel
Handle

Parameters
None
(inout)

Parameters (out) None

E_OK: No error
Return value Std_ReturnType E_NOT_OK: Disabling of NM PDU transmission ability has
failed

Disable the NM PDU transmission ability due to a ISO14229 Communication


Control (0x28) service
Description
Caveats: UdpNm is initialized correctly.
Configuration: Optional (Only available if UdpNmComControlEnabled == true)

Available via UdpNm.h

⌋(SRS_Nm_02512)
[SWS_UdpNm_00307] ⌈ If the module operates in passive mode
(UdpNmPassiveModeEnabled) the service UdpNm_DisableCommunication
shall have no effects and shall directly return E_NOT_OK. ⌋()

8.3.6 UdpNm_EnableCommunication

[SWS_UdpNm_00216]⌈
Service Name UdpNm_EnableCommunication

Std_ReturnType UdpNm_EnableCommunication (
Syntax NetworkHandleType nmChannelHandle
)

Service ID [hex] 0x0d

Sync/Async Asynchronous

Reentrancy Reentrant (but not for the same NM-Channel)

Parameters (in) nmChannelHandle Identification of the NM-channel

53 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Parameters
None
(inout)

Parameters (out) None

E_OK: No error
Return value Std_ReturnType E_NOT_OK: Enabling of NM PDU transmission ability has
failed

Enable the NM PDU transmission ability due to a ISO14229 Communication


Control (0x28) service
Description
Caveats: UdpNm is initialized correctly.
Configuration: Optional (Only available if UdpNmComControlEnabled == true).

Available via UdpNm.h

⌋(SRS_Nm_02512)
[SWS_UdpNm_00176] ⌈ The optional service UdpNm_EnableCommunication shall
enable the NM PDU transmission ability if the NM PDU transmission ability is
disabled. ⌋()

[SWS_UdpNm_00177] ⌈ The optional service UdpNm_EnableCommunication shall


return E_NOT_OK if the NM PDU transmission ability is already enabled when the
service is called. ⌋()

[SWS_UdpNm_00305] ⌈ The service UdpNm_EnableCommunication shall return


E_NOT_OK, if the current mode is not Network Mode. ⌋()

[SWS_UdpNm_00306] ⌈ If the module operates in passive mode


(UdpNmPassiveModeEnabled is TRUE) the service
UdpNm_EnableCommunication shall have no effects and shall directly return
E_NOT_OK. ⌋()

8.3.7 UdpNm_SetUserData

[SWS_UdpNm_00217]⌈
Service Name UdpNm_SetUserData

Std_ReturnType UdpNm_SetUserData (
NetworkHandleType nmChannelHandle,
Syntax const uint8* nmUserDataPtr
)

Service ID [hex] 0x04

Sync/Async Synchronous

Reentrancy Non Reentrant

54 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

nmChannel
Identification of the NM-channel
Handle
Parameters (in)
Pointer where the user data for the next transmitted NM
nmUserDataPtr
message shall be copied from.

Parameters
None
(inout)

Parameters
None
(out)

Std_Return- E_OK: No error


Return value
Type E_NOT_OK: Setting of user data has failed

Set user data for all NM messages transmitted on the bus after this function has
returned without error.
Description Caveats: UdpNm is initialized correctly.
Configuration: Optional (Only available if UdpNmUserDataEnabled==true and
UdpNmPassiveModeEnabled==false).

Available via UdpNm.h

⌋()

8.3.8 UdpNm_GetUserData

[SWS_UdpNm_00218]⌈
Service Name UdpNm_GetUserData

Std_ReturnType UdpNm_GetUserData (
NetworkHandleType nmChannelHandle,
Syntax
uint8* nmUserDataPtr
)

Service ID [hex] 0x05

Sync/Async Synchronous

Reentrancy Non Reentrant

nmChannel
Parameters (in) Identification of the NM-channel
Handle

Parameters
None
(inout)

Parameters nmUserData Pointer where user data out of the most recently received NM
(out) Ptr message shall be copied to.

Std_Return- E_OK: No error


Return value
Type E_NOT_OK: Getting of user data has failed

Get user data from the most recently received NM message.


Description Caveats: UdpNm is initialized correctly.
Configuration: Optional (Only available if UdpNmUserDataEnabled == true).

Available via UdpNm.h


55 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement
Specification of UDP Network Management
AUTOSAR CP R20-11

⌋()

8.3.9 UdpNm_GetNodeIdentifier

[SWS_UdpNm_00219]⌈
Service Name UdpNm_GetNodeIdentifier

Std_ReturnType UdpNm_GetNodeIdentifier (
NetworkHandleType nmChannelHandle,
Syntax
uint8* nmNodeIdPtr
)

Service ID
0x06
[hex]

Sync/Async Synchronous

Reentrancy Reentrant

Parameters nmChannel
Identification of the NM-channel
(in) Handle

Parameters
None
(inout)

Parameters nmNodeId Pointer where the source node identifier from the most recently
(out) Ptr received NM PDU shall be copied to.

E_OK: No error
Std_Return- E_NOT_OK: Getting of the node identifier out of the most recently
Return value
Type received NM PDU has failed or is not configured for this network
handle.

Get node identifier from the most recently received NM PDU.


Description
Caveats: UdpNm is initialized correctly.

Available via UdpNm.h

⌋()
[SWS_UdpNm_00132] ⌈ The service call UdpNm_GetNodeIdentifier shall
provide the node identifier out of the most recently received Network Management
PDU if UdpNmNodeIdEnabled is set to TRUE. ⌋()

8.3.10 UdpNm_GetLocalNodeIdentifier

[SWS_UdpNm_00220]⌈
Service Name UdpNm_GetLocalNodeIdentifier

Std_ReturnType UdpNm_GetLocalNodeIdentifier (
NetworkHandleType nmChannelHandle,
Syntax uint8* nmNodeIdPtr
)

56 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Service ID
0x07
[hex]

Sync/Async Synchronous

Reentrancy Reentrant

nmChannel
Parameters (in) Identification of the NM-channel
Handle

Parameters
None
(inout)

Parameters
nmNodeIdPtr Pointer where node identifier of the local node shall be copied to.
(out)

E_OK: No error
Std_Return-
Return value E_NOT_OK: Getting of the node identifier of the local node has
Type
failed or is not configured for this network handle.

Get node identifier configured for the local node.


Description
Caveats: UdpNm is initialized correctly.

Available via UdpNm.h

⌋()
[SWS_UdpNm_00133] ⌈ The service call UdpNm_GetLocalNodeIdentifier shall
provide the node identifier configured for the local host node if
UdpNmNodeIdEnabled is set to TRUE. ⌋()

8.3.11 UdpNm_RepeatMessageRequest

[SWS_UdpNm_00221]⌈
Service Name UdpNm_RepeatMessageRequest

Std_ReturnType UdpNm_RepeatMessageRequest (
Syntax NetworkHandleType nmChannelHandle
)

Service ID
0x08
[hex]

Sync/Async Asynchronous

Reentrancy Reentrant (but not for the same NM-Channel)

nmChannel
Parameters (in) Identification of the NM-channel
Handle

Parameters
None
(inout)

Parameters
None
(out)

Return value Std_Return- E_OK: No error


57 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement
Specification of UDP Network Management
AUTOSAR CP R20-11

Type E_NOT_OK: Setting of Repeat Message Request Bit has failed or


is not configured for this network handle.

Set Repeat Message Request Bit for all NM messages transmitted on the bus
Description
after this function has returned without error.

Available via UdpNm.h

⌋()

[SWS_UdpNm_00137] ⌈ If the service UdpNm_RepeatMessageRequest is called in


Repeat Message State, Prepare Bus-Sleep Mode or Bus-Sleep Mode, the UdpNm
module shall not execute the service and return E_NOT_OK. ⌋()

8.3.12 UdpNm_GetPduData

[SWS_UdpNm_00309]⌈
Service Name UdpNm_GetPduData

Std_ReturnType UdpNm_GetPduData (
NetworkHandleType nmChannelHandle,
Syntax uint8* nmPduDataPtr
)

Service ID [hex] 0x0a

Sync/Async Synchronous

Reentrancy Reentrant

nmChannel
Parameters (in) Identification of the NM-channel
Handle

Parameters
None
(inout)

Parameters
nmPduDataPtr Pointer where NM PDU shall be copied to.
(out)

E_OK: No error
Std_Return-
Return value E_NOT_OK: Getting of NM PDU Data has failed or is not
Type
configured for this network handle.

Get the whole PDU data out of the most recently received NM message.
Description
Caveats: UdpNm is initialized correctly.

Available via UdpNm.h

⌋()

[SWS_UdpNm_00138] ⌈ The service call UdpNm_GetPduData shall provide whole


payload (Source Node ID, Control Bit Vector and User Data) of the most recently

58 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

received Network Management PDU if UdpNmNodeDetectionEnabled or


UdpNmUserDataEnabled or UdpNmNodeIdEnabled is set to TRUE. ⌋()

8.3.13 UdpNm_GetState

[SWS_UdpNm_00310]⌈
Service Name UdpNm_GetState

Std_ReturnType UdpNm_GetState (
NetworkHandleType nmChannelHandle,
Syntax Nm_StateType* nmStatePtr,
Nm_ModeType* nmModePtr
)

Service ID [hex] 0x0b

Sync/Async Synchronous

Reentrancy Reentrant

nmChannel
Parameters (in) Identification of the NM-channel
Handle

Parameters
None
(inout)

Pointer where state of the network management shall be


nmStatePtr
copied to.
Parameters (out)
Pointer where the mode of the network management shall be
nmModePtr
copied to.

E_OK: No error
Return value Std_ReturnType
E_NOT_OK: Getting of NM state has failed

Returns the state and the mode of the network management.


Description Caveats: UdpNm is initialized correctly.
Configuration: Mandatory

Available via UdpNm.h

⌋()

8.3.14 UdpNm_GetVersionInfo

[SWS_UdpNm_00224]⌈
Service Name UdpNm_GetVersionInfo

void UdpNm_GetVersionInfo (
Syntax Std_VersionInfoType* versioninfo
)

Service ID [hex] 0x09

Sync/Async Synchronous
59 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement
Specification of UDP Network Management
AUTOSAR CP R20-11

Reentrancy Reentrant

Parameters (in) None

Parameters (inout) None

Parameters (out) versioninfo 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 UdpNm.h

⌋()
[SWS_UdpNm_00318] ⌈ If DET is enabled for the UdpNm module, the function
UdpNm_GetVersionInfo shall raise UDPNM_E_PARAM_POINTER, if the argument
versioninfo is a NULL pointer and return without any action. ⌋()

8.3.15 UdpNm_RequestBusSynchronization

[SWS_UdpNm_00226]⌈
Service Name UdpNm_RequestBusSynchronization

Std_ReturnType UdpNm_RequestBusSynchronization (
Syntax NetworkHandleType nmChannelHandle
)

Service ID
0x14
[hex]

Sync/Async Asynchronous

Reentrancy Non Reentrant

Parameters (in) nmChannelHandle Identification of the NM-channel

Parameters
None
(inout)

Parameters
None
(out)

E_OK: No error
Return value Std_ReturnType
E_NOT_OK: Requesting of bus synchronization has failed

Request bus synchronization.


Caveats: UdpNm is initialized correctly.
Description
Configuration: Optional (only available if UdpNmBusSynchronization
Enabled==true and UdpNmPassiveModeEnabled==false).

Available via UdpNm.h

⌋()

60 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

[SWS_UdpNm_00130] ⌈ The service call UdpNm_RequestBusSynchronization


shall trigger transmission of a single Network Management PDU if
UdpNmPassiveModeEnabled (configuration parameter) is FALSE. ⌋()

Rationale: This service is typically used for supporting the NM gateway extensions.

[SWS_UdpNm_00187] ⌈ If UdpNm_RequestBusSynchronization is called in


Bus-Sleep Mode and Prepare Bus-Sleep Mode the UdpNm module shall not execute
the service and shall return E_NOT_OK. ⌋()

8.3.16 UdpNm_CheckRemoteSleepIndication

[SWS_UdpNm_00227]⌈
Service Name UdpNm_CheckRemoteSleepIndication

Std_ReturnType UdpNm_CheckRemoteSleepIndication (
NetworkHandleType nmChannelHandle,
Syntax boolean* NmRemoteSleepIndPtr
)

Service ID [hex] 0x11

Sync/Async Synchronous

Reentrancy Reentrant (but not for the same NM-Channel)

Parameters (in) nmChannelHandle Identification of the NM-channel

Parameters
None
(inout)

NmRemoteSleep Pointer where check result of remote sleep indication shall


Parameters (out)
IndPtr be copied to.

E_OK: No error
Return value Std_ReturnType E_NOT_OK: Checking of remote sleep indication bits has
failed

Check if remote sleep indication takes place or not.


Caveats: UdpNm is initialized correctly.
Description
Configuration: Optional (only available if UdpNmRemoteSleepIndEnabled ==
true)

Available via UdpNm.h

⌋()
[SWS_UdpNm_00153] ⌈ The service call UdpNm_CheckRemoteSleepIndication
shall provide the information about current status of Remote Sleep Indication (i.e.
already detected or not). ⌋()

61 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

8.3.17 UdpNm_SetSleepReadyBit

[SWS_UdpNm_00324]⌈
Service Name UdpNm_SetSleepReadyBit

Std_ReturnType UdpNm_SetSleepReadyBit (
NetworkHandleType nmChannelHandle,
Syntax
boolean nmSleepReadyBit
)

Service ID [hex] 0x16

Sync/Async Synchronous

Reentrancy Non Reentrant

nmChannel
Identification of the NM-channel
Handle
Parameters (in)
nmSleepReadyBit Value written to ReadySleep Bit in CBV

Parameters
None
(inout)

Parameters (out) None

E_OK: No error
Return value Std_ReturnType E_NOT_OK: Writing of remote sleep indication bit has
failed

Description Set the NM Coordinator Sleep Ready bit in the Control Bit Vector

Available via UdpNm.h

⌋()

8.3.18 UdpNm_Transmit

[SWS_UdpNm_00313]⌈
Service Name UdpNm_Transmit

Std_ReturnType UdpNm_Transmit (
PduIdType TxPduId,
Syntax
const PduInfoType* PduInfoPtr
)

Service ID [hex] 0x49

Sync/Async Synchronous

Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.

TxPduId Identifier of the PDU to be transmitted


Parameters (in)
Length of and pointer to the PDU data and pointer to Meta
PduInfoPtr
Data.

62 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Parameters
None
(inout)

Parameters (out) None

Std_Return- E_OK: Transmit request has been accepted.


Return value
Type E_NOT_OK: Transmit request has not been accepted.

Description Requests transmission of a PDU.

Available via UdpNm.h

⌋()
[SWS_UdpNm_00315] ⌈ If UdpNmComUserDataSupport or UdpNmPnEnabled is
enabled the UdpNm implementation shall provide an API UdpNm_Transmit. ⌋
(SRS_Nm_02503)

8.3.19 UdpNm_PnLearningRequest

[SWS_UdpNm_91004]{DRAFT} ⌈
Service
UdpNm_PnLearningRequest (draft)
Name

Std_ReturnType UdpNm_PnLearningRequest (
Syntax NetworkHandleType nmChannelHandle
)

Service ID
0x4a
[hex]

Sync/Async Asynchronous

Reentrancy Reentrant (but not for the same NM-channel)

Parameters nmChannel
Identification of the NM-channel
(in) Handle

Parameters
None
(inout)

Parameters
None
(out)

E_OK: No error
Return value Std_ReturnType E_NOT_OK: PN Learning Requesthas failed or is not
configured for this network handle.

Set Repeat Message Request Bit and Partial Network Learning Bit for NM messages
transmitted next on the bus. This will force all nodes on the bus to enter the PNC
Description Learning Phase. This is needed for the optional Dynamic PNC-to-channel-mapping
feature.
Tags:atp.Status=draft

Available via UdpNm.h

63 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

⌋()

[SWS_UdpNm_00471]⌈ If the function UdpNm_PnLearningRequest is called in


“Prepare Bus-Sleep Mode” or “Bus Sleep Mode” no functionality shall be executed
and E_NOT_OK shall be returned.⌋()

8.3.20 UdpNm_RequestSynchronizedPncShutdown

[SWS_UdpNm_91002]{DRAFT} ⌈
Service Name UdpNm_RequestSynchronizedPncShutdown (draft)

Std_ReturnType UdpNm_RequestSynchronizedPncShutdown (
NetworkHandleType nmChannelHandle,
Syntax PNCHandleType pncId
)

Service ID [hex] 0x4b

Sync/Async Synchronous

Reentrant for different nmChannelHandle. Non reentrant for the same nmChannel
Reentrancy
Handle.

nmChannel Identifier of the NM-Channel where the given PNC (pncId) is


Handle assigned to.
Parameters (in)
Identifier of the PNC which is requested for a synchronized
pncId
shutdown across the PN topology

Parameters
None
(inout)

Parameters
None
(out)

Std_Return- E_OK: Request has been accepted.


Return value
Type E_NOT_OK: Request has not been accepted.

Requests transmission of a NM-PDU with PNSR bit set to 1 (PN shutdown


Description message)
Tags:atp.Status=draft

Available via UdpNm.h

⌋(SRS_Nm_02545)

[SWS_UdpNm_00479] {DRAFT} ⌈ If UdpNmSynchronizedPncShutdownEnabled


is set to TRUE the UdpNm implementation shall provide an API
UdpNm_RequestSynchronizedPncShutdown. ⌋( SRS_Nm_02503)

64 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

8.4 Call-back notifications

8.4.1 UdpNm_SoAdIfTxConfirmation

[SWS_UdpNm_00228]⌈
Service Name UdpNm_SoAdIfTxConfirmation

void UdpNm_SoAdIfTxConfirmation (
PduIdType TxPduId,
Syntax Std_ReturnType result
)

Service ID [hex] 0x40

Sync/Async Synchronous

Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.

TxPduId ID of the PDU that has been transmitted.


Parameters (in)
E_OK: The PDU was transmitted. E_NOT_OK: Transmission of the
result
PDU failed.

Parameters
None
(inout)

Parameters
None
(out)

Return value None

The lower layer communication interface module confirms the transmission of a


Description
PDU, or the failure to transmit a PDU.

Available via UdpNm.h

⌋()

Note: The callback function UdpNm_SoAdIfTxConfirmation is called by the SoAd


and is implemented by the UdpNm module.

Note: The callback function UdpNm_SoAdIfTxConfirmation is either called on


interrupt level (interrupt mode) or on task level (Polling Mode) with respect to the
context.

The value passed to UdpNm via the API parameter TxPduId shall refer to the NM
channel handle, i.e. a mapping from PduId to NM channel handle is not necessary.

[SWS_UdpNm_00316] ⌈ If UdpNmComUserDataSupport is enabled the UdpNm


shall call PduR_UdpNmTxConfirmation within the message transmission
confirmation function UdpNm_SoAdIfTxConfirmation called by the SoAd and with
result passed by SoAd ⌋()

65 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

8.4.2 UdpNm_SoAdIfRxIndication

[SWS_UdpNm_00231]⌈
Service Name UdpNm_SoAdIfRxIndication

void UdpNm_SoAdIfRxIndication (
PduIdType RxPduId,
Syntax
const PduInfoType* PduInfoPtr
)

Service ID
0x42
[hex]

Sync/Async Synchronous

Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.

RxPdu
ID of the received PDU.
Id
Parameters
(in) Contains the length (SduLength) of the received PDU, a pointer to a
Pdu
buffer (SduDataPtr) containing the PDU, and the MetaData related to this
InfoPtr
PDU.

Parameters
None
(inout)

Parameters
None
(out)

Return value None

Description Indication of a received PDU from a lower layer communication interface module.

Available via UdpNm.h

⌋()
The callback function UdpNm_SoAdIfRxIndication called by the SoAd and
implemented by the UdpNm module. It is called in case of a receive indication event
of the SoAd.

The value passed to UdpNm via the API parameter udpNmRxPduId shall refer to the
UdpNm channel handle, i.e. a mapping from PduId to UdpNm channel handle is not
necessary.

8.4.3 UdpNm_SoAdIfTriggerTransmit

[SWS_UdpNm_91001]⌈
Service
UdpNm_SoAdIfTriggerTransmit
Name

Std_ReturnType UdpNm_SoAdIfTriggerTransmit (
Syntax PduIdType TxPduId,
PduInfoType* PduInfoPtr

66 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Service ID
0x41
[hex]

Sync/Async Synchronous

Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId.

Parameters
TxPduId ID of the SDU that is requested to be transmitted.
(in)

Contains a pointer to a buffer (SduDataPtr) to where the SDU data shall


Parameters
PduInfoPtr be copied, and the available buffer size in SduLengh. On return, the
(inout)
service will indicate the length of the copied SDU data in SduLength.

Parameters
None
(out)

E_OK: SDU has been copied and SduLength indicates the number of
Std_-
copied bytes.
Return value Return-
E_NOT_OK: No SDU data has been copied. PduInfoPtr must not be
Type
used since it may contain a NULL pointer or point to invalid data.

Within this API, the upper layer module (called module) shall check whether the
available data fits into the buffer size reported by PduInfoPtr->SduLength. If it fits, it
Description shall copy its data into the buffer provided by PduInfoPtr->SduDataPtr and update
the length of the actual copied data in PduInfoPtr->SduLength. If not, it returns E_
NOT_OK without changing PduInfoPtr.

Available via UdpNm.h

⌋()

[SWS_UdpNm_00377] ⌈ If UdpNmComUserDataSupport is enabled the UdpNm


shall collect the NM User Data from the referenced NM I-PDU by calling
PduR_UdpNmTriggerTransmit and combine the user data with the further NM
bytes within the call of UdpNm_SoAdIfTriggerTransmit. ⌋(SRS_Nm_02503)

[SWS_UdpNm_00480] {DRAFT} ⌈ If UdpNmSynchronizedPncShutdownEnabled


is set to TRUE and requests for synchronized PNC shutdown are pending, then the
UdpNm module shall set for this message additionally the following data beneath the
normal data within the call of UdpNm_TriggerTransmit:
 Set the PNSR bit in the CBV to 1
 Overwrite the PN information in the user data (after NM User Data has been
fetched, if UdpNmComUserDataSupport is enabled) by setting bits that
correspond to PNC IDs stored as pending request for a synchronized PNC
shutdown to 1 and all other bits to 0.⌋( SRS_Nm_02545 )

Note: The UdpNm modul has to aggregate all PNCs which were indicated for a
synchronized PNC shutdown and transfer the pncId’s to a byte array (PN Info range).
Each bit (PN bit) of the PN Info range represent a particular PNC. The byteIndex and
bitindex within the PN Info range of PN bit shall be determined as follows:
 byteIndex = (PncId div 8)
67 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement
Specification of UDP Network Management
AUTOSAR CP R20-11

 bitIndex = (PncId mod 8)

[SWS_UdpNm_00378] ⌈ The function UdpNm_SoAdIfTriggerTransmit shall


copy the NM PDU data of the according NM PDU requested by TxPduId. ⌋()

Note: The function UdpNm_SoAdIfTriggerTransmit might be called by the SoAd


in an interrupt context.

8.5 Scheduled Functions

8.5.1 UdpNm_MainFunction_<Instance Id>

[SWS_UdpNm_00234]⌈
Service
UdpNm_MainFunction<Instance_Id>
Name

void UdpNm_MainFunction<Instance_Id> (
Syntax void
)

Service ID
0x13
[hex]

Main function of the UdpNm which processes the algorithm describes in that
document. E.g.:
Description
UdpNm_MainFunction_0() represents the UdpNm instance for the UDP channel 0
UdpNm_MainFunction_1() represents the UdpNm instance for the UDP channel 1

Available via SchM_UdpNm.h

⌋()

8.6 Expected Interfaces


In this chapter all interfaces required from other modules are listed.

8.6.1 Mandatory Interfaces

This chapter defines all interfaces which are required to fulfill the core functionality of
the module.
[]⌈
Header
API Function Description
File

Nm_BusSleep- Notification that the network management has entered Bus-Sleep


Nm.h
Mode Mode.

Nm_Network-
Nm.h Notification that the network management has entered Network Mode.
Mode

68 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

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


Nm_Network-
Nm.h Mode, what indicates that some nodes in the network have already
StartIndication
entered the Network Mode.

Nm_Prepare- Notification that the network management has entered Prepare Bus-
Nm.h
BusSleepMode Sleep Mode.

SoAd_If-
SoAd.h Requests transmission of a PDU.
Transmit

⌋()

69 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

8.6.2 Optional Interfaces

This chapter defines all interfaces which are required to fulfill an optional functionality
of the module.
[SWS_UdpNm_91006]⌈
Header
API Function Description
File

Det_ReportError Det.h Service to report development errors.

Nm_CarWakeUp- This function is called by a <Bus>Nm to indicate reception of a CWU


Nm.h
Indication request.

Nm_CoordReady-
Cancels an indication, when the NM Coordinator Sleep Ready bit in
ToSleep- Nm.h
the Control Bit Vector is set back to 0.
Cancellation

Nm_CoordReady- Sets an indication, when the NM Coordinator Sleep Ready bit in the
Nm.h
ToSleepIndication Control Bit Vector is set

Notification that the network management has received a PN


Nm_Forward-
shutdown message on a particular NM-channel. This is used to grant
Synchronized- Nm.h
a nearly synchronized PNC shutdown across the entire PN topology.
PncShutdown
Tags:atp.Status=draft

Nm_PduRx-
Nm.h Notification that a NM message has been received.
Indication

Nm_Remote- Notification that the network management has detected that not all
Sleep- Nm.h other nodes on the network are longer ready to enter Bus-Sleep
Cancellation Mode.

Nm_Remote- Notification that the network management has detected that all other
Nm.h
SleepIndication nodes on the network are ready to enter Bus-Sleep Mode.

Nm_Repeat- Service to indicate that an NM message with set Repeat Message


Message- Nm.h Re- quest Bit has been received. This is needed for node detection
Indication and the Dynamic PNC-to-channel-mapping feature.

Nm_State-
Change- Nm.h Notification that the state of the lower layer <BusNm> has changed.
Notification

Nm_TxTimeout-
Nm.h Service to indicate that an attempt to send an NM message failed.
Exception

PduR_
PduR_UdpNmRx- Indication of a received PDU from a lower layer communication
Udp
Indication interface module.
Nm.h

Within this API, the upper layer module (called module) shall check
whether the available data fits into the buffer size reported by PduInfo
PduR_
PduR_UdpNm- Ptr->SduLength. If it fits, it shall copy its data into the buffer provided
Udp
TriggerTransmit by PduInfoPtr->SduDataPtr and update the length of the actual
Nm.h
copied data in PduInfoPtr->SduLength. If not, it returns E_NOT_OK
without changing PduInfoPtr.

70 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

PduR_
PduR_UdpNmTx- The lower layer communication interface module confirms the
Udp
Confirmation transmission of a PDU, or the failure to transmit a PDU.
Nm.h

⌋()

8.6.3 Configurable interfaces

Not applicable

8.7 Service Interfaces


Not applicable

71 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

8.8 UML State chart diagram


The following figure shows an UML state diagram with respect to the API
specification. Mode change related transitions are denoted in green, error handling
related transitions in red and optional node detection related transitions in blue.

PowerOff PowerOff

UdpNm_Init()
/Initialization of UdpNm PowerOff

Bus-Sleep Mode Wait Bus Sleep Timer has expired Prepare Bus-Sleep Mode
/Nm_BusSleepMode()

UdpNm_SoAdRxIndication();
UdpNm_NetworkRequest();

UdpNm_SoAdRxIndication(); UdpNm_NetworkRequest();
/Nm_NetworkStartIndication(); UdpNm_PassiveStartUp(); Network
Mode UdpNm_PassiveStartUp();

UdpNm_SoAdRxIndication(); UdpNm_SoAdTxConfirmation(); NM-Timeout Timer has expired


/Start NM-Timeout Timer; /Start NM-Timeout Timer; /Start NM-Timeout Timer; /Start Wait Bus-Sleep Timer;
Start Repeat Message Timer; Nm_PrepareBusSleepMode();
Nm_NetworkMode();

Network Mode
UdpNm_NetworkRequest();
[UdpNmPnHandleMultipleNetworkRequests == TRUE]
/Start Repeat Message Timer

Repeat Message State


NM-Timeout Timer has expired
/Start NM-Timeout Timer;

Repeat Message Timer


has expired

Repeat Message Bit Received, Repeat Repeat Message Bit Received,


Message UdpNm_RepeatMessageRequest();
UdpNm_RepeatMessageRequest();
/Start Repeat Message Timer;
/Start Repeat Message Timer;

[Network Requested] [Network Released]

UdpNm_NetworkRequest();
[UdpNmPnHandleMultipleNetworkRequests
== FALSE]
Normal Operation State Ready Sleep State

UdpNm_NetworkRelease();

NM-Timeout Timer has expired


/Start NM-Timeout Timer;

Figure 6: State chart diagram.

72 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

9 Sequence diagrams and Transition Tables

9.1 UdpNmTransmission

«module» «module» Message Cycle Message Timeout «module»


Nm: Nm UdpNm: UdpNm Timer Timer SoAd: SoAd

loop repeated for every transmission

TimerExpired()

SoAd_IfTransmit(Std_ReturnType, PduIdType, const PduInfoType*)

SoAdIf_Transmit()

StartTimer(UdpNmMsgCycleTime)

UdpNm_SoAdIfTxConfirmation(PduIdType, Std_ReturnType)

UdpNm_SoAdIfTxConfirmation()

StartTimer(UdpNmTimeoutTime)

Figure 7: Sequence diagram – PDU transmission.

9.2 UdpNm Reception


Call direction Action/Decision Description
SoAd->UdpNm UdpNm_SoAdIfRxIndication()

73 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

«Module» Message Cycle Message Timeout «Module»


:UdpNm Timer Timer :SoAd

loop repeated for every transmission

UdpNm_SoAdIfRxIndication(PduIdType, PduInfoType*)

UdpNm_SoAdIfRxIndication()

StartTimer(UdpNmTimeoutTime)

Figure 8: Sequence diagram – PDU reception.

74 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

10 Configuration specification
In general, this chapter defines configuration parameters and their clustering into
containers. In order to support the specification chapter 10.1 describes fundamentals.
It also specifies a template (table) to be use for the parameter specification. Chapter
10.1 is intended to remain in the specification document to ensure
comprehensiveness.

Chapter 10.2 specifies the structure (containers) and the parameters of module
UdpNm.

Chapter 10.3 specifies published information of module UdpNm.

10.1 How to read this chapter


For details refer to the chapter 10.1 “Introduction to configuration specification” in
SWS_BSWGeneral.

10.2 Containers and configuration parameters


The configuration parameters as defined in this chapter are used to create a data
model for an AUTOSAR tool chain. The realization in the code is implementation
specific.

The configuration parameters as defined in this chapter are used to create a data
model for an AUTOSAR tool chain. The realization in the code is implementation
specific.

The configuration parameters are divided into parameters used to enable features,
parameters affecting all instances of the UdpNm and parameters affecting the
respective instances of the UdpNm.

[SWS_UdpNm_00026] ⌈ All configuration items shall be located outside the kernel of


the module. ⌋()

[SWS_UdpNm_00202] ⌈ The container UdpNm_ChannelConfig specifies


configuration parameter that shall be located in a data structure of type
UdpNm_ConfigType. ⌋()

[SWS_UdpNm_00203] ⌈ Runtime configurable parameters listed in container


UdpNm_ChannelConfig shall be configurable for each NM-cluster separately. ⌋()

75 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

10.2.1 UdpNm

SWS Item ECUC_UdpNm_00088 :


Module Name UdpNm
Module Description --
Post-Build Variant Support true
Supported Config Variants VARIANT-LINK-TIME, VARIANT-PRE-COMPILE

Included Containers
Container Name Multiplicity Scope / Dependency
This container contains all global configuration parameters of
UdpNmGlobalConfig 1
UDP NM configured from the CanTrcv Module perspective.

10.2.2 UdpNmGlobalConfig

SWS Item ECUC_UdpNm_00001 :


Container Name UdpNmGlobalConfig
Parent Container UdpNm
This container contains all global configuration parameters of UDP NM
Description
configured from the CanTrcv Module perspective.
Configuration Parameters

SWS Item ECUC_UdpNm_00006 :


Name UdpNmBusSynchronizationEnabled
Parent Container UdpNmGlobalConfig
Description Pre-processor switch for enabling bus synchronization support.
This feature is required for gateway nodes only.
It must not be defined if UdpNmPassiveModeEnabled==true.
This parameter shall be derived from NmBusSynchronizationEnabled.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_UdpNm_00013 :


Name UdpNmComControlEnabled
Parent Container UdpNmGlobalConfig
Description Pre-processor switch for enabling the Communication Control support.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --

76 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Scope / Dependency scope: local


dependency: calculationFormula = If (UdpNmPassiveModeEnabled ==
False) then Equal(NmComControlEnabled) else Equal(False)

SWS Item ECUC_UdpNm_00055 :


Name UdpNmComUserDataSupport
Parent Container UdpNmGlobalConfig
Description Enable/disable the user data support.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
dependency: If UdpNmPassiveModeEnabled == True then
UdpNmComUserDataSupport = False

SWS Item ECUC_UdpNm_00059 :


Name UdpNmCoordinatorSyncSupport
Parent Container UdpNmGlobalConfig
Description Enables/disables the coordinator synchronization support.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
dependency: UdpNmCoordinatorSyncSupport has to be set to FALSE if
UdpNmPassiveModeEnabled is set to TRUE.

SWS Item ECUC_UdpNm_00002 :


Name UdpNmDevErrorDetect
Parent Container UdpNmGlobalConfig
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 Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_UdpNm_00094 :


Name UdpNmDynamicPncToChannelMappingSupport
Parent Container UdpNmGlobalConfig
Description Precompile time switch to enable the dynamic PNC-to-channel-mapping
handling.
77 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement
Specification of UDP Network Management
AUTOSAR CP R20-11

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


True: Dynamic PNC-to-channel-mapping is enabled
Tags:
atp.Status=draft
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: ECU

SWS Item ECUC_UdpNm_00009 :


Name UdpNmImmediateRestartEnabled
Parent Container UdpNmGlobalConfig
Description Pre-processor switch for enabling the immediate transmission of a NM
PACKET upon bus-communication request in Prepare-Bus-Sleep mode.
Must not be defined if UdpNmPassiveModeEnabled== true.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_UdpNm_00014 :


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

SWS Item ECUC_UdpNm_00010 :


Name UdpNmPassiveModeEnabled
Parent Container UdpNmGlobalConfig
Description Pre-processor switch for enabling support of the Passive Mode.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_UdpNm_00011 :


78 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement
Specification of UDP Network Management
AUTOSAR CP R20-11

Name UdpNmPduRxIndicationEnabled
Parent Container UdpNmGlobalConfig
Description Pre-processor switch for enabling the PDU Rx Indication.
This parameter shall be derived from NmPduRxIndicationEnabled.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_UdpNm_00066 :


Name UdpNmPnEiraCalcEnabled
Parent Container UdpNmGlobalConfig
Description Specifies if UdpNm calculates the PN request information for internal and
external requests. (EIRA) true: PN request are calculated
false: PN request are not calculated
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: only available if UdpNmPnEnabled == true for at least one
UdpNm Channel

SWS Item ECUC_UdpNm_00065 :


Name UdpNmPnResetTime
Parent Container UdpNmGlobalConfig
Description Specifies the runtime of the reset timer in seconds. This reset time is valid
for the reset of PN requests in the EIRA and in the ERA. The value shall
be the same for every channel. Thus it is a global config parameter.
Multiplicity 0..1
Type EcucFloatParamDef
Range [0.001 .. 65.535]
Default value --
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --

79 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Scope / Dependency scope: local


dependency: only available if UdpNmPnEnabled == true for at least one
UdpNm Channel.

SWS Item ECUC_UdpNm_00096 :


Name UdpNmPnSyncShutdownErrorReactionEnabled
Parent Container UdpNmGlobalConfig
Description Pre-processor switch for enabling reaction, if a top-level PNC coordinator
received a PN shutdown message on a NM-channel which refer to a
ComM channel that is actively coordinated by a PNC gateway.
Tags:
atp.Status=draft
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local
dependency: This parameter shall only be set to TRUE if
UdpNmSynchronizedPncShutdownEnabled is set to TRUE on at least one
channel.

SWS Item ECUC_UdpNm_00005 :


Name UdpNmRemoteSleepIndEnabled
Parent Container UdpNmGlobalConfig
Description Pre-processor switch for enabling remote sleep indication support.
This feature is required for gateway nodes only.
It must not be defined if UdpNmPassiveModeEnabled==true.
This parameter shall be derived from NmRemoteSleepIndEnabled.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_UdpNm_00012 :


Name UdpNmStateChangeIndEnabled
Parent Container UdpNmGlobalConfig
Description Pre-processor switch for enabling the UDP NM state change notification.
This parameter shall be derived from NmStateChangeIndEnabled.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_UdpNm_00004 :


Name UdpNmUserDataEnabled

80 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Parent Container UdpNmGlobalConfig


Description Pre-processor switch for enabling user data support.
This parameter shall be derived from NmUserDataEnabled.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_UdpNm_00003 :


Name UdpNmVersionInfoApi
Parent Container UdpNmGlobalConfig
Description Pre-processor switch for enabling version info API support.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_UdpNm_00062 :


Name UdpNmPnEiraRxNSduRef
Parent Container UdpNmGlobalConfig
Description Reference to a Pdu in the COM-Stack. Only one SduRef is required for
UdpNm because the EIRA is the aggregation over all Ethernet Channels.
Multiplicity 0..1
Type Reference to [ Pdu ]
Post-Build Variant
false
Multiplicity
Post-Build Variant Value true
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --

81 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Scope / Dependency scope: local


dependency: only available if UdpNmPnEnabled == true for at least one
UdpNm Channel

Included Containers
Container Name Multiplicity Scope / Dependency
This container contains the channel-specific configuration
UdpNmChannelConfig 1..*
parameters of the UdpNm.
UdpNmPnInfo 0..1 PN information configuration

UdpNm: EcucModuleDef

lowerMultiplicity = 0
upperMultiplicity = 1

+container

UdpNmGlobalConfig:
UdpNmDevErrorDetect:
EcucParamConfContainerDef +parameter
EcucBooleanParamDef

defaultValue = false
UdpNmVersionInfoApi:
+parameter
EcucBooleanParamDef

defaultValue = false
+parameter UdpNmUserDataEnabled:
EcucBooleanParamDef

+parameter UdpNmRemoteSleepIndEnabled:
EcucBooleanParamDef

+parameter UdpNmBusSynchronizationEnabled:
EcucBooleanParamDef

+parameter UdpNmImmediateRestartEnabled:
EcucBooleanParamDef

+parameter UdpNmPassiveModeEnabled:
EcucBooleanParamDef

+parameter UdpNmPduRxIndicationEnabled:
EcucBooleanParamDef

+parameter UdpNmStateChangeIndEnabled:
EcucBooleanParamDef

+parameter UdpNmComControlEnabled:
EcucBooleanParamDef

UdpNmNumberOfChannels:
+parameter EcucIntegerParamDef

min = 1
max = 255
UdpNmComUserDataSupport:
EcucBooleanParamDef
+parameter

+parameter UdpNmCoordinatorSyncSupport:
EcucBooleanParamDef

+parameter UdpNmDynamicPncToChannelMappingSupport:
EcucBooleanParamDef

+parameter UdpNmPnSyncShutdownErrorReactionEnabled:
EcucBooleanParamDef

Figure 9: Diagram: UdpNmGlobalConfig

82 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

10.2.3 UdpNmChannelConfig

SWS Item ECUC_UdpNm_00017 :


Container Name UdpNmChannelConfig
Parent Container UdpNmGlobalConfig
This container contains the channel-specific configuration parameters of
Description
the UdpNm.
Configuration Parameters

SWS Item ECUC_UdpNm_00074 :


Name UdpNmActiveWakeupBitEnabled
Parent Container UdpNmChannelConfig
Description Enables/Disables the handling of the Active Wakeup Bit in the UdpNm
module.
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: This parameter is only valid if
UdpNmPassiveModeEnabled is False.

SWS Item ECUC_UdpNm_00089 :


Name UdpNmAllNmMessagesKeepAwake
Parent Container UdpNmChannelConfig
Description Specifies if UdpNm drops irrelevant NM PDUs.
false: Only NM PDUs with a PNI bit = true and containing a PN request for
this ECU triggers the standard RX indication handling

true: Every NM PDU triggers the standard RX indication handling


Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --

83 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Scope / Dependency scope: local


dependency: only available if UdpNmPnEnabled == true

SWS Item ECUC_UdpNm_00087 :


Name UdpNmCarWakeUpBitPosition
Parent Container UdpNmChannelConfig
Description Specifies the Bit position of the CWU within the NM PDU.
Multiplicity 0..1
Type EcucIntegerParamDef
Range 0 .. 7
Default value --
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: only available if UdpNmCarWakeUpRxEnabled == TRUE

SWS Item ECUC_UdpNm_00086 :


Name UdpNmCarWakeUpBytePosition
Parent Container UdpNmChannelConfig
Description Specifies the Byte position of the CWU within the NM PDU.
Multiplicity 0..1
Type EcucIntegerParamDef
Range 0 .. 7
Default value --
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: only available if UdpNmCarWakeUpRxEnabled == TRUE
UdpNmCarWakeupBytePosition ≥ number of enabled system bytes (CBV,
NID)

SWS Item ECUC_UdpNm_00077 :


Name UdpNmCarWakeUpFilterEnabled
Parent Container UdpNmChannelConfig
Description If CWU filtering is supported, only the CWU bit within the NM PDU with
source node identifier UdpNmCarWakeUpFilterNodeId is considered as
CWU request.
FALSE - CWU filtering is not supported
TRUE - CWU filtering is supported.
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false

84 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: only available if UdpNmCarWakeUpRxEnabled == TRUE

SWS Item ECUC_UdpNm_00078 :


Name UdpNmCarWakeUpFilterNodeId
Parent Container UdpNmChannelConfig
Description Source node identifier for CWU filtering. If CWU filtering is supported, only
the CWU bit within the NM PDU with source node identifier
UdpNmCarWakeUpFilterNodeId is considered as CWU request.
Multiplicity 0..1
Type EcucIntegerParamDef
Range 0 .. 255
Default value --
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: only available if UdpNmCarWakeUpFilterEnabled == TRUE

SWS Item ECUC_UdpNm_00076 :


Name UdpNmCarWakeUpRxEnabled
Parent Container UdpNmChannelConfig
Description Enables or disables support of CarWakeUp bit evaluation in received NM
PDUs.
FALSE - CarWakeUp not supported.
TRUE - CarWakeUp supported.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: ECU

SWS Item ECUC_UdpNm_00095 :


Name UdpNmDynamicPncToChannelMappingEnabled
Parent Container UdpNmChannelConfig
Description Channel-specific parameter to enable the dynamic PNC-to-channel-
mapping feature.
False: Dynamic PNC-to-channel-mapping is disabled

85 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

True: Dynamic PNC-to-channel-mapping is enabled


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

SWS Item ECUC_UdpNm_00079 :


Name UdpNmImmediateNmCycleTime
Parent Container UdpNmChannelConfig
Description Defines the immediate NM PDU cycle time in seconds which is used for
UdpNmImmediateNmTransmissions NM PDU transmissions.
Multiplicity 0..1
Type EcucFloatParamDef
Range [0.001 .. 65.535]
Default value --
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: This parameter is only valid if
UdpNmImmediateNmTransmissions is greater one.

SWS Item ECUC_UdpNm_00075 :


Name UdpNmImmediateNmTransmissions
Parent Container UdpNmChannelConfig
Description Defines the number of immediate NM PDUs which shall be transmitted. If
the value is zero no immediate NM PDUs are transmitted. The cycle time
of immeditate NM PDUs is defined by UdpNmImmediateNmCycleTime.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 255
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --

86 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Scope / Dependency scope: local


dependency: If UdpNmImmediateRestartEnabled = true then
UdpNmImmediateNmTransmissions = 0
If UdpNmPnHandleMultipleNetworkRequests == True then
UdpNmImmediateNmTransmissions > 0

SWS Item ECUC_UdpNm_00032 :


Name UdpNmMainFunctionPeriod
Parent Container UdpNmChannelConfig
Description Call cycle of UdpNm_MainFunction_x for the respective instance in [s].
Multiplicity 1
Type EcucFloatParamDef
Range ]0 .. INF[
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_UdpNm_00029 :


Name UdpNmMsgCycleOffset
Parent Container UdpNmChannelConfig
Description Time offset in the periodic transmission node. It determines the start delay
of the transmission.
< UdpNmMsgCycleTime

This parameter is only valid if UdpNmPassiveModeEnabled is disabled.


Multiplicity 1
Type EcucFloatParamDef
Range [0 .. 65.535]
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_UdpNm_00028 :


Name UdpNmMsgCycleTime
Parent Container UdpNmChannelConfig
Description Period of a NM-message. It determines the periodic rate and is the basis
for transmit scheduling.
NmTimeoutTime = n * UdpNmMsgCycleTime
This parameter is only valid if UdpNmPassiveModeEnabled is disabled.
Multiplicity 1
Type EcucFloatParamDef
Range [0.001 .. 65.535]
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_UdpNm_00090 :

87 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Name UdpNmNodeDetectionEnabled
Parent Container UdpNmChannelConfig
Description Pre-processor switch for enabling the node detection support.
This parameter shall be derived from NmNodeDetectionEnabled.
This parameter shall only be enabled if UdpNmNodeIdEnabled == true.

If(UdpNmPduCbvPosition != UDPNM_PDU_OFF) then


Equal(NmNodeDetectionEnabled) else Equal(False).
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: Not available if UdpNmPassiveModeEnabled

SWS Item ECUC_UdpNm_00031 :


Name UdpNmNodeId
Parent Container UdpNmChannelConfig
Description Node identifier of local node.
Multiplicity 0..1
Type EcucIntegerParamDef
Range 0 .. 255
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: This parameter is only relevant if UdpNmNodeIdEnabled ==
True.

SWS Item ECUC_UdpNm_00091 :


Name UdpNmNodeIdEnabled
Parent Container UdpNmChannelConfig
Description Pre-processor switch for enabling the source node identifier.
This parameter shall be derived from NmNodeIdEnabled.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_UdpNm_00026 :


Name UdpNmPduCbvPosition
Parent Container UdpNmChannelConfig
Description Defines the position of the control bit vector within the NM PACKET.
The value of the parameter represents the location of the control bit vector in the
NM PACKET (UDPNM_PDU_BYTE_0 means byte 0, UDPNM_PDU_BYTE_1
means byte 1, UDPNM_PDU_OFF means the control bit vector is not part of the
NM PACKET)

88 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

See also UdpNmPduNidPosition

if (UdpNmPduCbvPosition != UDPNM_PDU_OFF && UdpNmPduNidPosition !=


UDPNM_PDU_OFF) then UdpNmPduCbvPosition != UdpNmPduNidPosition

if (UdpNmPduCbvPosition != UDPNM_PDU_OFF && UdpNmPduNidPosition ==


UDPNM_PDU_OFF) then UdpNmPduCbvPosition = UDPNM_PDU_BYTE0
Multiplicity 1
Type EcucEnumerationParamDef
Range UDPNM_PDU_BYTE_0 --
UDPNM_PDU_BYTE_1 --
UDPNM_PDU_OFF --
Post-Build Variant
false
Value
Value Pre-compile time X VARIANT-PRE-COMPILE
Configuration Link time X VARIANT-LINK-TIME
Class Post-build time --
Scope / scope: local
Dependency

SWS Item ECUC_UdpNm_00025 :


Name UdpNmPduNidPosition
Parent Container UdpNmChannelConfig
Description Defines the position of the source node identifier within the NM PACKET.
ImplementationType: UdpNm_PduPositionType

The value of the parameter represents the location of the source node identifier in
the NM PACKET (UDPNM_PDU_BYTE_0 means byte 0, UDPNM_PDU_BYTE_1
means byte 1, UDPNM_PDU_OFF means source node identifier is not part of the
NM PACKET)

See also UdpNmPduCbvPosition


if (UDPNM_PDU_NID_POSITION != UDPNM_PDU_OFF &&
UDPNM_PDU_CBV_POSITION != UDPNM_PDU_OFF) then
UDPNM_PDU_NID_POSITION != UDPNM_PDU_CBV_POSITION

if (UDPNM_PDU_NID_POSITION != UDPNM_PDU_OFF &&


UDPNM_PDU_CBV_POSITION == UDPNM_PDU_OFF) then
UDPNM_PDU_IND_POSITION = UDPNM_PDU_BYTE0
Multiplicity 1
Type EcucEnumerationParamDef
Range UDPNM_PDU_BYTE_0 Byte 0 is used.
UDPNM_PDU_BYTE_1 Byte 1 is used.
UDPNM_PDU_OFF Node Identification is not used.
Post-Build Variant
false
Value
Value Pre-compile time X VARIANT-PRE-COMPILE
Configuration Link time X VARIANT-LINK-TIME
Class Post-build time --
Scope / scope: local
Dependency

SWS Item ECUC_UdpNm_00061 :


Name UdpNmPnEnabled
Parent Container UdpNmChannelConfig
Description Enables or disables support of partial networking.
false: Partial networking Range not supported
89 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement
Specification of UDP Network Management
AUTOSAR CP R20-11

true: Partial networking supported


Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: only available if UdpNmPnEnabled == true

SWS Item ECUC_UdpNm_00060 :


Name UdpNmPnEraCalcEnabled
Parent Container UdpNmChannelConfig
Description Specifies if UdpNm calculates the PN request information for external
requests. (ERA)
false: PN request are not calculated
true: PN request are calculated.
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: only available if UdpNmPnEnabled == true

SWS Item ECUC_UdpNm_00063 :


Name UdpNmPnHandleMultipleNetworkRequests
Parent Container UdpNmChannelConfig
Description false: UdpNm_NetworkRequest is ignored in NO.
true: UdpNm_NetworkRequest triggers a change from NO to RM.
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --

90 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Scope / Dependency scope: local


dependency: only available if UdpNmPnEnabled == true

SWS Item ECUC_UdpNm_00023 :


Name UdpNmRemoteSleepIndTime
Parent Container UdpNmChannelConfig
Description Timeout for Remote Sleep Indication.
It defines the time in [s] how long it shall take to recognize that all other
nodes are ready to sleep.

Typically it should be equal to: n * UdpNmMsgCycleTime, where n denotes


the number of NM packets that are normally sent before Remote Sleep
Indication is detected.
The value of n decremented by one determines the amount of lost NM
packets that can be tolerated by the Remote Sleep Indication procedure.
Multiplicity 1
Type EcucFloatParamDef
Range [0.001 .. 65.535]
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_UdpNm_00022 :


Name UdpNmRepeatMessageTime
Parent Container UdpNmChannelConfig
Description Timeout for Repeat Message State.
It defines the time in seconds how long the NM shall stay in the Repeat
Message State.
Multiplicity 1
Type EcucFloatParamDef
Range [0 .. 65.535]
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: UdpNmRepeatMessageTime = n * UdpNmMsgCycleTime;
UdpNmRepeatMessageTime > UdpNmImmediateNmTransmissions *
UdpNmImmediateNmCycleTime

Typically it should be equal to: n * UdpNmMsgCycleTime, where n denotes


the number of NM PDUs that are normally sent in the Repeat Message
State.
The value of n decremented by one determines the amount of lost NM
PDUs that can be tolerated by the node detection procedure. The value 0
denotes that no Repeat Message State is configured. It means that Repeat
Message State is transient what implicates that it is left immediately after
entrance and in result no start-up stability is guaranteed and no node
detection procedure is possible.

SWS Item ECUC_UdpNm_00092 :


Name UdpNmRepeatMsgIndEnabled
Parent Container UdpNmChannelConfig

91 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Description Enable/disable the notification that a RepeatMessageRequest bit has been


received.
Multiplicity 1
Type EcucBooleanParamDef
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: UdpNmRepeatMsgIndEnabled = FALSE if
UdpNmPassiveModeEnabled == TRUE or (CanNmNodeDetectionEnabled
== FALSE && UdpNmDynamicPncToChannelMappingEnabled ==
FALSE).
UdpNmRepeatMsgIndEnabled = TRUE if
UdpNmDynamicPncToChannelMappingEnabled == TRUE

SWS Item ECUC_UdpNm_00085 :


Name UdpNmRetryFirstMessageRequest
Parent Container UdpNmChannelConfig
Description Specifies if first message request in UdpNm is repeated until accepted by
SoAd.
Multiplicity 0..1
Type EcucBooleanParamDef
Default value --
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: UdpNmRetryFirstMessageRequest = false if
UdpNmPassiveModeEnabled == true

SWS Item ECUC_UdpNm_00093 :


Name UdpNmStayInPbsEnabled
Parent Container UdpNmChannelConfig
Description If this parameter is disabled Prepare Bus-Sleep Mode is left after
UdpNmWaitBusSleepTime. If this parameter is enabled Prepare Bus-
Sleep Mode can only be left if ECU is powered off or any restart reason
applies.
Multiplicity 1
Type EcucBooleanParamDef
Default value false
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_UdpNm_00097 :


Name UdpNmSynchronizedPncShutdownEnabled

92 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Parent Container UdpNmChannelConfig


Description Specifies if UdpNm handle PN shutdown messages to support a
synchronized PNC shutdown across a PN topology. This is only used for
ECUs in the role of a top-level PNC coordinator or intermediate PNC
coordinator. Thus, the PNC gateway functionality is enabled and therefore
ERA calculation is used.
FALSE: synchronized PNC shutdown is disabled

TRUE: synchronized PNC shutdown is enabled


Tags:
atp.Status=draft
Multiplicity 0..1
Type EcucBooleanParamDef
Default value false
Post-Build Variant
false
Multiplicity
Post-Build Variant Value false
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: Only available if UdpNmPnEnabled == TRUE and
UdpNmPnEraCalcEnabled == TRUE.

SWS Item ECUC_UdpNm_00020 :


Name UdpNmTimeoutTime
Parent Container UdpNmChannelConfig
Description Network Timeout for NM packets.
It denotes the time in [s] how long the NM shall stay in the Network Mode
before transition into Prepare Bus-Sleep Mode shall take place.

It shall be equal for all nodes in the cluster.


It shall be greater than UdpNmMsgCycleTime.
Typically, it should be equal to: x * UdpNmMsgCycleTime, where n
denotes the number of NM PACKET cycle times in the Ready Sleep State
before transition into the Bus-Sleep Mode is initiated.
The value of n decremented by one determines the amount of lost NM
packets that can be tolerated by the coordination algorithm.
Multiplicity 1
Type EcucFloatParamDef
Range [0.002 .. 65.535]
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_UdpNm_00021 :


Name UdpNmWaitBusSleepTime
Parent Container UdpNmChannelConfig
Description Timeout for bus calm down phase.
It denotes the time in [s] how long the NM shall stay in the Prepare Bus-
Sleep Mode before transition into Bus-Sleep Mode shall take place.

93 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

It shall be equal for all nodes in the cluster.


It shall be long enough to empty all Tx-buffer empty.
Multiplicity 0..1
Type EcucFloatParamDef
Range [0.001 .. 65.535]
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: In case UdpNmStayInPbsEnabled is disabled this parameter
shall be mandatory.

SWS Item ECUC_UdpNm_00018 :


Name UdpNmComMNetworkHandleRef
Parent Container UdpNmChannelConfig
Description This reference points to the unique channel defined by the ComMChannel
and provides access to the unique channel index value in
ComMChannelId.
Multiplicity 1
Type Symbolic name reference to [ ComMChannel ]
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: ECU

SWS Item ECUC_UdpNm_00073 :


Name UdpNmPnEraRxNSduRef
Parent Container UdpNmChannelConfig
Description Reference to a Pdu in the COM-Stack. The SduRef is required for every
UdpNm Channel, because ERA is reported per channel.
Multiplicity 0..1
Type Reference to [ Pdu ]
Post-Build Variant
false
Multiplicity
Post-Build Variant Value true
Multiplicity Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class Link time X VARIANT-LINK-TIME
Post-build time --
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --

94 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Scope / Dependency scope: local


dependency: only available if UdpNmPnEnabled == true

Included Containers
Container Name Multiplicity Scope / Dependency
UdpNmRxPdu 1..* This container describes the UdpNm RX PDU's.
UdpNmTxPdu 0..1 This container describes the UdpNm TX PDU's.
Preprocessor switch for enabling the Tx path of Com User
UdpNmUserDataTxPdu 0..1 Data.
Use case: Setting of NMUserData via SWC.

95 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

UdpNmChannelConfig:
UdpNmComMNetworkHandleRef: ComMChannel:
EcucParamConfContainerDef +reference +destination
EcucReferenceDef EcucParamConfContainerDef
lowerMultiplicity = 1
requiresSymbolicNameValue = true lowerMultiplicity = 1
upperMultiplicity = *
upperMultiplicity = 256

UdpNmTimeoutTime:
+parameter EcucFloatParamDef

min = 0.002
UdpNmWaitBusSleepTime:
max = 65.535
EcucFloatParamDef
+parameter
min = 0.001
max = 65.535
UdpNmRepeatMessageTime: lowerMultiplicity = 0
upperMultiplicity = 1
+parameter EcucFloatParamDef

min = 0.0
max = 65.535
UdpNmRemoteSleepIndTime:
+parameter EcucFloatParamDef

min = 0.001
max = 65.535

UdpNmPduNidPosition: +literal UDPNM_PDU_BYTE_0:


EcucEnumerationParamDef EcucEnumerationLiteralDef

+parameter +literal UDPNM_PDU_BYTE_1:


EcucEnumerationLiteralDef

+literal UDPNM_PDU_OFF:
EcucEnumerationLiteralDef

UdpNmPduCbvPosition: +literal UDPNM_PDU_BYTE_0:


EcucEnumerationParamDef EcucEnumerationLiteralDef

+parameter +literal UDPNM_PDU_BYTE_1:


EcucEnumerationLiteralDef

+literal UDPNM_PDU_OFF:
EcucEnumerationLiteralDef

UdpNmImmediateNmCycleTime:
EcucFloatParamDef
+parameter
min = 0.001
max = 65.535
lowerMultiplicity = 0
upperMultiplicity = 1 UdpNmMsgCycleTime:
+parameter EcucFloatParamDef

min = 0.001
max = 65.535
UdpNmMsgCycleOffset:
+parameter EcucFloatParamDef

min = 0.0
max = 65.535
UdpNmStayInPbsEnabled:
EcucBooleanParamDef
+parameter
defaultValue = false
lowerMultiplicity = 1
UdpNmNodeId:
EcucIntegerParamDef upperMultiplicity = 1
+parameter
min = 0
max = 255
lowerMultiplicity = 0 UdpNmMainFunctionPeriod:
upperMultiplicity = 1 +parameter EcucFloatParamDef

min = 0
max = INF

UdpNmTxPdu:
EcucParamConfContainerDef +reference UdpNmTxPduRef: +destination Pdu:
EcucReferenceDef EcucParamConfContainerDef
lowerMultiplicity = 0
+subContainer upperMultiplicity = 1 lowerMultiplicity = 0
upperMultiplicity = *
UdpNmTxConfirmationPduId:
+parameter EcucIntegerParamDef

min = 0
max = 4294967296
symbolicNameValue = true

UdpNmRxPdu: UdpNmRxPduId:
EcucParamConfContainerDef EcucIntegerParamDef
+parameter
lowerMultiplicity = 1 min = 0
+subContainer upperMultiplicity = * max = 4294967296
symbolicNameValue = true

+reference UdpNmRxPduRef: +destination


EcucReferenceDef

UdpNmUserDataTxPdu: UdpNmTxUserDataPduRef:
+reference EcucReferenceDef +destination
EcucParamConfContainerDef

lowerMultiplicity = 0 lowerMultiplicity = 1
+subContainer upperMultiplicity = 1
upperMultiplicity = 1

+parameter UdpNmTxUserDataPduId:
EcucIntegerParamDef

min = 0
max = 65535
symbolicNameValue = true
UdpNmActiveWakeupBitEnabled:
EcucBooleanParamDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = 1
defaultValue = False UdpNmImmediateNmTransmissions:
EcucIntegerParamDef
+parameter
min = 0
max = 255

UdpNmRetryFirstMessageRequest:
EcucBooleanParamDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = 1

UdpNmCarWakeUpBytePosition:
EcucIntegerParamDef
+parameter
min = 0
max = 7
UdpNmCarWakeUpBitPosition: lowerMultiplicity = 0
EcucIntegerParamDef upperMultiplicity = 1
+parameter
min = 0
max = 7
lowerMultiplicity = 0
upperMultiplicity = 1

UdpNmCarWakeUpRxEnabled:
+parameter
EcucBooleanParamDef

defaultValue = false

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

UdpNmCarWakeUpFilterNodeId:
EcucIntegerParamDef
+parameter
min = 0
max = 255
lowerMultiplicity = 0
upperMultiplicity = 1

+parameter UdpNmAllNmMessagesKeepAwake:
EcucBooleanParamDef

+parameter UdpNmNodeDetectionEnabled: lowerMultiplicity = 0


EcucBooleanParamDef upperMultiplicity = 1
defaultValue = false

+parameter UdpNmNodeIdEnabled:
EcucBooleanParamDef
UdpNmSynchronizedPncShutdownEnabled:
+parameter
EcucBooleanParamDef

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

+parameter UdpNmDynamicPncToChannelMappingEnabled:
EcucBooleanParamDef

defaultValue = false
lowerMultiplicity = 0
upperMultiplicity = 1

96 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

Figure 10: UdpNmChannelConfig

10.2.4 UdpNmRxPdu

SWS Item ECUC_UdpNm_00038 :


Container Name UdpNmRxPdu
Parent Container UdpNmChannelConfig
Description This container describes the UdpNm RX PDU's.
Configuration Parameters

SWS Item ECUC_UdpNm_00043 :


Name UdpNmRxPduId
Parent Container UdpNmRxPdu
Description ID of the RxPdu that will be used by a RxIndication of the lower layer.
Multiplicity 1
Type EcucIntegerParamDef (Symbolic Name generated for this parameter)
Range 0 .. 4294967296
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_UdpNm_00039 :


Name UdpNmRxPduRef
Parent Container UdpNmRxPdu
Description The reference to a PDU in the global PDU structure described in the
AUTOSAR ECU Configuration Specification. This reference will be used by
the UdpNm module to derive the PDU Id.
Multiplicity 1
Type Reference to [ Pdu ]
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local

No Included Containers

97 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

10.2.5 UdpNmTxPdu

SWS Item ECUC_UdpNm_00036 :


Container Name UdpNmTxPdu
Parent Container UdpNmChannelConfig
Description This container describes the UdpNm TX PDU's.
Configuration Parameters

SWS Item ECUC_UdpNm_00042 :


Name UdpNmTxConfirmationPduId
Parent Container UdpNmTxPdu
Description Id of the TxPdu that will be used by a TxConfirmation from the lower layer.
Multiplicity 1
Type EcucIntegerParamDef (Symbolic Name generated for this parameter)
Range 0 .. 4294967296
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_UdpNm_00037 :


Name UdpNmTxPduRef
Parent Container UdpNmTxPdu
Description The reference to a PDU in the global PDU structure described in the
AUTOSAR ECU Configuration Specification. This reference will be used by
the UdpNm module to derive the PDU Id.
Multiplicity 1
Type Reference to [ Pdu ]
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local

No Included Containers

98 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

10.2.6 UdpNmUserDataTxPdu

SWS Item ECUC_UdpNm_00056 :


Container Name UdpNmUserDataTxPdu
Parent Container UdpNmChannelConfig
Preprocessor switch for enabling the Tx path of Com User Data.
Description
Use case: Setting of NMUserData via SWC.
Configuration Parameters

SWS Item ECUC_UdpNm_00058 :


Name UdpNmTxUserDataPduId
Parent Container UdpNmUserDataTxPdu
Description This parameter defines the Handle ID of the NM User Data I-PDU.
Multiplicity 1
Type EcucIntegerParamDef (Symbolic Name generated for this parameter)
Range 0 .. 65535
Default value --
Post-Build Variant Value false
Value Configuration Class Pre-compile time X All Variants
Link time --
Post-build time --
Scope / Dependency scope: local

SWS Item ECUC_UdpNm_00057 :


Name UdpNmTxUserDataPduRef
Parent Container UdpNmUserDataTxPdu
Description Reference to the NM User Data I-PDU in the global PDU collection.
Multiplicity 1
Type Reference to [ Pdu ]
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local

No Included Containers

99 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

10.2.7 UdpNmPnInfo

SWS Item ECUC_UdpNm_00067 :


Container Name UdpNmPnInfo
Parent Container UdpNmGlobalConfig
Description PN information configuration
Configuration Parameters

SWS Item ECUC_UdpNm_00069 :


Name UdpNmPnInfoLength
Parent Container UdpNmPnInfo
Description Specifies the length of the PN request information in the NM message.
Multiplicity 1
Type EcucIntegerParamDef
Range 1 .. 63
Default value 1
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: only available if UdpNmPnEnabled == true for at least one
UdpNm Channel.

SWS Item ECUC_UdpNm_00068 :


Name UdpNmPnInfoOffset
Parent Container UdpNmPnInfo
Description Specifies the offset of the PN request information in the NM message.
Multiplicity 1
Type EcucIntegerParamDef
Range 1 .. 63
Default value 1
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: only available if UdpNmPnEnabled == true for at least one
UdpNm Channel.

Included Containers
Container Name Multiplicity Scope / Dependency
UdpNmPnFilterMaskByte 1..63 PN information configuration

100 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

UdpNmGlobalConfig: UdpNmPnResetTime:
EcucParamConfContainerDef EcucFloatParamDef
+parameter
min = 0.001
max = 65.535
lowerMultiplicity = 0 UdpNmPnEiraCalcEnabled:
upperMultiplicity = 1 EcucBooleanParamDef
+parameter
defaultValue = false
lowerMultiplicity = 0
upperMultiplicity = 1

UdpNmPnInfo:
UdpNmPnInfoOffset:
EcucParamConfContainerDef
EcucIntegerParamDef
+parameter
upperMultiplicity = 1
min = 1
lowerMultiplicity = 0
max = 63
defaultValue = 1

UdpNmPnInfoLength:
EcucIntegerParamDef
+parameter
+subContainer min = 1
max = 63
defaultValue = 1 UdpNmPnFilterMaskByteIndex:
EcucIntegerParamDef

UdpNmPnFilterMaskByte: +parameter min = 0


EcucParamConfContainerDef max = 63

+subContainer lowerMultiplicity = 1
upperMultiplicity = 63
+parameter UdpNmPnFilterMaskByteValue:
EcucIntegerParamDef

min = 0
max = 255
defaultValue = 0

Pdu:
+reference UdpNmPnEiraRxNSduRef:
EcucReferenceDef +destination EcucParamConfContainerDef

lowerMultiplicity = 0 lowerMultiplicity = 0
upperMultiplicity = 1 upperMultiplicity = *

+subContainer

UdpNmPnEraRxNSduRef:
UdpNmChannelConfig: +destination
+reference EcucReferenceDef
EcucParamConfContainerDef

lowerMultiplicity = 1 lowerMultiplicity = 0
upperMultiplicity = * upperMultiplicity = 1

+parameter UdpNmPnEnabled:
EcucBooleanParamDef

UdpNmPnHandleMultipleNetworkRequests: defaultValue = false


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

Figure 12: Diagram: UdpNmPNConfig

101 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

10.2.8 UdpNmPnFilterMaskByte

SWS Item ECUC_UdpNm_00070 :


Container Name UdpNmPnFilterMaskByte
Parent Container UdpNmPnInfo
Description PN information configuration
Configuration Parameters

SWS Item ECUC_UdpNm_00071 :


Name UdpNmPnFilterMaskByteIndex
Parent Container UdpNmPnFilterMaskByte
Description Index of the filter mask byte. Specifies the position within the filter mask
byte array.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 63
Default value --
Post-Build Variant Value true
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: only available if UdpNmPnEnabled == true for at least one
UdpNm Channel. UdpNmPnFilterMaskByteIndex < UdpNmPnInfoLength

SWS Item ECUC_UdpNm_00072 :


Name UdpNmPnFilterMaskByteValue
Parent Container UdpNmPnFilterMaskByte
Description Parameter to configure the filter mask byte.
Multiplicity 1
Type EcucIntegerParamDef
Range 0 .. 255
Default value 0
Post-Build Variant Value false
Value Configuration Class Pre-compile time X VARIANT-PRE-COMPILE
Link time X VARIANT-LINK-TIME
Post-build time --
Scope / Dependency scope: local
dependency: only available if UdpNmPnEnabled == true for at least one
UdpNm Channel; UdpNmPnFilterMaskByteIndex < UdpNmPnInfoLength

No Included Containers

10.3 Published parameters


For details refer to the chapter 10.3 “Published Information” in SWS_BSWGeneral.

102 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement


Specification of UDP Network Management
AUTOSAR CP R20-11

11 Not applicable requirements

[SWS_UdpNm_NA_00999] ⌈ This specification item references requirements that are


not applicable to this specification. ⌋ (SRS_BSW_00170, SRS_BSW_00375,
SRS_BSW_00416, SRS_BSW_00168, SRS_BSW_00423, SRS_BSW_00424,
SRS_BSW_00425, SRS_BSW_00426, SRS_BSW_00427, SRS_BSW_00429,
SRS_BSW_00432, SRS_BSW_00336, SRS_BSW_00417, SRS_BSW_00161,
SRS_BSW_00162, SRS_BSW_00005, SRS_BSW_00415, SRS_BSW_00164,
SRS_BSW_00325, SRS_BSW_00160, SRS_BSW_00413, SRS_BSW_00347,
SRS_BSW_00305, SRS_BSW_00307, SRS_BSW_00335, SRS_BSW_00410,
SRS_BSW_00314, SRS_BSW_00328, SRS_BSW_00312, SRS_BSW_00006,
SRS_BSW_00377, SRS_BSW_00306, SRS_BSW_00309, SRS_BSW_00330,
SRS_BSW_00331, SRS_BSW_00172, SRS_BSW_00010, SRS_BSW_00333,
SRS_BSW_00321, SRS_BSW_00341, SRS_BSW_00334, SRS_Nm_00151,
SRS_Nm_00046, SRS_Nm_00050, SRS_Nm_00052, SRS_Nm_02509,
SRS_Nm_00153, SRS_Nm_00054, SRS_Nm_00142, SRS_Nm_00144,
SRS_Nm_00147, SRS_Nm_00154)

103 of 103 Document ID 414: AUTOSAR_SWS_UDPNetworkManagement

You might also like