AUTOSAR SWS NetworkManagementInterface
AUTOSAR SWS NetworkManagementInterface
AUTOSAR CP R20-11
Specification of Network
Document Title Management Interface
Document Owner AUTOSAR
Document Responsibility AUTOSAR
Document Identification No 228
• Introduction J1939Nm
• Merged and corrected calculation of
delay timer for Coordination
AUTOSAR Algorithm
2013-03-15 4.1.1 • Correction of parametrization and
Administration
Services for Coordinator
Synchonization Algorithm
• Moved Nm_Passive_Mode_Enabled
Parameter back to global container
• NmMultipleChannelsEnabled
removed
• Added Mandatory Interfaces
provided by ComM to Chapter 8.6.1
• move NmPassiveMode
• Enabled form global configuration to
AUTOSAR channel configuration
2011-12-22 4.0.3 • Removed Nm_ReturnType
Administration
• Fixed some min and max values of
FloatPAramDef configuration
parameters
• Added support of
NmCarWakup-Feature
• Added support of coordinated
shutdown of nested sub-busses
• Release check added
• DET Error Code for false Pointer
AUTOSAR added
2009-12-18 4.0.1 • ChannelID harmonized in
Administration
COM-Stack
• Nm-State-changes in Userdata via
NmIf
• Remove explicit support for OSEK
NM from specification
• NM Coordinator functionality
AUTOSAR reworked (chapter 7.2 and 7.2.4)
2010-02-02 3.1.4
Administration • Debugging functionality added
• Link time configuration variant
introduced
• Legal disclaimer revised
AUTOSAR
2008-08-13 3.1.1 Legal disclaimer revised
Administration
AUTOSAR
2007-12-21 3.0.1 Initial release
Administration
Disclaimer
This work (specification and/or software implementation) and the material contained in
it, as released by AUTOSAR, is for the purpose of information only. AUTOSAR and the
companies that have contributed to it shall not be liable for any use of the work.
The material contained in this work is protected by copyright and other types of intel-
lectual property rights. The commercial exploitation of the material contained in this
work requires a license to such intellectual property rights.
This work may be utilized or reproduced without any modification, in any form or by
any means, for informational purposes only. For any other purpose, no part of the work
may be utilized or reproduced, in any form or by any means, without permission in
writing from the publisher.
The work has been developed for automotive applications only. It has neither been
developed, nor tested for non-automotive applications.
The word AUTOSAR and the AUTOSAR logo are registered trademarks.
Table of Contents
1 Introduction and functional overview 8
3 Related documentation 11
3.1 Input documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2 Related specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4 Constraints and assumptions 12
4.1 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.2 Specific limitations of the current release . . . . . . . . . . . . . . . . . 12
4.3 Applicability to automotive domains . . . . . . . . . . . . . . . . . . . . 13
5 Dependencies to other modules 14
5.1 Interfaces to modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.1.1 ComM, CanNm, J1939Nm, FrNm, UdpNm, generic bus spe-
cific NM layers and CDD . . . . . . . . . . . . . . . . . . . . 16
5.1.2 Error handling modules . . . . . . . . . . . . . . . . . . . . . 16
5.1.3 BSW Scheduler . . . . . . . . . . . . . . . . . . . . . . . . . 16
5.2 File structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.2.1 Code file structure . . . . . . . . . . . . . . . . . . . . . . . . 17
5.2.2 Header file structure . . . . . . . . . . . . . . . . . . . . . . . 17
6 Requirements traceability 18
7 Functional specification 38
7.1 Base functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
7.2 NM Coordinator functionality . . . . . . . . . . . . . . . . . . . . . . . . 38
7.2.1 Applicability of the NM Coordinator functionality . . . . . . . 39
7.2.2 Keeping coordinated busses alive . . . . . . . . . . . . . . . 40
7.2.3 Shutdown of coordinated busses . . . . . . . . . . . . . . . . 41
7.2.4 Coordination of nested sub-busses . . . . . . . . . . . . . . 43
7.2.5 Calculation of shutdown timers . . . . . . . . . . . . . . . . . 47
7.2.6 Synchronization Use Case 1 - Synchronous command . . . 47
7.2.7 Synchronization Use Case 2 - Synchronous initiation . . . . 48
7.2.8 Synchronization Use Case 3 - Synchronous network sleep . 48
7.2.8.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . 49
7.3 Wakeup and abortion of the coordinated shutdown . . . . . . . . . . . 51
7.3.1 External network wakeup . . . . . . . . . . . . . . . . . . . . 51
7.3.2 Coordinated wakeup . . . . . . . . . . . . . . . . . . . . . . . 51
7.3.3 Abortion of the coordinated shutdown . . . . . . . . . . . . . 51
7.4 Synchronized PNC shutdown functionality . . . . . . . . . . . . . . . . 53
7.5 Prerequisites of bus specific Network Management modules . . . . . . 54
7.5.1 Prerequisites for basic functionality . . . . . . . . . . . . . . 55
7.5.2 Prerequisites for NM Coordinator functionality . . . . . . . . 56
8.4.1.2 Nm_NetworkMode . . . . . . . . . . . . . . . . . . . 79
8.4.1.3 Nm_BusSleepMode . . . . . . . . . . . . . . . . . . 80
8.4.1.4 Nm_PrepareBusSleepMode . . . . . . . . . . . . . . 80
8.4.1.5 NM_SynchronizeMode . . . . . . . . . . . . . . . . . 81
8.4.1.6 Nm_RemoteSleepIndication . . . . . . . . . . . . . . 81
8.4.1.7 Nm_RemoteSleepCancellation . . . . . . . . . . . . 82
8.4.1.8 Nm_SynchronizationPoint . . . . . . . . . . . . . . . 83
8.4.1.9 Nm_CoordReadyToSleepIndication . . . . . . . . . . 83
8.4.1.10 Nm_CoordReadyToSleepCancellation . . . . . . . . 84
8.4.1.11 Nm_ForwardSynchronizedPncShutdown . . . . . . . 85
8.4.2 Extra Call-back notifications . . . . . . . . . . . . . . . . . . 85
8.4.2.1 Nm_PduRxIndication . . . . . . . . . . . . . . . . . . 85
8.4.2.2 Nm_StateChangeNotification . . . . . . . . . . . . . 86
8.4.2.3 Nm_RepeatMessageIndication . . . . . . . . . . . . 87
8.4.2.4 Nm_TxTimeoutException . . . . . . . . . . . . . . . 87
8.4.2.5 Nm_CarWakeUpIndication . . . . . . . . . . . . . . . 88
8.5 Scheduled functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
8.5.1 Nm_MainFunction . . . . . . . . . . . . . . . . . . . . . . . . 89
8.6 Expected interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
8.6.1 Mandatory Interfaces . . . . . . . . . . . . . . . . . . . . . . 89
8.6.2 Optional Interfaces . . . . . . . . . . . . . . . . . . . . . . . . 90
8.6.3 Configurable Interfaces . . . . . . . . . . . . . . . . . . . . . 92
8.6.3.1 NmCarWakeUpCallout . . . . . . . . . . . . . . . . . 92
8.7 Version Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
9 Sequence diagrams 93
9.1 Basic functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
9.2 Seq of NM Coordinator functionality . . . . . . . . . . . . . . . . . . . . 93
10 Configuration specification 95
10.1 How to read this chapter . . . . . . . . . . . . . . . . . . . . . . . . . . 95
10.2 Configuration parameters . . . . . . . . . . . . . . . . . . . . . . . . . 95
10.2.1 Nm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
10.3 Global configurable parameters . . . . . . . . . . . . . . . . . . . . . . 96
10.3.1 NmGlobalConfig . . . . . . . . . . . . . . . . . . . . . . . . . 96
10.3.2 NmGlobalConstants . . . . . . . . . . . . . . . . . . . . . . . 98
10.3.3 NmGlobalProperties . . . . . . . . . . . . . . . . . . . . . . . 99
10.3.4 NmGlobalFeatures . . . . . . . . . . . . . . . . . . . . . . . . 100
10.4 Channel configurable parameters . . . . . . . . . . . . . . . . . . . . . 105
10.4.1 NmChannelConfig . . . . . . . . . . . . . . . . . . . . . . . . 105
10.4.2 NmBusType . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
10.4.3 NmGenericBusNmConfig . . . . . . . . . . . . . . . . . . . . 112
10.4.4 NmStandardBusNmConfig . . . . . . . . . . . . . . . . . . . 113
10.5 Published Information . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
A Not applicable requirements 114
Terms: Definition:
Network mode where all interconnected communication con-
Bus-Sleep Mode
trollers are in the sleep mode.
NM-Channel Logical channel associated with the NM-cluster
NM-Cluster Set of NM nodes coordinated with the use of the NM algorithm.
A functionality of the Nm which allows coordination of network
NM-Coordinator
sleep for multiple NM Channels.
Packet of information exchanged for purposes of the NM algo-
NM-Message
rithm.
Timeout in the NM algorithm that initiates transition into Bus-
NM-Timeout
Sleep Mode.
Supplementary application specific piece of data that is attached
NM User Data
to every NM message sent on the bus.
Node address information exchanged for purposes of the NM al-
Node Identifier
gorithm.
Node Identifier List List of Node Identifiers recognized by the NM algorithm.
Physical communication medium to which a NM node/ecu is con-
Bus
nected to.
Entity of all NM nodes/ecus which are connected to the same
network
bus.
channel Logical bus to which the NM node/ecu is connected to.
Shutdown of two or more busses in a way that their shutdown is
Coordinated shutdown
finished coinciding.
Coordination algorithm Initiation of coordinated shutdown in case all conditions are met.
PN info Represent the Partial Network information in a NM frame
PN info range Represent the length of a Partial Network information in bytes
One bit which represent a particular Partial Network in the Partial
PN bit
Network Info Range
Terms: Definition:
The top-level PNC coordinator is an ECU that acts as PNC gate-
way in the network and that handles at least one PNC as actively
Top-level PNC coordinator coordinated on all assigned channels. If synchronized PNC shut-
down is enabled, the top-level PNC coordinator triggers for these
PNCs the shutdown, if no other ECU in the network request them.
An intermediate PNC coordinator is an ECU that acts as PNC
gateway in the network and that handles at least one PNC as
passively coordinated on at least one assigned channel. If syn-
Intermediate PNC coordinator
chronized PNC shutdown is enabled, it forwards received shut-
down requests for these PNCs to the corresponding actively
coordinated channels and starts their shutdown accordingly.
A subordinated PNC node is an ECU that act neither as top-level
PNC coordinator nor as an intermediate PNC coordinator. It act
Subordinated PNC node
as an ECU without a PNC gateway in the network and process
PN shutdown message as usual NM messages.
A top-level PNC coordinator transmits PN shutdown messages to
indicate a synchronized PNC shutdown across the PN topology.
A PN shutdown message is a NM message which has PNSR
bit in the control bit vector and all PNCs which are indicated
for a synchronized shutdown set to ’1’. An intermediate PNC
coordinator which receive a PN shutdown message and forward
PN shutdown request message the PN information as PN shutdown message on the affected
channels.
3 Related documentation
[1] Glossary
AUTOSAR_TR_Glossary
[2] General Specification of Basic Software Modules
AUTOSAR_SWS_BSWGeneral
[3] Specification of CAN Network Management
AUTOSAR_SWS_CANNetworkManagement
[4] Specification of FlexRay Network Management
AUTOSAR_SWS_FlexRayNetworkManagement
[5] Specification of UDP Network Management
AUTOSAR_SWS_UDPNetworkManagement
[6] Specification of Network Management for SAE J1939
AUTOSAR_SWS_SAEJ1939NetworkManagement
[7] General Requirements on Basic Software Modules
AUTOSAR_SRS_BSWGeneral
[8] Requirements on Network Management
AUTOSAR_SRS_NetworkManagement
[9] Specification of Communication Manager
AUTOSAR_SWS_COMManager
[10] Guide to BSW Distribution
AUTOSAR_EXP_BSWDistributionGuide
4.1 Limitations
1. The Generic Network Management Interface can only be applied to communica-
tion systems that support broadcast communication and ’bus-sleep mode’.
2. There is only one instance of the Generic Network Management Interface layer
for all NM-Clusters. This instance manages all channels where a NM is used.
3. The Generic Network Management Interface shall only include the common
modes, definitions and return values of different bus specific NM layers.
4. The Generic Network Management Interface shall only include the common
modes, definitions and return values of different bus specific NM layers.
5. If 10BASE-T1S is used in combination with PLCA media access, then Nm
Coordinator functionality are not supported.
Note: Consequently, the configuration parameter NmCoordinatorSupport-
Enabled shall be set to false.
Figure 4.1 shows a typical example of the AUTOSAR NM stack.
«module»
:ComM
«module»
:Nm
«module»
«realize» Nm
«optional»
Nm_SynchronizeMode ComM_Nm_RepeatMessageLeftIndication
«realize»
«optional»
Nm_ComControl BswM_Nm_CarWakeUpIndication
CanNm_RequestSync
«optional» Nm_RequestSynchronizedPncShutdown
«realize» 1..*
Nm_Init <BusNm> F
«optional»
«realize»
Nm_PnLearningRequest Com_SendSignal
«realize»
«optional»
Nm
Det_ReportError
«realize»
«optional»
Nm_RepeatMessageIndication
UdpNm_PassiveStartUp «optional»
«realize» «realize»
«o
Nm_Cbk «realize» «optional»
UdpNm_PnLearningRequest
UdpN
Nm_SynchronizationPoint «optional»
J1939Nm_PassiveStartUp
«realize»
Nm_PrepareBusSleepMode «optional»
CanNm_PnLearningRequest
«optio
«realize»
Nm_MainFunction «optional»
CanNm_PassiveStartUp
«realize»
«optional»
Nm_Types
«realize» FrNm_PnLearningRequest
Nm_Extra «optional»
FrNm_PassiveStartUp
«optional»
ComM_Nm_PncLearningBitIndication
«mandatory»
ComM_Nm
«configurable»
<NmCarWakeUpCallout>
5.1.1 ComM, CanNm, J1939Nm, FrNm, UdpNm, generic bus specific NM layers
and CDD
The Generic Network Management Interface module (Nm) provides services to the
Communication Manager (ComM) and uses services of the bus specific Network Man-
agement modules:
• CAN Network Management ([3, CanNm])
• FlexRay Network Management ([4, FrNm])
• Ethernet Network Management ([5, UdpNm]).
• J1939 Network Management ([6, J1939Nm]).
For Buses which do not need to provide Network Management Information on the
bus like for example a LIN-bus the Bus-Type can be configured as "local Nm". With
respect to callbacks, the Nm provides notification callbacks to the bus specific Network
Management modules and calls the notification callbacks provided by the ComM.
In addition to the official AUTOSAR NM-modules above, Nm also support generic bus
specific NM layers (<BusNm>). Any component which implements the required pro-
vided interfaces and uses the provided callback functions of Nm can be used as a bus
specific NM. See section 7.5 for the prerequisites for a generic bus specific NM.
Rationale: Nm is specified to support generic bus specific NM layers by adding generic
lower layer modules as Complex Drivers. As such, Nm does not explicitly use the ser-
vices by the official AUTOSAR bus-NM modules (CanNm, FrNm and UdpNm), but
rather the services of the generic <BusNm>. The AUTOSAR bus-NMs are then explic-
itly supported since they implement the interfaces of <BusNm>.
The optional CarWakeUp-Functionality needs a Complex Driver which Coordinates Ba-
sic Software Mode Management.
[SWS_Nm_00247] dThe code file structure shall not be defined within this specification
completely. At this point it shall be pointed out that the code-file structure shall include
the following files named:
c(SRS_BSW_00159, SRS_BSW_00345, SRS_BSW_00419)
6 Requirements traceability
The following tables references the requirements specified in [7] as well as [8] and links
to the fulfillment of these.
Requirement Description Satisfied by
[SRS_BSW_00003] All software modules [SWS_Nm_00044]
shall provide version
and identification
information
[SRS_BSW_00004] All Basic SW Modules [SWS_Nm_00999]
shall perform a
pre-processor check
of the versions of all
imported include files
[SRS_BSW_00005] Modules of the µC [SWS_Nm_00999]
Abstraction Layer
(MCAL) may not have
hard coded horizontal
interfaces
[SRS_BSW_00006] The source code of [SWS_Nm_00999]
software modules
above the µC
Abstraction Layer
(MCAL) shall not be
processor and
compiler dependent.
[SRS_BSW_00007] All Basic SW Modules [SWS_Nm_00999]
written in C language
shall conform to the
MISRA C 2012
Standard.
[SRS_BSW_00009] All Basic SW Modules [SWS_Nm_00999]
shall be documented
according to a
common standard.
[SRS_BSW_00010] The memory [SWS_Nm_00999]
consumption of all
Basic SW Modules
shall be documented
for a defined
configuration for all
supported platforms.
[SRS_BSW_00101] The Basic Software [SWS_Nm_00030] [SWS_Nm_00127]
Module shall be able [SWS_Nm_00128] [SWS_Nm_00129]
to initialize variables [SWS_Nm_00131] [SWS_Nm_00133]
and hardware in a [SWS_Nm_00135] [SWS_Nm_00137]
separate initialization [SWS_Nm_00139] [SWS_Nm_00141]
function [SWS_Nm_00143] [SWS_Nm_00145]
[SWS_Nm_00147] [SWS_Nm_00149]
[SWS_Nm_00151]
[SRS_BSW_00158] No description [SWS_Nm_00999]
7 Functional specification
The NM Interface functionality consists of three parts:
• The Base functionality necessary to run, together with the bus specific NM mod-
ules, AUTOSAR NM on an ECU.
• The NM Coordinator functionality used by gateway ECUs to synchronously shut
down one ore more busses.
• The synchronized PNC shutdown functionality used by PNC gateway ECUs in
the role of a top-level PNC coordinator or intermediate PNC coordinator to syn-
chronously shutdown particular PNCs across the PNC network topology.
Rationale: The NM Coordinator does not require all busses in a coordination clus-
ter to be awake, working with subsets of the coordination cluster resp. partial networks,
to perform coordinated shutdown. It always monitors the shutdown initiation con-
ditions and when these are met, it performs a coordinated shutdown of all the presently
awake buses in the coordination cluster.
Note: It is outside the scope of the Nm to provide synchronized wakeup for coordinated
busses. It is up to the application (-> vehicle mode management) to wake up the
required resp. all channels if one channel wake up occurs.
Rationale: This property shall be set for all bus specific NMs where the sleep of the
bus can be absolutely decided by the local node only and that no other nodes of that
bus can oppose that decision. An example of such a network is LIN where the local
AUTOSAR ECU will always be the LIN bus master and can always solely decide when
the network shall go to sleep.
No
No
Start
Figure 7.1: Overview of the coordination algorithm with the coordinated shutdown as
part of it
Note: There is no limitation where the actions performed by the coordination al-
gorithm shall take place.
This can be done either by the Nm main function ( NmMainFunction ) or module
indication / callbacks.
[SWS_Nm_00171] dWhen all networks of a coordination cluster are either ready to
go to sleep or already in ”bus-sleep mode“ the NM Coordinator shall start the
coordinated shutdown on all awake networks. The NM Coordinator shall eval-
uate continuously if the coordinated shutdown can be started.c(SRS_Nm_00047,
SRS_Nm_02516)
Rationale: Evaluation of shutdown conditions can be also done in other API calls then
the main function. The evaluation can be segmented then to check only the specific
conditions affected by the API calls there, hence it is not necessary to re-evaluate all
conditions in every main processing period and every API call.
[SWS_Nm_00172] dIf the configuration parameter NmSynchronizingNetwork is
TRUE for any of the busses in a coordination cluster, the coordination shutdown shall be
delayed until a network that is configured as synchronizing network for this coordination
cluster invoked Nm_SynchronizationPoint.c(SRS_Nm_00044)
[SWS_Nm_00293] dIf on a coordinated network the coordinator detects a mode
change to NM_MODE_SYNCHRONIZE,NM_MODE_PREPARE_BUS_SLEEP or NM_BUS_-
SLEEP AND the coordinated cluster this network belongs to has not started the shut-
down process AND if there is no internal network mode request for that channel by
ComM, the coordinator shall treat this network as remote sleep and shall call <BusNm>
_NetworkRelease for this network. If additionally for this network the configuration
parameter NmSynchronizingNetwork is TRUE then the coordinator shall not wait for
Nm_SynchronizationPoint on this network.c()
Rationale: If one or more of the networks in the NM coordination clusters is cyclic
(such as FlexRay), a higher level of synchronized shutdown will be achieved if the
algorithm is synchronized with one of the included cyclic networks. If configured so, the
shutdown timers for all coordinated networks will not be started until the synchronizing
network has called the Nm_SynchronizationPoint.
Rationale: Although only one network per NM coordination cluster should be config-
ured to indicate synchronization points, this will allow the NM Coordinator functionality
to filter out all synchronization indications except those that is originate from the net-
work that is configured to be the synchronizing network of each coordination cluster.
[SWS_Nm_00173] dIf not all conditions to start the coordinated shutdown have
been met, or if the coordinated shutdown has already been started (but not
aborted), calls to Nm_SynchronizationPoint shall be ignored.c(SRS_Nm_02514)
Rationale: In some cases, non-synchronizing networks can take longer time to go to
sleep. If this happens, the coordinated shutdown will be started based on one
synchronization indication, but as the synchronizing network will not be released di-
rectly it will continue to invoke (several) more synchronization indications which can
safely be ignored.
[SWS_Nm_00174] dIf the configuration parameter NmSynchronizingNetwork is
FALSE for all of the presently awake busses in a coordination cluster, the timers shall
be started after all shutdown conditions have been met, without waiting for a call to
Nm_SynchronizationPoint(). (see also [SWS_Nm_00172]).c(SRS_Nm_02516)
[SWS_Nm_00175] dWhen the coordinated shutdown is started, a shutdown de-
lay timer shall be activated for each currently awake channel in the coordination clus-
ter. Each timer shall be set to NmGlobalCoordinatorTime. In case NmBusType is
not set to NM_BUSNM_LOCALNM additionally the shutdown time of the specific channel
TSHUTDOWN_CHANNEL shall be subtracted.c(SRS_Nm_00149, SRS_Nm_02516)
[SWS_Nm_00284] dIf the NmGlobalCoordinatorTime is zero the shutdown delay
timer of all channels shall also be zero.c(SRS_Nm_00149, SRS_Nm_02516)
Note: The TSHUTDOWN_CHANNEL can be calculated as described in subsection
7.2.5 or with following formulas:
CanNm: Ready Sleep Time + Prepare BusSleep Time
The exemplary topology shown in Figure 7.2 has the following coordination approach.
GW 1 have configured the channel onto Network 1 and Network 2 as actively coordi-
nating channels. Where GW 2 is configured with Network 2 connection as passively
coordinated channel, but with actively coordinated channel on Network 3. GW 3 than
needs to be configured on Network 3 as passively coordinated channel but as actively
coordinated channel for his connection to the Network 4.
[SWS_Nm_00280] dThe functionality of coordinating nested sub busses shall be avail-
able if the NmCoordinatorSyncSupport parameter is set to TRUE.c(SRS_Nm_-
02535)
Note: All requirements within this chapter are valid “per Nm Coordination Clus-
ter” (see [SWS_Nm_00167]).
The NmActiveCoordinator parameter indicates, if an NM Coordinator behaves
on this channel in actively manner
( Actively coordinated channel ) [NmActiveCoordinator = TRUE]
or behave in a passively manner
( Passively coordinated channel ) [NmActiveCoordinator = FALSE].
This Use Case focuses on how to synchronize the point in time where the different
networks are released.
This results in the fastest possible total shutdown of all networks, but with the downside
that the networks will not enter ”bus-sleep mode“ at the same time.
Rationale: One example of this Use Case is when several CAN networks shall be kept
alive as long as any CAN-node is requesting one of the networks; but when all nodes
are ready to go to sleep it does not matter if ”bus-sleep mode“ is entered at the same
time for the different networks.
Since the Use Case does not consider any cyclic behavior of the networks, the synchro-
nization parameter NmSynchronizingNetwork shall be set to FALSE for all networks
and no bus specific NM shall be configured to invoke the Nm_Synchronization-
Point callback.
To achieve the fastest possible shutdown, the shutdown timer parameter NmGlobal-
CoordinatorTime needs to be set to 0.0.
This Use Case is an extension of Use Case 1, but here consideration is taken to the
fact that for some networks the request to release the network will only be acted upon
at specific points in time. This Use Case will command a simultaneous shutdown like
in Use Case 1, but will wait until a point in time suitable for the synchronizing network.
Rationale: One example of this Use Case is when one FlexRay network and several
CAN networks where the time when all networks are active shall be maximized, but the
networks shall still be put to sleep as fast as possible.
Since this Use Case shall consider the cyclic behavior of a selected network, one of
the networks shall have its synchronization parameter NmSynchronizingNetwork
set to TRUE while the other networks shall have this parameter set to FALSE. The
synchronizing network’s bus specific NM shall also be configured to invoke the Nm_-
SynchronizationPoint callback at suitable points in time where the shutdown shall
be initiated.
To achieve the fastest possible shutdown, the shutdown timer parameter NmGlobal-
CoordinatorTime needs to be set to 0.0.
This Use Case will focus on synchronizing the point in time where the different net-
works enters ”bus-sleep mode“. It will wait for indication from a synchronizing network,
and then delay the network releases of all networks based on timing values so that the
transition from ”network mode“ (or ”prepare bus-sleep mode“) into ”bus-sleep mode“ is
as synchronized as possible.
Rationale: One example of this Use Case is when one FlexRay network and several
CAN networks shall stop communicating at the same time.
Since this Use Case shall consider the cyclic behavior of a selected network, of the
networks - preferably the cyclic one - shall have its synchronization parameter NmSyn-
chronizingNetwork set to TRUE while the other networks shall have this parameter
set to FALSE. The synchronizing network’s bus specific NM shall also be configured
to invoke the Nm_SynchronizationPoint callback at suitable points in time where
the shutdown shall be initiated.
To calculate the shutdown timer TSHUTDOWN_CHANNEL of each network, specific
knowledge of each networks timing behavior must be obtained.
For all networks, TSHUTDOWN_CHANNEL must be calculated, this is the minimum
time it will take the network to enter ”bus-sleep mode“. For non-cyclic networks (such
as CAN), the time shall be measured from the point in time when the network is re-
leased until it enters ”bus-sleep mode“. For cyclic networks (such as FlexRay) the time
shall also include the full range from the synchronization indication made just before
the network is released. For Generic BusNms the time is given by the configuration
parameter NmGenericBusNmShutdownTime.
For the synchronizing network, TSYNCHRONIZATION_INDICATION must be deter-
mined. This is the time between any two consecutive calls made by that bus specific
NM to Nm_SynchronizationPoint.
The NmGlobalCoordinatorTime shall be the total time that is needed for the co-
ordination algorithm. This includes the shutdown time of nested sub-busses.
Start with setting NmGlobalCoordinatorTime to the same value as TSHUT-
DOWN_CHANNEL for the synchronizing network. If the TSHUTDOWN_CHANNEL
for any other network is greater than NmGlobalCoordinatorTime, extend NmGlob-
alCoordinatorTime with TSYNCHRONIZATION_INDICATION repeatedly until Nm-
GlobalCoordinatorTime is equal to, or larger than any TSHUTDOWN_CHANNEL.
The shutdown delay timer for each network shall be calculated as NmGlobalCoordi-
natorTime - TSHUTDOWN_CHANNEL for that network.
For the cyclic networks this parameter must then be increased slightly in order to make
sure that the network release will occur between to synchronization indications, slightly
after Nm_SynchronizationIndication (would) have been called. The amount of
time to extend the timer depends on the implementation and configuration of the bus
specific NM but should be far smaller than TSYNCHRONIZATION_INDICATION.
7.2.8.1 Examples
In the first case ( Figure 7.4), the synchronizing network holds the largest TSHUT-
DOWN_CHANNEL, which will therefore equal the NmGlobalCoordinatorTime. For
the synchronizing network, the shutdown delay timer will be NmGlobalCoordina-
torTime - TSHUTDOWN_CHANNEL, which is zero, but then a small amount of time
is added to make sure that the Nm will wait to release the network between the two
synchronization points.
For the Non-cyclic network, the shutdown delay timer will simply be NmGlobalCoor-
dinatorTime - TSHUTDOWN_CHANNEL.
In the second case ( Figure 7.5), the non-cyclic network takes very long time
to shut down and therefore holds the largest TSHUTDOWN_CHANNEL. The
NmGlobalCoordinatorTime has now been obtained by taking the synchroniz-
ing network’s (slightly shorter) TSHUTDOWN_CHANNEL adding TSYNCHRONIZA-
TION_INDICATION once to this value.
For the synchronizing network, the shutdown timer will be NmGlobalCoordinator-
Time - TSHUTDOWN_CHANNEL, with a small amount of time added to make sure
that the Nm will wait to release the network between the two synchronization points.
For the Non-cyclic network, the shutdown timer will simply be NmGlobalCoordina-
torTime - TSHUTDOWN_CHANNEL.
For both Basic functionality and NM Coordination functionality, Nm will forward wakeup
indications from the networks (indicated by the bus specific NMs calling the call-
back Nm_NetworkStartIndication) to the ComM by calling ComM_Nm_Network-
StartIndication(). ComM will then call Nm_PassiveStartUp, which will be for-
warded by Nm to the corresponding interface of the bus specific NM.
Processing of wake-up events for channels in bus-sleep (related to transceiver and
controller state) will be handled by EcuM and ComM. No interaction of the Nm apply
here. Nm will get the network request from ComM as statet above, depending on the
wake-up validation and the respective communication needs.
[SWS_Nm_00245] dIf the ComM calls Nm_PassiveStartUp() for a network that is
part of a coordinated cluster of networks, the Nm coordinator functionality shall treat
this call as if the ComM had called Nm_NetworkRequest(). In case BusNmType is
not set to NM_BUSNM_LOCALNM the Nm shall forward a call of <BusNm>_NetworkRe-
quest to the lower layer and accordingly, the network shall be counted as requested
by the NM coordinator.c(SRS_Nm_02536)
Note: In other words: Calls of Nm_PassiveStartUp for networks that are part of
a cluster of coordinated networks shall be "translated" to / handled as calls of Nm_-
NetworkRequest.
Depending on the configuration, ComM can start multiple networks based on the indi-
cation from one network. It is recommended to configure the ComM to automatically
start all network of a NM Coordination Cluster if one of the networks indicates
network start, but this is not always necessary. Since the wakeup of network is outside
the scope of Nm, this is independent of if the NM Coordination functionality is used or
not.
the network before all networks are released, race conditions can occur in the coor-
dination algorithm. This can happen in four ways:
1. A node on a network that has not yet been released and is still in ’network mode’
starts requesting the network again. This will be detected by the bus specific NM
which will inform Nm by calling Nm_RemoteSleepCancellation.
2. A node on a network that has already been released and has indicated ”prepare
bus-sleep mode“ but not ”bus-sleep mode“ starts requesting the network again. This
will be detected by the bus specific NM that will automatically change state to
”network mode“ and inform Nm by calling Nm_NetworkMode.
3. The ComM requests the network on any of the networks in the NM Coordination
Cluster.
4. The coordinator which actively coordinates this network sends Nm message with
cleared Ready-Sleep Bit. This will be detected by the Bus spec NM (only on
passively coordinated channels) and forwarded to the NM by calling Nm_Coor-
dReadyToSleepCancellation.
The generic approach is to abort the shutdown and start requesting the networks again.
However, networks that have already gone into ”bus-sleep mode“ shall not be automat-
ically woken up; this must be requested explicitly by ComM.
[SWS_Nm_00181] dThe coordinated shutdown shall be aborted if any network in
that NM Coordination Cluster,
• indicates Nm_RemoteSleepCancellation or
• indicates Nm_NetworkMode or
• indicates Nm_CoordReadyToSleepCancellation
• or the ComM request one of the networks with Nm_NetworkRequestor Nm_-
PassiveStartUp.
c(SRS_Nm_02537)
Note: Nm_NetworkStartIndication is not a trigger to abort the coordinated
shutdown, as this is handled by the upper layer.
[SWS_Nm_00182] dIf the coordinated shutdown is aborted, NM Coordinator
shall call ComM_Nm_RestartIndication for all networks that already indicated ”bus
sleep“.c(SRS_Nm_02537)
Rationale: Since Nm cannot take decision to wake networks on its own, this must be
decided by ComM just as in the (external) wakeup case.
[SWS_Nm_00183] dIf the coordinated shutdown is aborted, NM Coordinator
shall in case BusNmType is not set NM_BUSNM_LOCALNM request the network from the
<busNm’s> for the networks that have not indicated ”bus sleep“. In case BusNmType
is set to NM_BUSNM_LOCALNM Nm shall inform ComM about network startup by calling
ComM_Nm_NetworkMode().c(SRS_Nm_02537)
[SWS_Nm_00185] dIf the coordination algorithm has been aborted, all con-
ditions that guard the initiation of the coordinated shutdown shall be evaluated
again.c(SRS_Nm_02537)
Rationale: When a coordinated shutdown has been aborted, in most cases there
are now networks in that NM Coordination Cluster that do not longer indicate
that network sleep is possible, and thus the NM Coordinator must keep all presently
non-sleeping networks awake. There can be cases where none of the conditions have
been changed, which will only lead to a re-initiation of the coordinated shutdown.
[SWS_Nm_00235] dIf a coordinated shutdown has been aborted and Nm re-
ceives E_NOT_OK on a <BusNm>_NetworkRequest, that network shall not be con-
sidered awake when the conditions for initiating a coordinated shutdown are evaluated
again.c(SRS_Nm_02537)
Rationale: Any <BusNm> that needs to be re-requested during an aborted
coordinated shutdown have previously been released, both by ComM and by Nm.
It is the responsibility of the <BusNm> to inform the ComM (through Nm) that the net-
work really has been released and therefore the ComM will have knowledge of the net-
work state even though the error response on Nm_NetworkRequest never reached
the ComM directly.
[SWS_Nm_00236] dIf a coordinated shutdown has been initiated and Nm re-
ceives E_NOT_OK on a <BusNm>_NetworkRelease, the shutdown shall be imme-
diately aborted. For all networks that have not entered ”bus-sleep mode“, Nm shall
request the networks. This includes the network that indicated an error for <BusNm>
_NetworkRelease. As soon as this has been done, the conditions for initiating
coordinated shutdown can be evaluated again. This applies also to networks that were
not actively participating in the current coordinated shutdown.c(SRS_Nm_02537)
Rationale: If a network cannot be released, it shall immediately be requested again to
synchronize the states between the NM Coordinator in the Nm and the <BusNm>.
The coordinated shutdown will eventually be initiated again as long as the problem
with the <BusNm> persists. It is up to the <BusNm> to report any problems directly to
the DEM and/or Default Error Tracer so the NM Coordinator shall only try to release
the networks until it is successful.
<Bus>Nms. The <Bus>Nms store all requests and handle them in the context of the
<Bus>Nm_Mainfunction. Therefore, the <Bus>Nm has to aggregate the request for a
synchronized PNC shutdown into a byte array (PN info), where each bit represent a
particular PNC. The PN info is created and transmitted per <Bus>NM-Channel.
If a PN shutdown message is received by an ECU in the role of an interme-
diate PNC coordinator, the <Bus>Nms forward the information by writing the
corresponding ComSignals and indicate the reception of a PN shutdown mes-
sage by calling the callback function Nm_ForwardSynchronizedPncShutdown.
The callback function will immediately forward the indication to ComM by calling
ComM_Nm_ForwardSynchronizedPncShutdown. ComM will immediately request
a synchronized PNC shutdown of all actively PNC coordinated (coordinated by a PNC
gateway) ComMChannels. The requests for a synchronized PNC shutdown are for-
warded to all affected <Bus>Nms via Nm and handled in the same way as described
in the previous section.
If a subordinated PNC node receives a top-level PNC coordinator Nm frame, then it
will handle the frame as a usual NM message (update the local PN info and reset PN
reset time).
[SWS_Nm_00506]{DRAFT} dIf function Nm_RequestSynchronizedPncShutdown
is called, NmSynchronizedPncShutdownEnabled is set to TRUE and Nm-
StandardBusType is set to a type other than NM_BUSNM_LOCALNM, the func-
tion shall immediately forward the call to the affected <Bus>Nm by calling
<Bus>Nm_RequestSynchronizedPncShutdown. Otherwise the function shall return
with E_NOT_OK.c(SRS_Nm_02543)
[SWS_Nm_00507]{DRAFT} dThe indication of a received PN shutdown mes-
sage via callback function Nm_ForwardSynchronizedPncShutdown shall
be forwarded to ComM with the corresponding ComMChannel by calling
ComM_Nm_ForwardSynchronizedPncShutdown(<ComMChannel>).c(SRS_-
Nm_02544)
The Nm only acts as a forwarding layer between the ComM and the bus specific NM
for the basic functionality.
All API calls made from the upper layer shall be forwarded to the corresponding API
call of the lower layer. All callbacks of Nm invoked by the lower layer shall be forwarded
to the corresponding callback of the upper layer.
The Basic functionality provides the following API calls to the ComM:
• Nm_NetworkRequest - [SWS_Nm_00032]
• Nm_NetworkRelease - [SWS_Nm_00046]
• Nm_PassiveStartUp - [SWS_Nm_00031]
Note: This implies that the bus specific NM provides the corresponding func-
tions <BusNm>_NetworkRequest, <BusNm>_NetworkRelease and <BusNm>_-
PassiveStartUp.
The Basic functionality forwards the following API callbacks to the ComM:
• Nm_NetworkStartIndication - [SWS_Nm_00154]
• Nm_NetworkMode - [SWS_Nm_00156]
• Nm_BusSleepMode - [SWS_Nm_00162]
• Nm_PrepareBusSleepMode - [SWS_Nm_00159]
Note: This implies that the ComM provides the corresponding callback functions
ComM_Nm_NetworkStartIndication, ComM_Nm_NetworkMode, ComM_Nm_Bus-
SleepMode and ComM_Nm_PrepareBusSleepMode.
The Nm provides a number of API calls to the upper layers that are not used by ComM.
These are provided for OEM specific extensions of the NM stack and are not required
by any AUTOSAR module. They shall be forwarded to the corresponding API calls
provided by the bus specific NMs.
The Basic functionality provides the following API calls to any OEM extension of an
upper layer:
• Nm_DisableCommunication - [SWS_Nm_00033]
• Nm_EnableCommunication - [SWS_Nm_00034]
• Nm_SetUserData - [SWS_Nm_00035]
• Nm_GetUserData - [SWS_Nm_00036]
• Nm_GetPduData - [SWS_Nm_00037]
• Nm_RepeatMessageRequest - [SWS_Nm_00038]
• Nm_GetNodeIdentifier - [SWS_Nm_00039]
• Nm_GetLocalNodeIdentifier - [SWS_Nm_00040]
• Nm_CheckRemoteSleepIndication - [SWS_Nm_00042]
• Nm_GetState - [SWS_Nm_00043]
Note: This implies that the bus specific NM optionally provides the corresponding
functions.
The coordination algorithm makes use of the following interfaces of the bus
specific NM:
• <BusNm>_NetworkRequest - [SWS_Nm_00119]
• <BusNm>_NetworkRelease - [SWS_Nm_00119]
• <BusNm>_RequestBusSynchronization - [SWS_Nm_00119]
• <BusNm>_CheckRemoteSleepIndication - [SWS_Nm_00119]
Note: All NM networks configured to be part of a coordinated cluster of the NM
coordinator functionality must have the corresponding Bus NM configured to be able to
actively send out NM messages (e.g. CANNM_PASSIVE_MODE_ENABLED = false).
As a result of this configuration restriction, all BusNm used by the coordinator func-
tionality of the Nm module must provide the API <BusNm>_NetworkRequest.
Note: Any configuration where a network is part of a coordinated cluster of networks
where the corresponding BusNm is configured as passive is invalid.
Note: The <BusNm>_RequestBusSynchronization is called by Nm immediately
before <BusNm>_NetworkRelease in order to allow non-synchronous networks to
synchronize before the network is released. For some networks, this call has no
meaning. The bus specific NM shall still provide this interface in order to support
the generality of the NM Coordinator functionality, but can choose to provide an empty
implementation.
Rationale: The <BusNm>_CheckRemoteSleepIndication is never explicitly men-
tioned in the coordination algorithm. Its use is dependent on the implementa-
tion.
The coordination algorithm requires that the following callbacks of the Nm can
be invoked by the bus specific NM:
• Nm_NetworkStartIndication - [SWS_Nm_00154]
• Nm_NetworkMode - [SWS_Nm_00156]
• Nm_BusSleepMode - [SWS_Nm_00162]
• Nm_PrepareBusSleepMode - [SWS_Nm_00159]
• Nm_SynchronizeMode - [SWS_Nm_91002]
• Nm_RemoteSleepIndication - [SWS_Nm_00192]
• Nm_RemoteSleepCancellation - [SWS_Nm_00193]
• Nm_SynchronizationPoint - [SWS_Nm_00194]
Note: The Nm_NetworkStartIndication, Nm_NetworkMode, Nm_BusSleep-
Mode and Nm_PrepareBusSleepMode are used by the coordination algo-
rithm to keep track of the status of the different networks and to handle aborted
shutdown (see Chapter 7.3.3).
Note: The Nm_RemoteSleepIndication and Nm_RemoteSleepCancellation
are used by the coordination algorithm to determine when all conditions for
initiating the coordinated shutdown are met. The indication will be called by the
bus specific NM when it detects that all other nodes on the network (except for itself)
is ready to go to ”bus-sleep mode“. Some implementations will also make use of the
API call <BusNm>_CheckRemoteSleepIndication.
Note: A bus specific NM which is included in a coordination cluster must monitor its
bus to identify when all other nodes on the network is ready to go to sleep. When this
occurs, the bus specific NM shall call the callback Nm_RemoteSleepIndication of
Nm. (See [SWS_Nm_00192]).
Note: After a bus specific NM which is included in a coordination cluster has
signaled to Nm that all other nodes on the network is ready to go to sleep (See
[SWS_Nm_00192]), it must continue monitoring its bus to identify if any node starts
requesting the network again, implying that the bus is no longer ready to go to sleep.
When this occurs, the bus specific NM shall call the callback Nm_RemoteSleepCan-
cellation of Nm. (See [SWS_Nm_00193]).
Note: The Remote Sleep Indication and Cancellation functionality is further specified
in the respective bus specific NM.
Rationale: The Nm_SynchronizationPoint shall be called by the bus specific
NM in order to inform the coordination algorithm of a suitable point in time to
initiate the coordinated shutdown. For cyclic networks this is typically at cycle
boundaries. For non-cyclic networks this must be defined by other means. Each NM
Coordination Cluster can be configured to make use of synchronization indications or
not (See [SWS_Nm_00172]), and if they are used, the coordination algorithm filters
indications and only acts on indications from networks that are configured as synchro-
nizing networks.
Note: Please note for implementation of <bus>Nm: Cyclic networks invoke the Nm_-
SynchronizationPoint repeatedly when no other nodes request the network. The
invocation is typically made at boundaries in the bus specific NM protocol when
changes in the NM voting will occur.
The synchronized PNC shutdown functionality makes use of the following interface of
the bus specific NM:
• <BusNm>_RequestSynchronizedPncShutdown -
[SWS_Nm_00166][SWS_Nm_00506]
The synchronized PNC shutdown functionality requires that the following callback of
the Nm can be invoked by the bus specific NM:
• Nm_ForwardSynchronizedPncShutdown - [SWS_Nm_91004]
The synchronized PNC shutdown functionality provides the following API, to be called
by the ComM:
• Nm_RequestSynchronizedPncShutdown - [SWS_Nm_91005]
The Nm’s configuration contains parameters that regulate support of optional features
found in the bus specific NMs. Since Nm is only a pass-through interface layer re-
garding features that are not used by the NM Coordinator functionality, enabling these
in Nm’s configuration will in many cases only enable the pass-through of the controlling
API functions and the callback indications from the bus specific layers.
Many of the parameters defined for NM are used only as a source for global configu-
ration of all bus specific NM modules. Corresponding parameters of the bus specific
NMs are derived from these parameters.
7.6 NM_BUSNM_LOCALNM
[SWS_Nm_00483] dIf BusNmType is NM_BUSNM_LOCALNM and ComM requests Nm_-
PassiveStartUp() or Nm_NetworkRequest() then Nm shall inform ComM about
start of network by calling ComM_Nm_NetworkMode().
Rationale : Buses of type NM_LOCAL_NM which are coordinated do not have a network
management message but are synchronized e.g. by a master - slave concept like LIN).
These Bus-Types are always directly started on request by ComM but the shutdown
will be done by coordinator algorithm.c()
7.8.1 Nm_CarWakeUpIndication
7.8.2 Nm_StateChangeNotification
[SWS_Nm_00232] d
Type of error Related error code Error value
API service used without Nm interface initialization NM_E_UNINIT 0x00
API Service called with wrong parameter but not NM_E_INVALID_CHANNEL 0x01
with NULL-pointer
API service called with a NULL pointer NM_E_PARAM_POINTER 0x02
8 API specification
c(SRS_BSW_00301)
8.2.1 Nm_ModeType
[SWS_Nm_00274] d
Name Nm_ModeType
Kind Enumeration
Range NM_MODE_BUS_SLEEP – Bus-Sleep Mode
NM_MODE_PREPARE_ – Prepare-Bus Sleep Mode
BUS_SLEEP
NM_MODE_ – Synchronize Mode
SYNCHRONIZE
NM_MODE_NETWORK – Network Mode
Description Operational modes of the network management.
Available via NmStack_types.h
c(SRS_Nm_00044)
8.2.2 Nm_StateType
[SWS_Nm_00275] d
Name Nm_StateType
Kind Enumeration
Range NM_STATE_UNINIT 0x00 Uninitialized State
NM_STATE_BUS_SLEEP 0x01 Bus-Sleep State
NM_STATE_PREPARE_ 0x02 Prepare-Bus State
BUS_SLEEP
NM_STATE_READY_ 0x03 Ready Sleep State
SLEEP
NM_STATE_NORMAL_ 0x04 Normal Operation State
OPERATION
NM_STATE_REPEAT_ 0x05 Repeat Message State
MESSAGE
NM_STATE_ 0x06 Synchronize State
SYNCHRONIZE
NM_STATE_OFFLINE 0x07 Offline State
Description States of the network management state machine.
Available via NmStack_types.h
c(SRS_Nm_00050)
8.2.3 Nm_BusNmType
[SWS_Nm_00276] d
Name Nm_BusNmType
Kind Enumeration
Range NM_BUSNM_CANNM – CAN NM type
NM_BUSNM_FRNM – FR NM type
NM_BUSNM_UDPNM – UDP NM type
NM_BUSNM_GENERICNM – Generic NM type
NM_BUSNM_UNDEF – NM type undefined; it shall be defined as FFh
NM_BUSNM_J1939NM – SAE J1939 NM type (address claiming)
NM_BUSNM_LOCALNM – Local NM Type
Description BusNm Type
Available via NmStack_types.h
8.2.4 Nm_ConfigType
[SWS_Nm_00282] d
Name Nm_ConfigType
Kind Structure
Elements implementation specific
Type –
Comment –
Description Configuration data structure of the Nm module.
Available via Nm.h
c(SRS_BSW_00414)
8.3.1.1 Nm_Init
[SWS_Nm_00030] d
Service Name Nm_Init
Syntax void Nm_Init (
const Nm_ConfigType* ConfigPtr
)
8.3.1.2 Nm_PassiveStartUp
[SWS_Nm_00031] d
Service Name Nm_PassiveStartUp
Syntax Std_ReturnType Nm_PassiveStartUp (
NetworkHandleType NetworkHandle
)
8.3.1.3 Nm_NetworkRequest
[SWS_Nm_00032] d
Service Name Nm_NetworkRequest
Syntax Std_ReturnType Nm_NetworkRequest (
NetworkHandleType NetworkHandle
)
4
Parameters (in) NetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Requesting of bus communication has failed
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description This function calls the <BusNm>_NetworkRequest (e.g. CanNm_NetworkRequest function is
called if channel is configured as CAN) function in case NmBusType is not set to NM_BUSNM_
LOCALNM.
Available via Nm.h
8.3.1.4 Nm_NetworkRelease
[SWS_Nm_00046] d
Service Name Nm_NetworkRelease
Syntax Std_ReturnType Nm_NetworkRelease (
NetworkHandleType NetworkHandle
)
4
Description This function calls the <BusNm>_NetworkRelease bus specific function in case NmBusType is
not set to NM_BUSNM_LOCALNM (e.g. CanNm_NetworkRelease function is called if channel
is configured as CAN).
Available via Nm.h
c(SRS_Nm_00048, SRS_Nm_00051)
[SWS_Nm_00131] dCaveats of Nm_NetworkRelease: The <BusNm> and the Nm
itself are initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00132] dIf Nm_NetworkRelease is called with a network handle where
NmPassiveModeEnabled is set to TRUE it shall not execute any functionality and
return with E_NOT_OK. If NmDevErrorDetect is set to TRUE then it shall raise the
error NM_E_INVALID_CHANNEL in this case.c(SRS_Nm_00150)
[SWS_Nm_00490] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_NetworkRelease shall raise the error NM_E_INVALID_CHANNEL
if the parameter NetworkHandle is not a configured network handle.c(SRS_BSW_-
00323, SRS_BSW_00369, SRS_BSW_00386)
The following services are provided by NM Interface to allow the Diagnostic Communi-
cation Manager (DCM) to control the transmission of NM Messages.
Note: To run the coordination algorithm correctly, it has to be ensured that
NM PDU transmission ability is enabled before the ECU is shut down. If <BusNm>
_NetworkRelease is called while NM PDU transmission ability is disabled, the ECU
will shut down after NM PDU transmission ability has been re-enabled again. Therefore
the ECU can also shut down in case of race conditions (e.g. diagnostic session left
shortly before enabling communication) or a wrong usage of communication control.
8.3.2.1 Nm_DisableCommunication
[SWS_Nm_00033] d
Service Name Nm_DisableCommunication
Syntax Std_ReturnType Nm_DisableCommunication (
NetworkHandleType NetworkHandle
)
4
Reentrancy Non-reentrant for the same NetworkHandle, reentrant otherwise
Parameters (in) NetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Disabling of NM PDU transmission ability has failed.
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description Disables the NM PDU transmission ability. For that purpose <BusNm>_DisableCommunication
shall be called in case NmBusType is not set to NM_BUSNM_LOCALNM (e.g. CanNm_Disable
Communication function is called if channel is configured as CAN).
Available via Nm.h
c(SRS_Nm_02513, SRS_Nm_02512)
[SWS_Nm_00133] dCaveats of Nm_DisableCommunication: The <BusNm> and
the Nm itself are initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00134] dConfiguration of Nm_DisableCommunication: This function is
only available if NmComControlEnabled is set to TRUE.c(SRS_Nm_00150)
[SWS_Nm_00286] dIf Nm_DisableCommunication is called with a network handle
where NmPassiveModeEnabled is set to TRUE it shall not execute any functionality
and return with E_NOT_OK. If NmDevErrorDetect is set to TRUE then it shall raise
the error NM_E_INVALID_CHANNEL in this case.c(SRS_Nm_00150)
[SWS_Nm_00491] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_DisableCommunication shall raise the error NM_E_INVALID_-
CHANNEL if the parameter NetworkHandle is not a configured network handle.c
(SRS_BSW_00323, SRS_BSW_00369, SRS_BSW_00386)
8.3.2.2 Nm_EnableCommunication
[SWS_Nm_00034] d
Service Name Nm_EnableCommunication
Syntax Std_ReturnType Nm_EnableCommunication (
NetworkHandleType NetworkHandle
)
4
Parameters (out) None
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Enabling of NM PDU transmission ability has failed.
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description Enables the NM PDU transmission ability. For that purpose <BusNm>_EnableCommunication
shall be called in case NmBusType is not set to NM_BUSNM_LOCALNM. (e.g. CanNm_Enable
Communication function is called if channel is configured as CAN).
Available via Nm.h
c(SRS_Nm_00047, SRS_Nm_02512)
[SWS_Nm_00135] dCaveats of Nm_EnableCommunication: The <BusNm> and the
Nm itself are initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00136] dConfiguration of Nm_EnableCommunication: This function is
only available if NmComControlEnabled is set to TRUE.c(SRS_Nm_00150)
[SWS_Nm_00287] dIf Nm_EnableCommunication is called with a network handle
where NmPassiveModeEnabled is set to TRUE it shall not execute any functionality
and return with E_NOT_OK. If NmDevErrorDetect is set to TRUE then it shall raise
the error NM_E_INVALID_CHANNEL in this case.c(SRS_Nm_00150)
[SWS_Nm_00492] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_EnableCommunication shall raise the error NM_E_INVALID_-
CHANNEL if the parameter NetworkHandle is not a configured network handle.c
(SRS_BSW_00323, SRS_BSW_00369, SRS_BSW_00386)
8.3.3.1 Nm_RequestSynchronizedPncShutdown
[SWS_Nm_91005]{DRAFT} d
Service Name Nm_RequestSynchronizedPncShutdown (draft)
Syntax Std_ReturnType Nm_RequestSynchronizedPncShutdown (
NetworkHandleType NetworkHandle,
PNCHandleType PncId
)
4
Parameters (inout) None
Parameters (out) None
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Request for a synchronized PNC shutdown has
failed, e.g.
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description This function forward the request for a synchronized PNC shutdown of a particular PNC given
by PncId to the affected <Bus>Nm by calling <Bus>Nm_RequestSynchronizedPncShutdown
The function call is only valid if NmStandardBusType is not set to NM_BUSNM_LOCALNM (e.g.
CanNm_RequestSynchronizedPncShutdown function is called for NM_BUSNM_CANNM).
Tags:atp.Status=draft
Available via Nm.h
c(SRS_Nm_02545, SRS_Nm_02543)
[SWS_Nm_00508]{DRAFT} dIf the pre-processor switch NmDevErrorDetect is set
to TRUE, the function Nm_RequestSynchronizedPncShutdown shall raise the er-
ror NM_E_INVALID_CHANNEL if the parameter NetworkHandle is not a configured
network handle.c(SRS_BSW_00323, SRS_BSW_00369, SRS_BSW_00386)
The following services are provided by NM Interface for OEM specific extensions of the
NM stack and are not required by any AUTOSAR module.
8.3.4.1 Nm_SetUserData
[SWS_Nm_00035] d
Service Name Nm_SetUserData
Syntax Std_ReturnType Nm_SetUserData (
NetworkHandleType NetworkHandle,
const uint8* nmUserDataPtr
)
4
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Setting of user data has failed
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description Set user data for NM messages transmitted next on the bus. For that purpose <BusNm>_Set
UserData shall be called in case NmBusType is not set to NM_BUSNM_LOCALNM. (e.g. Can
Nm_SetUserData function is called if channel is configured as CAN).
Available via Nm.h
c(SRS_Nm_02503)
[SWS_Nm_00137] dCaveats of Nm_SetUserData: The <BusNm> and the Nm itself
are initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00138] dConfiguration of Nm_SetUserData: This function is only avail-
able if NmUserDataEnabled is set to TRUE.c(SRS_Nm_00150)
[SWS_Nm_00288] dIf Nm_SetUserData is called with a network handle where Nm-
PassiveModeEnabled is set to TRUE it shall not execute any functionality and return
with E_NOT_OK. If NmDevErrorDetect is set to TRUE then it shall raise the error
NM_E_INVALID_CHANNEL in this case.c(SRS_Nm_00150)
[SWS_Nm_00241] dConfiguration of Nm_SetUserData: If NmComUserDataSup-
port is TRUE the API Nm_SetUserData shall not be available.c(SRS_Nm_00150)
[SWS_Nm_00493] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_SetUserData shall raise the error NM_E_INVALID_CHANNEL if the
parameter NetworkHandle is not a configured network handle.c(SRS_BSW_00323,
SRS_BSW_00369, SRS_BSW_00386)
8.3.4.2 Nm_GetUserData
[SWS_Nm_00036] d
Service Name Nm_GetUserData
Syntax Std_ReturnType Nm_GetUserData (
NetworkHandleType NetworkHandle,
uint8* nmUserDataPtr
)
4
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Getting of user data has failed
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description Get user data out of the last successfully received NM message. For that purpose <BusNm>_
GetUserData shall be called in case NmBusType is not set to NM_BUSNM_LOCALNM. (e.g.
CanNm_GetUserData function is called if channel is configured as CAN).
Available via Nm.h
c(SRS_Nm_02504)
[SWS_Nm_00139] dCaveats of Nm_GetUserData: The <BusNm> and the Nm itself
are initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00140] dConfiguration of Nm_GetUserData: This function is only avail-
able if NmUserDataEnabled is set to TRUE.c(SRS_Nm_00150)
[SWS_Nm_00494] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_GetUserData shall raise the error NM_E_INVALID_CHANNEL if the
parameter NetworkHandle is not a configured network handle.c(SRS_BSW_00323,
SRS_BSW_00369, SRS_BSW_00386)
8.3.4.3 Nm_GetPduData
[SWS_Nm_00037] d
Service Name Nm_GetPduData
Syntax Std_ReturnType Nm_GetPduData (
NetworkHandleType NetworkHandle,
uint8* nmPduData
)
c(SRS_Nm_02506)
8.3.4.4 Nm_RepeatMessageRequest
[SWS_Nm_00038] d
Service Name Nm_RepeatMessageRequest
Syntax Std_ReturnType Nm_RepeatMessageRequest (
NetworkHandleType NetworkHandle
)
c(SRS_Nm_00153)
[SWS_Nm_00143] dCaveats of Nm_RepeatMessageRequest: The <BusNm> and
the Nm itself are initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00289] dIf Nm_RepeatMessageRequest is called with a network handle
where NmPassiveModeEnabled is set to TRUE it shall not execute any functionality
and return with E_NOT_OK. If NmDevErrorDetect is set to TRUE then it shall raise
the error NM_E_INVALID_CHANNEL in this case.c(SRS_Nm_00150)
[SWS_Nm_00496] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_RepeatMessageRequest shall raise the error NM_E_INVALID_-
CHANNEL if the parameter NetworkHandle is not a configured network handle.c
(SRS_BSW_00323, SRS_BSW_00369, SRS_BSW_00386)
8.3.4.5 Nm_GetNodeIdentifier
[SWS_Nm_00039] d
Service Name Nm_GetNodeIdentifier
Syntax Std_ReturnType Nm_GetNodeIdentifier (
NetworkHandleType NetworkHandle,
uint8* nmNodeIdPtr
)
c(SRS_Nm_02505)
[SWS_Nm_00145] dCaveats of Nm_GetNodeIdentifier: The <BusNm> and the
Nm itself are initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00497] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_GetNodeIdentifier shall raise the error NM_E_INVALID_CHAN-
NEL if the parameter NetworkHandle is not a configured network handle.c(SRS_-
BSW_00323, SRS_BSW_00369, SRS_BSW_00386)
8.3.4.6 Nm_GetLocalNodeIdentifier
[SWS_Nm_00040] d
Service Name Nm_GetLocalNodeIdentifier
Syntax Std_ReturnType Nm_GetLocalNodeIdentifier (
NetworkHandleType NetworkHandle,
uint8* nmNodeIdPtr
)
4
Sync/Async Synchronous
Reentrancy Non-reentrant for the same NetworkHandle, reentrant otherwise
Parameters (in) NetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) nmNodeIdPtr Pointer where node identifier of the local node shall be copied to
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Getting of the node identifier of the local node has
failed
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description Get node identifier configured for the local node. For that purpose <BusNm>_GetLocalNode
Identifier shall be called in case NmBusType is not set to NM_BUSNM_LOCALNM. (e.g. Can
Nm_GetLocalNodeIdentifier function is called if channel is configured as CAN).
Available via Nm.h
c(SRS_Nm_02508)
[SWS_Nm_00147] dCaveats of Nm_GetLocalNodeIdentifier: The <BusNm>
and the Nm itself are initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00498] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_GetLocalNodeIdentifier shall raise the error NM_E_INVALID_-
CHANNEL if the parameter NetworkHandle is not a configured network handle.c
(SRS_BSW_00323, SRS_BSW_00369, SRS_BSW_00386)
8.3.4.7 Nm_CheckRemoteSleepIndication
[SWS_Nm_00042] d
Service Name Nm_CheckRemoteSleepIndication
Syntax Std_ReturnType Nm_CheckRemoteSleepIndication (
NetworkHandleType nmNetworkHandle,
boolean* nmRemoteSleepIndPtr
)
4
Description Check if remote sleep indication takes place or not. For that purpose <BusNm>_CheckRemote
SleepIndication shall be called in case NmBusType is not set to NM_BUSNM_LOCALNM. (e.g.
CanNm_CheckRemoteSleepIndication function is called if channel is configured as CAN).
Available via Nm.h
c(SRS_Nm_02513)
[SWS_Nm_00149] dCaveats of Nm_CheckRemoteSleepIndication: The
<BusNm> and the Nm itself are initialized correctly.c(SRS_BSW_00101, SRS_-
BSW_00416)
[SWS_Nm_00290] dIf Nm_CheckRemoteSleepIndication is called with a network
handle where NmPassiveModeEnabled is set to TRUE it shall not execute any func-
tionality and return with E_NOT_OK. If NmDevErrorDetect is set to TRUE then it shall
raise the error NM_E_INVALID_CHANNEL in this case.c(SRS_Nm_00150)
[SWS_Nm_00150] dConfiguration of Nm_CheckRemoteSleepIndication: This
function is only available if NmRemoteSleepIndEnabled is set to TRUE.c(SRS_Nm_-
00150)
[SWS_Nm_00499] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_CheckRemoteSleepIndication shall raise the error NM_E_IN-
VALID_CHANNEL if the parameter nmNetworkHandle is not a configured network
handle.c(SRS_BSW_00323, SRS_BSW_00369, SRS_BSW_00386)
8.3.4.8 Nm_GetState
[SWS_Nm_00043] d
Service Name Nm_GetState
Syntax Std_ReturnType Nm_GetState (
NetworkHandleType nmNetworkHandle,
Nm_StateType* nmStatePtr,
Nm_ModeType* nmModePtr
)
4
Return value Std_ReturnType E_OK: No error
E_NOT_OK: Getting of NM state has failed
NetworkHandle does not exist (development only)
Module not yet initialized (development only)
Description Returns the state of the network management. The function <BusNm>_GetState shall be
called in case NmBusType is not set to NM_BUSNM_LOCALNM. (e.g. CanNm_GetState
function is called if channel is configured as CAN).
Available via Nm.h
c(SRS_Nm_00050)
[SWS_Nm_00151] dCaveats of Nm_GetState: The <BusNm> and the Nm itself are
initialized correctly.c(SRS_BSW_00101, SRS_BSW_00416)
[SWS_Nm_00500] dIf the pre-processor switch NmDevErrorDetect is set to TRUE,
the function Nm_GetState shall raise the error NM_E_INVALID_CHANNEL if the pa-
rameter nmNetworkHandle is not a configured network handle.c(SRS_BSW_00323,
SRS_BSW_00369, SRS_BSW_00386)
8.3.4.9 Nm_GetVersionInfo
[SWS_Nm_00044] d
Service Name Nm_GetVersionInfo
Syntax void Nm_GetVersionInfo (
Std_VersionInfoType* nmVerInfoPtr
)
8.3.4.10 Nm_PnLearningRequest
[SWS_Nm_91003]{DRAFT} d
c()
Note: Caveats of Nm_PnLearningRequest: The <BusNm> and the Nm itself are
initialized correctly.
[SWS_Nm_00502]{DRAFT} dNm_PnLearningRequest shall only be available if Nm-
DynamicPncToChannelMappingSupport is set to TRUE.c()
[SWS_Nm_00503]{DRAFT} dIf Nm_PnLearningRequest is called with a network
handle for a bus system where NmDynamicPncToChannelMappingEnabled is set
to FALSE Nm shall not execute any functionality and return with E_NOT_OK. If NmDev-
ErrorDetect is set to TRUE then it shall raise the error NM_E_INVALID_CHANNEL
in this case.c()
[SWS_Nm_00505]{DRAFT} dIf the pre-processor switch NmDevErrorDetect is set
to TRUE, the function Nm_PnLearningRequest shall raise the error NM_E_IN-
VALID_CHANNEL if the parameter NetworkHandle is not a configured network han-
dle.c(SRS_BSW_00323, SRS_BSW_00369, SRS_BSW_00386)
[SWS_Nm_00028] dAll callbacks of the Nm shall assume that they can run either in
task or in interrupt context.c(SRS_BSW_00333)
8.4.1.1 Nm_NetworkStartIndication
[SWS_Nm_00154] d
Service Name Nm_NetworkStartIndication
Syntax void Nm_NetworkStartIndication (
NetworkHandleType nmNetworkHandle
)
c(SRS_BSW_00359, SRS_Nm_02513)
[SWS_Nm_00155] dThe indication through callback function Nm_Network-
StartIndication: shall be forwarded to ComM by calling the ComM_Nm_-
NetworkStartIndication.c(SRS_Nm_02513)
8.4.1.2 Nm_NetworkMode
[SWS_Nm_00156] d
Service Name Nm_NetworkMode
Syntax void Nm_NetworkMode (
NetworkHandleType nmNetworkHandle
)
4
Parameters (inout) None
Parameters (out) None
Return value None
Description Notification that the network management has entered Network Mode.
Available via Nm.h
c(SRS_BSW_00359, SRS_Nm_00051)
[SWS_Nm_00158] dThe indication through callback function Nm_NetworkMode: shall
be forwarded to ComM by calling the ComM_Nm_NetworkMode.c(SRS_Nm_00051)
8.4.1.3 Nm_BusSleepMode
[SWS_Nm_00162] d
Service Name Nm_BusSleepMode
Syntax void Nm_BusSleepMode (
NetworkHandleType nmNetworkHandle
)
c(SRS_BSW_00359, SRS_Nm_00051)
[SWS_Nm_00163] dThe indication through callback function Nm_BusSleepMode:
shall be forwarded to ComM by calling the ComM_Nm_BusSleepMode.c(SRS_Nm_-
00051)
8.4.1.4 Nm_PrepareBusSleepMode
[SWS_Nm_00159] d
c(SRS_BSW_00359, SRS_Nm_00051)
[SWS_Nm_00161] dThe indication through callback function Nm_PrepareBus-
SleepMode: shall be forwarded to ComM by calling ComM_Nm_PrepareBusSleep-
Mode.c(SRS_Nm_00051)
8.4.1.5 NM_SynchronizeMode
[SWS_Nm_91002] d
Service Name Nm_SynchronizeMode
Syntax void Nm_SynchronizeMode (
NetworkHandleType nmNetworkHandle
)
c()
8.4.1.6 Nm_RemoteSleepIndication
[SWS_Nm_00192] d
c(SRS_BSW_00359, SRS_Nm_00052)
[SWS_Nm_00277] dConfiguration of Nm_RemoteSleepIndication: This function is
only available if NmRemoteSleepIndEnabled is set to TRUE.c(SRS_Nm_00150)
The notification that all other nodes on the network are ready to enter Bus-Sleep Mode
is only needed for internal purposes of the NM Coordinator.
Note: When NM Coordinator functionality is disabled Nm_RemoteSleepIndication
can be an empty function.
8.4.1.7 Nm_RemoteSleepCancellation
[SWS_Nm_00193] d
Service Name Nm_RemoteSleepCancellation
Syntax void Nm_RemoteSleepCancellation (
NetworkHandleType nmNetworkHandle
)
c(SRS_BSW_00359, SRS_Nm_02509)
8.4.1.8 Nm_SynchronizationPoint
[SWS_Nm_00194] d
Service Name Nm_SynchronizationPoint
Syntax void Nm_SynchronizationPoint (
NetworkHandleType nmNetworkHandle
)
c(SRS_BSW_00359, SRS_Nm_02516)
The notification that this is a suitable point in time to initiate the coordinated shut-
down is only needed for internal purposes of the NM Coordinator.
8.4.1.9 Nm_CoordReadyToSleepIndication
[SWS_Nm_00254] d
Service Name Nm_CoordReadyToSleepIndication
Syntax void Nm_CoordReadyToSleepIndication (
NetworkHandleType nmChannelHandle
)
4
Sync/Async Synchronous
Reentrancy Non Reentrant
Parameters (in) nmChannelHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value None
Description Sets an indication, when the NM Coordinator Sleep Ready bit in the Control Bit Vector is set
Available via Nm.h
c(SRS_BSW_00359, SRS_Nm_02535)
[SWS_Nm_00255] dConfiguration of Nm_CoordReadyToSleepIndication: Op-
tional
If NmCoordinatorSyncSupport is set to TRUE , the Nm shall provide the API Nm_-
CoordReadyToSleepIndication.c(SRS_Nm_00150)
8.4.1.10 Nm_CoordReadyToSleepCancellation
[SWS_Nm_00272] d
Service Name Nm_CoordReadyToSleepCancellation
Syntax void Nm_CoordReadyToSleepCancellation (
NetworkHandleType nmChannelHandle
)
c(SRS_BSW_00359, SRS_Nm_02535)
[SWS_Nm_00273] dConfiguration of Nm_CoordReadyToSleepCancellation: Op-
tional
If NmCoordinatorSyncSupport is set to TRUE , the Nm shall provide the API Nm_-
CoordReadyToSleepCancellation.c(SRS_Nm_00150)
8.4.1.11 Nm_ForwardSynchronizedPncShutdown
[SWS_Nm_91004]{DRAFT} d
Service Name Nm_ForwardSynchronizedPncShutdown (draft)
Syntax void Nm_ForwardSynchronizedPncShutdown (
void
)
c(SRS_Nm_02544)
The following call-back notifications are provided by NM Interface for OEM specific
extensions of bus specific NM components and are not required by any AUTOSAR
module. In the context of the Basic functionality and NM Coordinator functionality they
have no specific usage.
8.4.2.1 Nm_PduRxIndication
[SWS_Nm_00112] d
Service Name Nm_PduRxIndication
Syntax void Nm_PduRxIndication (
NetworkHandleType nmNetworkHandle
)
4
Parameters (in) nmNetworkHandle Identification of the NM-channel
Parameters (inout) None
Parameters (out) None
Return value None
Description Notification that a NM message has been received.
Available via Nm.h
c(SRS_BSW_00359)
The notification that an NM message has been received is only needed for OEM
specific extensions of the NM Coordinator.
8.4.2.2 Nm_StateChangeNotification
[SWS_Nm_00114] d
Service Name Nm_StateChangeNotification
Syntax void Nm_StateChangeNotification (
NetworkHandleType nmNetworkHandle,
Nm_StateType nmPreviousState,
Nm_StateType nmCurrentState
)
c(SRS_BSW_00359, SRS_Nm_00050)
The notification that the state of the bus-specific NM has changed is only needed for
OEM specific extensions and for the optional Dynamic PNC-to-channel-mapping fea-
ture.
[SWS_Nm_00165] dConfiguration of Nm_StateChangeNotification: This func-
tion is only available if NmStateChangeIndEnabled is set to TRUE.c(SRS_Nm_-
00150)
8.4.2.3 Nm_RepeatMessageIndication
[SWS_Nm_00230] d
Service Name Nm_RepeatMessageIndication
Syntax void Nm_RepeatMessageIndication (
NetworkHandleType nmNetworkHandle,
boolean pnLearningBitSet
)
c(SRS_BSW_00359, SRS_Nm_00153)
The notification that an NM message with the set Repeat Message Bit has been re-
ceived is only needed for OEM specific extensions and for the optional Dynamic PNC-
to-channel-mapping feature.
[SWS_Nm_00504]{DRAFT} dIf Nm_RepeatMessageIndication is called with
pnLearningBitSet set to TRUE and NmDynamicPncToChannelMappingEn-
abled is set to TRUE for the provided nmNetworkHandle Nm shall call
ComM_Nm_PncLearningBitIndication with the corresponding network handle.c
()
8.4.2.4 Nm_TxTimeoutException
[SWS_Nm_00234] d
Service Name Nm_TxTimeoutException
Syntax void Nm_TxTimeoutException (
NetworkHandleType nmNetworkHandle
)
4
Parameters (in) nmNetworkHandle –
Parameters (inout) None
Parameters (out) None
Return value None
Description Service to indicate that an attempt to send an NM message failed.
Available via Nm.h
c(SRS_BSW_00359)
The notification that an attempt to send an NM message failed is only needed for OEM
specific extensions of the Nm.
8.4.2.5 Nm_CarWakeUpIndication
[SWS_Nm_00250] d
Service Name Nm_CarWakeUpIndication
Syntax void Nm_CarWakeUpIndication (
NetworkHandleType nmChannelHandle
)
c(SRS_BSW_00359, SRS_Nm_02503)
[SWS_Nm_00251] dConfiguration of Nm_CarWakeUpIndication: Optional
If NmCarWakeUpRxEnabled is TRUE, The Nm shall provide the API Nm_CarWake-
UpIndication.c(SRS_Nm_00150)
[SWS_Nm_00121] dIn case the main function is called before the Nm has been ini-
tialized, the main function shall immediately return without yielding an error.c(SRS_-
BSW_00450)
Rationale: In case the NM Coordinator functionality is not used and/or disabled, calling
the main function shall not yield in an error, but nothing should be performed.
8.5.1 Nm_MainFunction
[SWS_Nm_00118] d
Service Name Nm_MainFunction
Syntax void Nm_MainFunction (
void
)
c(SRS_BSW_00424, SRS_BSW_00425)
[SWS_Nm_00279] dIf NmCoordinatorSupportEnabled is set to TRUE, the Nm_-
MainFunction API shall be available.c(SRS_Nm_00150)
4
API Function Header File Description
ComM_Nm_ForwardSynchronizedPnc ComM_Nm.h If an ECU in role of an intermediate PNC
Shutdown coordinator receives a PN shutdown message via a
<Bus>Nm, then ComM is immediately indicated via
ComM_Nm_ForwardSynchronizedPncShutdown to
forward the request for a synchronized PNC
shutdown of the affected PNCs. Therefore, ComM
will immediately release the affected PNC state
machines and forward the PN information to the
affected ComM Channels and the corresponding
NM channels, respectively. Note: This supports a
nearly synchronized PNC shutdown across the PN
topology from the top-level PNC coordinator down to
the subordinated PNC node.
Tags:atp.Status=draft
ComM_Nm_NetworkMode ComM_Nm.h Notification that the network management has
entered Network Mode.
ComM_Nm_NetworkStartIndication ComM_Nm.h Indication that a NM-message has been received in
the Bus Sleep Mode, what indicates that some
nodes in the network have already entered the
Network Mode.
ComM_Nm_PrepareBusSleepMode ComM_Nm.h Notification that the network management has
entered Prepare Bus-Sleep Mode. Reentrancy:
Reentrant (but not for the same NM-Channel)
ComM_Nm_RestartIndication ComM_Nm.h If NmIf has started to shut down the coordinated
busses, AND not all coordinated busses have
indicated bus sleep state, AND on at least on one of
the coordinated busses NM is restarted, THEN the
NM Interface shall call the callback function ComM_
Nm_RestartIndication with the nmNetworkHandle of
the channels which have already indicated bus
sleep state.
c(SRS_Nm_02515, SRS_Nm_02536)
This chapter defines all interfaces that are required to fulfill an optional functionality of
the module.
[SWS_Nm_00166] d
API Function Header File Description
BswM_Nm_CarWakeUpIndication BswM_Nm.h Function called by Nm to indicate a CarWakeup.
CanNm_PassiveStartUp CanNm.h Passive startup of the AUTOSAR CAN NM. It
triggers the transition from Bus-Sleep Mode or
Prepare Bus Sleep Mode to the Network Mode in
Repeat Message State.
Caveats: CanNm is initialized correctly.
5
4
API Function Header File Description
CanNm_PnLearningRequest CanNm.h Set Repeat Message Request Bit and Partial
Network Learning Bit for NM messages transmitted
next on the bus. This will force all nodes to enter the
PNC Learning Phase. This is needed for the
optional Dynamic PNC-to-channel-mapping feature.
Tags:atp.Status=draft
CanNm_RequestSynchronizedPnc CanNm.h Requests transmission of a NM-PDU with PNSR bit
Shutdown set to 1 (PN shutdown message)
Tags:atp.Status=draft
Com_SendSignal Com.h The service Com_SendSignal updates the signal
object identified by SignalId with the signal
referenced by the SignalDataPtr parameter.
ComM_Nm_PncLearningBitIndication ComM_Nm.h Service to indicate that an NM message with set
PNC Learning Bit has been received.
Tags:atp.Status=draft
ComM_Nm_RepeatMessageLeft ComM_Nm.h Notification that the state of all <BusNm> has left
Indication RepeatMessage. This interface is used to indicate
by the optional Dynamic PNC-to-channel-mapping
feature to indicate that learning phase ends.
Tags:atp.Status=draft
Det_ReportError Det.h Service to report development errors.
FrNm_PassiveStartUp FrNm.h Initiates the Passive Startup of the FlexRay NM.
FrNm_PnLearningRequest FrNm.h Set Repeat Message Request Bit and Partial
Network Learning Bit for NM messages transmitted
next on the bus. This will force all nodes to enter the
PNC Learning Phase. This is needed for the
optional Dynamic PNC-to-channel-mapping feature.
Tags:atp.Status=draft
FrNm_RequestSynchronizedPnc FrNm.h Requests transmission of a NM-PDU with PNSR bit
Shutdown set to 1 (PN shutdown message)
Tags:atp.Status=draft
J1939Nm_PassiveStartUp J1939Nm.h Passive startup of the NM. It triggers the transition
from Bus-Sleep Mode to the Network Mode without
requesting the network.
UdpNm_PassiveStartUp UdpNm.h Passive startup of the AUTOSAR UdpNm. It triggers
the transition from Bus-Sleep Mode or Prepare Bus
Sleep Mode to the Network Mode in Repeat
Message State.
Caveats: UdpNm is initialized correctly.
UdpNm_PnLearningRequest UdpNm.h Set Repeat Message Request Bit and Partial
Network Learning Bit for NM messages transmitted
next on the bus. This will force all nodes on the bus
to enter the PNC Learning Phase. This is needed
for the optional Dynamic PNC-to-channel-mapping
feature.
Tags:atp.Status=draft
UdpNm_RequestSynchronizedPnc UdpNm.h Requests transmission of a NM-PDU with PNSR bit
Shutdown set to 1 (PN shutdown message)
Tags:atp.Status=draft
c(SRS_Nm_00150, SRS_Nm_02515)
In this chapter all interfaces are listed where the target function could be configured.
The target function is usually a call-back function. The names of these kind of inter-
faces are not fixed because they are configurable.
8.6.3.1 NmCarWakeUpCallout
[SWS_Nm_00291] d
Service Name <NmCarWakeUpCallout>
Syntax void <NmCarWakeUpCallout> (
NetworkHandleType nmNetworkHandle
)
c(SRS_Nm_02504)
9 Sequence diagrams
Nm_NetworkRelease(Std_ReturnType,
NetworkHandleType)
Nm_RemoteSleepIndication
(NetworkHandleType)
Nm_RemoteSleepIndication
(NetworkHandleType)
Repetition cycle
boundary()
Nm_SynchronizationPoint
(NetworkHandleType)
Start shutdown
timers()
FrNm_RequestBusSynchronization(Std_ReturnType,
NetworkHandleType)
FrNm_NetworkRelease(Std_ReturnType,
NetworkHandleType)
Repetition cycle
boundary()
Network Mode
Ready Sleep
Last repetition
Nm_BusSleepMode(NetworkHandleType) cycle finished()
[CAN]
Shutdown timer expires
()
CanNm_RequestBusSynchronization(Std_ReturnType,
NetworkHandleType)
CanNm_NetworkRelease(Std_ReturnType,
NetworkHandleType)
Network Mode
Ready Sleep
Timer expires
()
Nm_PrepareBusSleepMode(NetworkHandleType)
Nm_BusSleepMode(NetworkHandleType)
ComM_Nm_BusSleepMode
(NetworkHandleType) Bus-Sleep Mode
CanSM_RequestComMode(Std_ReturnType,
NetworkHandleType, ComM_ModeType)
10 Configuration specification
The following chapter contains tables of all configuration parameters and switches
used to determine the functional units of the Generic Network Management Interface.
The default values of configuration parameters are denoted as bold.
In general, this chapter defines configuration parameters and their clustering into con-
tainers. section 10.1 describes fundamentals. section 10.2, section 10.3 and section
10.4 specifies the structure (containers) and the parameters of the Nm. The section
10.5 specifies published information of the Nm.
AUTOSARParameterDefinition:
EcucDefinitionCollection
lowerMultiplicity = 0
upperMultiplicity = 1
FrNm: EcucModuleDef
+module
lowerMultiplicity = 0
upperMultiplicity = 1
UdpNm: EcucModuleDef
+module
lowerMultiplicity = 0
upperMultiplicity = 1
J1939Nm: EcucModuleDef
+module
lowerMultiplicity = 0
upperMultiplicity = 1
10.2.1 Nm
+subContainer NmGlobalProperties:
EcucParamConfContainerDef
+container
+subContainer NmGlobalFeatures:
EcucParamConfContainerDef
NmEcucPartitionRef:
+reference EcucReferenceDef
lowerMultiplicity = 0
upperMultiplicity = 1
+destination
EcucPartition:
+container EcucParamConfContainerDef
NmChannelConfig:
EcucParamConfContainerDef lowerMultiplicity = 0
upperMultiplicity = *
upperMultiplicity = *
lowerMultiplicity = 1
10.3.1 NmGlobalConfig
Included Containers
Container Name Multiplicity Scope / Dependency
NmGlobalConstants 1
NmGlobalFeatures 1
NmGlobalProperties 1
NmNumberOfChannels:
NmGlobalConfig: NmGlobalConstants: EcucIntegerParamDef
+subContainer EcucParamConfContainerDef +parameter
EcucParamConfContainerDef
min = 1
upperMultiplicity = 1 max = 255
lowerMultiplicity = 1
NmDevErrorDetect:
NmGlobalProperties: +parameter EcucBooleanParamDef
EcucParamConfContainerDef
defaultValue = false
+parameter NmVersionInfoApi:
EcucBooleanParamDef
+subContainer
defaultValue = false
NmCycletimeMainFunction:
+parameter EcucFloatParamDef
min = 0
max = INF
lowerMultiplicity = 0
upperMultiplicity = 1
+parameter NmUserDataEnabled:
NmCoordinatorSupportEnabled:
+parameter EcucBooleanParamDef
EcucBooleanParamDef
defaultValue = false
+parameter NmStateChangeIndEnabled:
EcucBooleanParamDef
NmRemoteSleepIndEnabled: +parameter
EcucBooleanParamDef
NmCarWakeUpRxEnabled:
+parameter
EcucBooleanParamDef
NmBusSynchronizationEnabled: +parameter defaultValue = false
EcucBooleanParamDef
NmCarWakeUpCallout:
NmGlobalCoordinatorTime: +parameter EcucFunctionNameDef
EcucFloatParamDef
+parameter lowerMultiplicity = 0
min = 0 upperMultiplicity = 1
max = INF
lowerMultiplicity = 0
upperMultiplicity = 1
+parameter NmCoordinatorSyncSupport:
EcucBooleanParamDef
NmDynamicPncToChannelMappingSupport: +parameter
EcucBooleanParamDef
+parameter NmPduRxIndicationEnabled:
EcucBooleanParamDef
NmSynchronizedPncShutdownEnabled: +parameter
EcucBooleanParamDef
defaultValue = false
lowerMultiplicity = 0
upperMultiplicity = 1
10.3.2 NmGlobalConstants
No Included Containers
10.3.3 NmGlobalProperties
Multiplicity 1
Type EcucBooleanParamDef
Default Value false
Post-Build Variant false
Value
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local
No Included Containers
10.3.4 NmGlobalFeatures
Tags:
atp.Status=draft
Multiplicity 1
Type EcucBooleanParamDef
Default Value
Post-Build Variant false
Value
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local
Note that this feature should not be used if all NM channels have
Passive Mode enabled.
Multiplicity 1
Type EcucBooleanParamDef
Default Value
Post-Build Variant false
Value
Value Configuration Pre-compile time X All Variants
Class
Link time –
Post-build time –
Scope / Dependency scope: local
dependency: If NmCoordinatorSupportEnabled == TRUE then
NmRemoteSleepIndEnabled = TRUE
Tags:
atp.Status=draft
Multiplicity 0..1
Type EcucBooleanParamDef
Default Value false
Post-Build Variant false
Multiplicity
Post-Build Variant false
Value
Multiplicity Pre-compile time X VARIANT-PRE-COMPILE
Configuration Class
Link time X VARIANT-LINK-TIME
Post-build time –
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time –
Scope / Dependency scope: local
No Included Containers
10.4.1 NmChannelConfig
If this parameter is set to TRUE, the Nm shall assume that the channel
is always ready to go to sleep and that no calls to
Nm_RemoteSleepIndication or Nm_RemoteSleepCancellation will be
made from the <BusNm> representing this channel.
If this parameter is set to FALSE, the Nm shall not assume that the
network is ready to sleep until a call has been made to
Nm_RemoteSleepCancellation.
Multiplicity 1
Type EcucBooleanParamDef
Default Value
Post-Build Variant false
Value
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time –
Scope / Dependency scope: local
dependency: If the parameter NmCoordClusterIndex is not defined,
this parameter is not valid.
Tags:
atp.Status=draft
Multiplicity 0..1
Type EcucBooleanParamDef
Default Value false
Post-Build Variant false
Value
Value Configuration Pre-compile time X VARIANT-PRE-COMPILE
Class
Link time X VARIANT-LINK-TIME
Post-build time –
Scope / Dependency scope: local
dependency: Shall only be TRUE if
NmDynamicPncToChannelMappingSupport is TRUE
Included Containers
Container Name Multiplicity Scope / Dependency
NmBusType 1
NmChannelConfig: ComMChannel:
EcucParamConfContainerDef +reference NmComMChannelRef: EcucReferenceDef +destination EcucParamConfContainerDef
requiresSymbolicNameValue = true
upperMultiplicity = * lowerMultiplicity = 1
lowerMultiplicity = 1 upperMultiplicity = 256
NmCoordClusterIndex: EcucIntegerParamDef
+parameter lowerMultiplicity = 0
upperMultiplicity = 1
min = 0
max = 255
NmActiveCoordinator: EcucBooleanParamDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = 1
+parameter NmDynamicPncToChannelMappingEnabled:
EcucBooleanParamDef
+parameter NmSynchronizingNetwork: EcucBooleanParamDef defaultValue = false
lowerMultiplicity = 0
upperMultiplicity = 1
NmComUserDataSupport: EcucBooleanParamDef
+parameter
lowerMultiplicity = 0
upperMultiplicity = 1
defaultValue = false
+choice +choice
min = 0
max = INF
+parameter NmStateReportEnabled:
EcucBooleanParamDef
10.4.2 NmBusType
Container Choices
Container Name Multiplicity Scope / Dependency
NmGenericBusNmConfig 0..1
NmStandardBusNm 0..1
Config
10.4.3 NmGenericBusNmConfig
No Included Containers
10.4.4 NmStandardBusNmConfig
No Included Containers