DEENESPTFRRUARHIKOZHNL

CAN Network Management (CanNm)

ModulCanNm (CAN Network Management)
BSW-Modul-ID31
Standard-Header#include "CanNm.h"
SWS-SpezifikationAUTOSAR_CP_SWS_CANNetworkManagement.pdf, AUTOSAR_SWS_CANNetworkManagement.pdf, AUTOSAR_SWS_CAN_Generic_NM.pdf, AUTOSAR_SWS_CAN_NM.pdf
Umfang141 Records · 13 Snippets
ClusterCAN-Stack

CAN Network Management (CanNm)

AUTOSAR Classic Communication Services-Modul CAN Network Management (CanNm, Spezifikation: AUTOSAR_CP_SWS_CANNetworkManagement.pdf, AUTOSAR_SWS_CANNetworkManagement.pdf, AUTOSAR_SWS_CAN_Generic_NM.pdf, AUTOSAR_SWS_CAN_NM.pdf).

Funktionen — Übersicht

Typen — Übersicht

Anforderungen — Übersicht

Funktionen & Typen — Detailansicht

函数 CanNm_Init [SWS_CanNm_00208] 📄 PDF

void CanNm_Init(const CanNm_ConfigType* cannmConfigPtr);

Initialize the Can Nm module.

函数 CanNm_PassiveStartUp [SWS_CanNm_00211] 📄 PDF

Std_ReturnType CanNm_PassiveStartUp(NetworkHandleType nmChannelHandle);

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: Can Nm is initia lized correctly.

函数 CanNm_NetworkRelease [SWS_CanNm_00214] 📄 PDF

Std_ReturnType CanNm_NetworkRelease(NetworkHandleType nmChannelHandle);

Release the network, since ECU doesn't have to communicate on the bus.

函数 CanNm_DisableCommunication [SWS_CanNm_00215] 📄 PDF

Std_ReturnType CanNm_DisableCommunication(NetworkHandleType nmChannelHandle);

Disable the NM PDU transmission ability due to a ISO14229 Communication Control (28hex) service

函数 CanNm_EnableCommunication [SWS_CanNm_00216] 📄 PDF

Std_ReturnType CanNm_EnableCommunication(NetworkHandleType nmChannelHandle);

Enable the NM PDU transmission ability due to a ISO14229 Communication Control (28hex) service

函数 CanNm_RepeatMessageRequest [SWS_CanNm_00221] 📄 PDF

Std_ReturnType CanNm_RepeatMessageRequest(NetworkHandleType nmChannelHandle);

Set Repeat Message Request Bit for NM PDUs transmitted next on the bus.

函数 CanNm_GetState [SWS_CanNm_00223] 📄 PDF

Std_ReturnType CanNm_GetState(NetworkHandleType nmChannelHandle, Nm_StateType* nmStatePtr, Nm_ModeType* nmModePtr);

Returns the state and the mode of the network management.

函数 CanNm_CheckRemoteSleepIndication [SWS_CanNm_00227] 📄 PDF

Std_ReturnType CanNm_CheckRemoteSleepIndication(NetworkHandleType nmChannelHandle, boolean* nmRemoteSleepIndPtr);

Check if remote sleep indication takes place or not.

函数 CanNm_TxConfirmation [SWS_CanNm_00228] 📄 PDF

void CanNm_TxConfirmation(PduIdType TxPduId, Std_ReturnType result);

The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.

函数 CanNm_MainFunction [SWS_CanNm_00234] 📄 PDF

void CanNm_MainFunction(void);

Main function of the Can Nm which processes the algorithm describes in that document.

函数 CanNm_ConfirmPnAvailability [SWS_CanNm_00344] 📄 PDF

void CanNm_ConfirmPnAvailability(NetworkHandleType nmChannelHandle);

Enables the PN filter functionality on the indicated NM channel. Availability: The API is only available if Can Nm Global Pn Support is TRUE.

函数 CanNm_TriggerTransmit [SWS_CanNm_91001] 📄 PDF

Std_ReturnType CanNm_TriggerTransmit(PduIdType TxPduId, PduInfoType* PduInfoPtr);

Within this API, the upper layer module (called module) shall check whether the available data fits into the buffer size reported by Pdu Info Ptr - >Sdu Length. If it fits, it shall copy its data into the buffer provided by Pdu Info Ptr - >Sdu Data Ptr and update the length of the actual copied data in Pdu Info Ptr - >Sdu Length. If not, it returns E_ NOT_ OK without changing Pdu Info Ptr.

函数 CanNm_RequestSynchronizedPncShutdown [SWS_CanNm_91003] 📄 PDF

Std_ReturnType CanNm_RequestSynchronizedPncShutdown(NetworkHandleType nmChannelHandle, PNCHandleType pncId);

Requests transmission of a NM - PDU with PNSR bit set to 1 (PN shutdown message) Tags: atp.Status=draft

函数 CanNm_PnLearningRequest [SWS_CanNm_91004] 📄 PDF

Std_ReturnType CanNm_PnLearningRequest(NetworkHandleType nmChannelHandle);

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.

函数 CanNm_ActivateTxPnShutdownMsg [SWS_CanNm_91005] 📄 PDF

Std_ReturnType CanNm_ActivateTxPnShutdownMsg(NetworkHandleType nmChannelHandle);

NM indicate to activate the transmission of PN shutdown messages on the given NM - Channel. This results in transmission of a NM - PD U with PNSR bit set to 1 (PN shutdown message).

函数 CanNm_DeactivateTxPnShutdownMsg [SWS_CanNm_91006] 📄 PDF

Std_ReturnType CanNm_DeactivateTxPnShutdownMsg(NetworkHandleType nmChannelHandle);

NM indicate to deactive the transmission of PN shutdown messages on the given NM - Channel. This result in transmission of a usual NM - PDUs with PNSR bit set to 0.

类型 CanNm_ConfigType [SWS_CanNm_00447] 📄 PDF

This type shall contain at least all parameters that are post - build able according to chapter 10.

requirement SWS_CanNm_00006 [SWS_CanNm_00006] 📄 PDF

If Normal Operation State is entered from Ready Sleep State the transmission of NM PDUs shall be started immediately.

requirement SWS_CanNm_00013 [SWS_CanNm_00013] 📄 PDF

The CanNm module shall set the S ource N ode I dentifier with the configuration parameter CanNmNodeId unless CanNmPduNidPosition is set to off.

requirement SWS_CanNm_00045 [SWS_CanNm_00045] 📄 PDF

The Control Bit Vector shall consist of Bit 0: Repeat Message Request Bit 0: Repeat Message State not requested 1: Repeat Message State requested Bit 1 : PN Shutdown Request Bit (PNSR) 0: NM message does not contain synchronized Partial Network shutdown re quest 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 mai n 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 Part ial Network Information Bit (PNI) 0: NM PDU contains no Partial Network request information 1: NM PDU contains Partial Network request information Bit 2 and 7 are reserved for future extensions 0: Disabled / Reserved for future usage

requirement SWS_CanNm_00073 [SWS_CanNm_00073] 📄 PDF

[SWS_CanNm_00073] ⌈If CanNmPassiveModeEnabled is set to TRUE or CanNmImmediateTxconfEnabled is set to TRUE CanNm shall not perform transmission error handling and omit the requirements [SWS_CanNm_00061],

requirement SWS_CanNm_00074 [SWS_CanNm_00074] 📄 PDF

The location of the S ource N ode I dentifier shall be configurable by means of CanNmPduNidPosition to Byte 0, Byte 1, or off.

requirement SWS_CanNm_00075 [SWS_CanNm_00075] 📄 PDF

The location of the C ontrol Bit V ector shall be configurable by means of C anNmPduCbvPosition to Byte 0, By te 1, or off.

requirement SWS_CanNm_00130 [SWS_CanNm_00130] 📄 PDF

[SWS_CanNm_00130] Upstream requirements: RS_Nm_02516 ⌈The service call CanNm_RequestBusSynchronization shall trigger transmission of a single Network Management PDU if CanNmPassiveModeEnabled (configuration parameter) is not defined.⌋ Rationale: This service is typically used for supporting the NM gateway extensions.

requirement SWS_CanNm_00132 [SWS_CanNm_00132] 📄 PDF

[SWS_CanNm_00132] Upstream requirements: RS_Nm_02506, SRS_BSW_00483 ⌈The service call CanNm_GetNodeIdentifier shall provide the node identifier out of the most recently received Network Management PDU if CanNmNodeIdEnabled is set to TRUE.⌋

requirement SWS_CanNm_00133 [SWS_CanNm_00133] 📄 PDF

[SWS_CanNm_00133] Upstream requirements: RS_Nm_02508, SRS_BSW_00483 ⌈The service call CanNm_GetLocalNodeIdentifier shall provide the node identi- fier configured for the local host node if CanNmNodeIdEnabled is set to TRUE.⌋

requirement SWS_CanNm_00138 [SWS_CanNm_00138] 📄 PDF

The service call CanNm_GetPduData shall provide whole PDU data (Node ID, Control Bit Vector and User Data) of the most recently received Network Management PDU if CanNmNodeDetectionEnabled or Can nNmUserDataEnabled or CanNmNodeIdEnabled is set to TRUE.

requirement SWS_CanNm_00147 [SWS_CanNm_00147] 📄 PDF

If CanNm_PassiveStartUp is called in the Network Mode, the CanNm module shall not execute this service and shall return E_NOT_OK .

requirement SWS_CanNm_00153 [SWS_CanNm_00153] 📄 PDF

[SWS_CanNm_00153] Upstream requirements: RS_Nm_00052, RS_Nm_02509, SRS_BSW_00483 ⌈Service call CanNm_CheckRemoteSleepIndication shall provide the information about current status of Remote Sleep Indication (i.e. already detected or not).⌋

requirement SWS_CanNm_00172 [SWS_CanNm_00172] 📄 PDF

[SWS_CanNm_00172] ⌈The service CanNm_DisableCommunication shall return E_NOT_OK, if the current mode is not Network Mode.⌋

requirement SWS_CanNm_00176 [SWS_CanNm_00176] 📄 PDF

[SWS_CanNm_00176] Upstream requirements: RS_Nm_02512 ⌈The service CanNm_EnableCommunication shall enable the Network Management PDU transmission ability if the Network Management PDU transmission ability is dis- abled.⌋

requirement SWS_CanNm_00177 [SWS_CanNm_00177] 📄 PDF

[SWS_CanNm_00177] ⌈The service CanNm_EnableCommunication shall return E_NOT_OK if the Network Management PDU transmission ability is enabled.⌋

requirement SWS_CanNm_00187 [SWS_CanNm_00187] 📄 PDF

[SWS_CanNm_00187] Upstream requirements: RS_Nm_02516 ⌈If CanNm_RequestBusSynchronization is called in Bus-Sleep Mode and Prepare Bus-Sleep Mode the CanNm module shall not execute the service and shall return E_- NOT_OK.⌋

requirement SWS_CanNm_00189 [SWS_CanNm_00189] 📄 PDF

The CanNm module shall not return development errors by API functions; in case of a development error, the execution of the respective API function shall be aborted and E_NOT_OK shall be returned, if applicable.

requirement SWS_CanNm_00190 [SWS_CanNm_00190] 📄 PDF

The CanNm module sha ll not return production errors by API functions; in case of a production error, the execution of the respective API function shall be aborted and E_NOT_OK shall be returned, if applicable.

requirement SWS_CanNm_00192 [SWS_CanNm_00192] 📄 PDF

When a CanNm service with an invalid networ k handle is called, the called function shall not be executed and it shall return E_NOT_OK to the calling function if applicable. If development error detection is enabled ( CanNmDevErrorDetect is set to TRUE ) the corresponding error CANNM_E_ INVALID_CHANNEL shall be reported to DET.

requirement SWS_CanNm_00193 [SWS_CanNm_00193] 📄 PDF

When the NM - Timeout Timer expires in the Repeat Message State the CanNm module shall report CANNM_E_NETWORK_TIMEOUT to the DET.

requirement SWS_CanNm_00194 [SWS_CanNm_00194] 📄 PDF

When the NM - Timeout Timer expires in the Normal Operation State the CanNm module shall report CANNM_E_NETWORK_TIMEOUT to the DET.

requirement SWS_CanNm_00195 [SWS_CanNm_00195] 📄 PDF

When a CanNm service with an inva lid PDU ID is called, the called function shall not be executed and it shall return E_NOT_OK to the calling function if applicable. If development error detection is enabled ( CanNmDevErrorDetect is set to TRUE ) the corresponding error CANNM_E_ INVALID_PDUID shall be reported to DET.

requirement SWS_CanNm_00245 [SWS_CanNm_00245] 📄 PDF

Module Header File Imported Type Com Stack_ Types Com Stack_ Types.h Network Handle Type Com Stack_ Types.h Pdu Id Type Com Stack_ Types.h Pdu Info Type Com Stack_ Types.h Pdu Length Type Nm Nm Stack_ types.h Nm _ Mode Type Nm Stack_ types.h Nm _ State Type Std Std_ Types.h Std _ Return Type Std_ Types.h Std _ Version Info Type

requirement SWS_CanNm_00254 [SWS_CanNm_00254] 📄 PDF

[SWS_CanNm_00254] ⌈Caveats of CanNm_PassiveStartUp: The CanNm module is initialized correctly.⌋

requirement SWS_CanNm_00255 [SWS_CanNm_00255] 📄 PDF

[SWS_CanNm_00255] ⌈The function CanNm_NetworkRequest shall change the Network state to ‘requested’.⌋

requirement SWS_CanNm_00256 [SWS_CanNm_00256] 📄 PDF

[SWS_CanNm_00256] ⌈Caveats of CanNm_NetworkRequest: The CanNm module is initialized correctly.⌋

requirement SWS_CanNm_00257 [SWS_CanNm_00257] 📄 PDF

[SWS_CanNm_00257] ⌈Configuration of CanNm_NetworkRequest: Optional (Only available if CanNmPassiveModeEnabled is not defined).⌋

requirement SWS_CanNm_00259 [SWS_CanNm_00259] 📄 PDF

[SWS_CanNm_00259] ⌈Caveats of CanNm_NetworkRelease: The CanNm module is initialized correctly.⌋

requirement SWS_CanNm_00260 [SWS_CanNm_00260] 📄 PDF

[SWS_CanNm_00260] ⌈Configuration of CanNm_NetworkRelease: Optional (Only available if CanNmPassiveModeEnabled is not defined)⌋

requirement SWS_CanNm_00261 [SWS_CanNm_00261] 📄 PDF

[SWS_CanNm_00261] ⌈Caveats of CanNm_DisableCommunication: The CanNm module is initialized correctly.⌋

requirement SWS_CanNm_00262 [SWS_CanNm_00262] 📄 PDF

[SWS_CanNm_00262] ⌈Configuration of CanNm_DisableCommunication: Op- tional (Only available if CanNmComControlEnabled is set to TRUE)⌋

requirement SWS_CanNm_00263 [SWS_CanNm_00263] 📄 PDF

[SWS_CanNm_00263] ⌈Caveats of CanNm_EnableCommunication: The CanNm module is initialized correctly.⌋

requirement SWS_CanNm_00264 [SWS_CanNm_00264] 📄 PDF

[SWS_CanNm_00264] ⌈Configuration of CanNm_EnableCommunication: Optional (Only available if CanNmComControlEnabled is set to TRUE).⌋

requirement SWS_CanNm_00265 [SWS_CanNm_00265] 📄 PDF

[SWS_CanNm_00265] ⌈Caveats of CanNm_SetUserData: The CanNm module is initialized correctly.⌋

requirement SWS_CanNm_00266 [SWS_CanNm_00266] 📄 PDF

[SWS_CanNm_00266] ⌈Configuration of CanNm_SetUserData: Optional (Only avail- able if CanNmUserDataEnabled is set to TRUE and CanNmPassiveModeEnabled is not defined)⌋

requirement SWS_CanNm_00267 [SWS_CanNm_00267] 📄 PDF

[SWS_CanNm_00267] ⌈Caveats of CanNm_GetUserData: The CanNm module is initialized correctly.⌋

requirement SWS_CanNm_00268 [SWS_CanNm_00268] 📄 PDF

[SWS_CanNm_00268] ⌈Configuration of CanNm_GetUserData: Optional (Only avail- able if CanNmUserDataEnabled is set to TRUE).⌋

requirement SWS_CanNm_00269 [SWS_CanNm_00269] 📄 PDF

[SWS_CanNm_00269] ⌈Caveats of CanNm_GetNodeIdentifier: The CanNm module is initialized correctly.⌋

requirement SWS_CanNm_00271 [SWS_CanNm_00271] 📄 PDF

[SWS_CanNm_00271] ⌈Caveats of CanNm_GetLocalNodeIdentifier: The CanNm module is initialized correctly.⌋

requirement SWS_CanNm_00273 [SWS_CanNm_00273] 📄 PDF

[SWS_CanNm_00273] ⌈Caveats of CanNm_RepeatMessageRequest: The CanNm module is initialized correctly.⌋

requirement SWS_CanNm_00275 [SWS_CanNm_00275] 📄 PDF

[SWS_CanNm_00275] ⌈Caveats of CanNm_GetPduData: The CanNm module is ini- tialized correctly.⌋

requirement SWS_CanNm_00277 [SWS_CanNm_00277] 📄 PDF

[SWS_CanNm_00277] ⌈Caveats of CanNm_GetState: The CanNm module is initial- ized correctly.⌋

requirement SWS_CanNm_00279 [SWS_CanNm_00279] 📄 PDF

[SWS_CanNm_00279] ⌈Caveats of CanNm_RequestBusSynchronization: The CanNm module is initialized correctly.⌋

requirement SWS_CanNm_00280 [SWS_CanNm_00280] 📄 PDF

[SWS_CanNm_00280] Upstream requirements: RS_Nm_02516 ⌈Configuration of CanNm_RequestBusSynchronization: Optional (Only available if CanNmBusSynchronizationEnabled is set to TRUE) and CanNmPassiveMod- eEnabled is not defined.⌋

requirement SWS_CanNm_00281 [SWS_CanNm_00281] 📄 PDF

[SWS_CanNm_00281] ⌈Caveats of CanNm_CheckRemoteSleepIndication: The CanNm module is initialized correctly.⌋

requirement SWS_CanNm_00282 [SWS_CanNm_00282] 📄 PDF

[SWS_CanNm_00282] ⌈Configuration of CanNm_CheckRemoteSleepIndication: Optional (Only available if CanNmRemoteSleepIndEnabled is set to TRUE).⌋

requirement SWS_CanNm_00283 [SWS_CanNm_00283] 📄 PDF

[SWS_CanNm_00283] ⌈Caveats of CanNm_TxConfirmation: • The call context is either on interrupt level (interrupt mode) or on task level (polling mode). This callback service is re-entrant for multiple CAN controller usage. • The CanNm module is initialized correctly. ⌋

requirement SWS_CanNm_00285 [SWS_CanNm_00285] 📄 PDF

[SWS_CanNm_00285] ⌈Caveats of CanNm_RxIndication: • Until this service returns the CAN Interface will not access canSduPtr. The can SduPtr is only valid and can be used by upper layers until the indication returns. CAN Interface guarantees that the number of configured bytes for this CanNm- RxPduId is valid. The call context is either on interrupt level (interrupt mode) or on task level (polling mode). This callback service is re-entrant for multiple CAN controller usage. • The CanNm module is initialized correctly. ⌋

requirement SWS_CanNm_00295 [SWS_CanNm_00295] 📄 PDF

[SWS_CanNm_00295] ⌈The service CanNm_EnableCommunication shall return E_NOT_OK, if the current mode is not Network Mode.⌋

requirement SWS_CanNm_00316 [SWS_CanNm_00316] 📄 PDF

Type of error Related error code Error value API service used without module initialization CANNM_ E_ UNINIT 0x01 API service called with wrong channel handle CANNM_ E_ INVALID_ CHANNEL 0x02 API service called with wrong PDU - ID CANNM_ E_ INVALID_ PDUID 0x03 Can Nm initialization has failed, e.g. selected configuration set doesn't exist. CANNM_ E_ INIT_ FAILED 0x05 Null pointer has been passed as an argument CANNM_ E_ PARAM_ POINTER 0x12 De Init API service called when not all CAN networks are in Bus Sleep mode CANNM_ E_ NOT_ IN_ BUS_ SLEEP 0x13

requirement SWS_CanNm_00317 [SWS_CanNm_00317] 📄 PDF

Type of error Related error code Error value Reception of NM PDUs in Bus - Sleep Mode. CANNM_ E_ NET_ START _ IND 0x04 NM - Timeout Timer has abnormally expired outside of the Ready Sleep State; it may happen: (1) because of Bus - Off state,(2)if some ECU requests bus communication or node detection shortly before the NM - Timeout Timer expires so that a Network Management PDU c an not be transmitted in time; this race condition applies to event - triggered systems CANNM_ E_ NETWORK_ TIMEOUT 0x11 A NM message with PN Shutdown Request Bit was received on a CANNM_ E_ 0x20 channel that is actively coordinated by the Com M PNC Gateway. INVA LID_ PN_ SYNC_ SHUTDOWN_ REQUEST

requirement SWS_CanNm_00324 [SWS_CanNm_00324] 📄 PDF

Det _ Report - Runtime Error Det.h Service to report runtime errors. If a callout has been configured then this callout shall be called. Nm _ Bus Sleep - Mode Nm.h Notification that the network management has entered Bus - Sleep Mode. Nm _ Network - Mode Nm.h Notification that the network manag ement has entered Network Mode. Nm _ Network - Start Indication Nm.h Notification that a NM - message has been received in the Bus - Sleep Mode, what indicates that some nodes in the network have already entered the Network Mode. Nm _ Prepare - Bus Sleep Mode Nm .h Notification that the network management has entered Prepare Bus - Sleep Mode.

requirement SWS_CanNm_00325 [SWS_CanNm_00325] 📄 PDF

Can If _ Transmit Can If.h Requests transmission of a PDU. Can S M _ Tx - Timeout Exception Can SM_ Can If.h This function shall notify the Can SM module, that the Can Nm has detected for the affected partial CAN network a tx timeout exception, which shall be recovered within the respective network state machine of the Can SM module. Det _ Report Error Det.h Service to report development errors. Nm _ Car Wake Up - Indication Nm.h This function is called by a <Bus>Nm to indicate reception of a CWU request. Nm _ Coord Ready - To Sleep - Cancellation Nm.h Cancels an indication, when the NM Coordinator Sleep Ready bit in the Control Bit Vector is set back to 0. Nm _ Coord Ready - To Sleep Indication Nm.h Sets an indication, when the NM Coordinator Sleep Ready bit in the Control Bit Vector is set Nm _ Forward - Synchronized Pnc - Shutdown Nm.h Notification that the network management has received a PN shutdown message on a particular NM - channel. This is used to grant a nearly synchronized PNC shutdown across the entire PN topology. Nm _ Pdu Rx - Indication Nm.h Not ification that a NM message has been received. Nm _ Pnc Bit Vector - Nm.h Indication that a bus specific network management has received a Rx Indication NM message on a particular NM - channel that contain a PNC bit vector. This is used to aggregate the exter nal PNC requests. The function evaluate if a relevant PNC request (PNC bit set to '1') is available in the given PNC bit vector. If a relevant PNC request is available (PNC bit passes the PNC bit vector filter), then the Relevant Pnc Request Detected Ptr r efers to a boolean with value set to TRUE. Otherwise refer to booelan with value set to FALSE. Relevant Pnc Request Detected Ptr is evaluated by the callee <Bus>Nm module to qualify the further processing of the received NM - PDU. Nm _ Pnc Bit Vector - Tx Con firmation Nm.h Function called by <Bus>Nms to confirm the state of the transmission for the given PNC bit vector on the given NM - Channel. Nm _ Pnc Bit Vector - Tx Indication Nm.h Function called by <Bus> Nms to request the aggregated internal PNC requests for transmission within the Nm message. Nm _ Remote - Sleep Cancellation Nm.h Notification that the network management has detected that not all other nodes on the network are longer ready to enter Bus - Sle ep Mode. Nm _ Remote - Sleep Indication Nm.h Notification that the network management has detected that all other nodes on the network are ready to enter Bus - Sleep Mode. Nm _ Repeat - Message - Indication Nm.h Service to indicate that an NM message with set Re peat Message Re - quest Bit has been received. This is needed for node detection and the Dynamic PNC - to - channel - mapping feature. Nm _ State - Change - Notification Nm.h Notification that the state of the lower layer <Bus>Nm has changed. Nm _ Tx Timeout - Except ion Nm.h Service to indicate that an attempt to send an NM message failed. Pdu R _ Can Nm Rx - Indication Pdu R_ Can Nm.h Indication of a received PDU from a lower layer communication interface module. Pdu R _ Can Nm - Trigger Transmit Pdu R_ Can Nm.h Within this API, the upper layer module (called module) shall check whether the available data fits into the buffer size reported by Pdu Info Ptr - >Sdu Length. If it fits, it shall copy its data into the buffer provided by Pdu Info Ptr - >Sdu Data Ptr and upd ate the length of the actual copied data in Pdu Info Ptr - >Sdu Length. If not, it returns E_ NOT_ OK without changing Pdu Info Ptr. Pdu R _ Can Nm Tx - Confirmation Pdu R_ Can Nm.h The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.

requirement SWS_CanNm_00330 [SWS_CanNm_00330] 📄 PDF

[SWS_CanNm_00330] ⌈If CanNmComUserDataSupport or CanNmGlobalPnSup- port is enabled the CanNm implementation shall provide an API CanNm_Transmit.⌋

requirement SWS_CanNm_00333 [SWS_CanNm_00333] 📄 PDF

[SWS_CanNm_00333] Upstream requirements: RS_Nm_02527, SRS_BSW_00483 ⌈If CanNmComUserDataSupport is enabled and if CanNm is in RepeatMessage state or NormalOperation state and if CanNm_Transmit() is called CanNm shall request an additional transmission of the NM PDU with the current data.⌋ Note: The call of CanNm_Transmit request to transmit a NM PDU between the pe- riodic transmissions with the current data (e.g., system bytes, user data and PNC bit vector).

requirement SWS_CanNm_00339 [SWS_CanNm_00339] 📄 PDF

[SWS_CanNm_00339] ⌈Caveats of CanNm_SetSleepReadyBit: The CanNm mod- ule is initialized correctly.⌋

requirement SWS_CanNm_00340 [SWS_CanNm_00340] 📄 PDF

[SWS_CanNm_00340] ⌈Configuration of CanNm_SetSleepReadyBit: Optional (Only available if CanNmCoordinatorSyncSupport is set to TRUE).⌋

requirement SWS_CanNm_00345 [SWS_CanNm_00345] 📄 PDF

[SWS_CanNm_00345] ⌈Caveats of CanNm_ConfirmPnAvailability: The CanNm module is initialized correctly.⌋

requirement SWS_CanNm_00346 [SWS_CanNm_00346] 📄 PDF

[SWS_CanNm_00346] ⌈Configuration of CanNm_ConfirmPnAvailability: Op- tional (Only available if CanNmGlobalPnSupport is set to TRUE).⌋

requirement SWS_CanNm_00348 [SWS_CanNm_00348] 📄 PDF

If CanNmCoordinatorSyncSupport is set to TRUE and CanNm called Nm_CoordReadyToSleepIndication and is still in Network Mode it shall notify the Nm by calling Nm_CoordReadyToSleep Cancellation on the f irst reception of a NM PDU with the NmCoordinatorSleepReady bit (see CBV) set to 0.

requirement SWS_CanNm_00350 [SWS_CanNm_00350] 📄 PDF

{OBSOLETE, replaced by SWS_CanNm_05 10 } If CanNm ComUserDataSupport is enabled CanNm shall collect the NM User Data from the referenced NM I - PDU by calling PduR_CanNmTriggerTransmit and combine the user data with the further NM bytes within the call of CanNm_TriggerTransmit.

requirement SWS_CanNm_00351 [SWS_CanNm_00351] 📄 PDF

The function CanNm_TriggerTransmit shall copy the NM PDU data of the according NM PDU requested by TxPduId

requirement SWS_CanNm_00352 [SWS_CanNm_00352] 📄 PDF

If development error detection for the CanNm module is enabled: Th e function CanNm_DeInit shall raise the error CANNM_E_NOT_IN_BUS_SLEEP if not all CAN networks are in Bus Sleep mode.

requirement SWS_CanNm_00380 [SWS_CanNm_00380] 📄 PDF

If fun ction CanNm_PnLearningRequest is called on a channel where CanNmDynamicPncToChannelMappingEnabled is set to TRUE and CanNm is in the Network Mode the CanNm module shall set the Repeat Message Bit and the Partial Network Learning Bit in the CBV to 1 on thi s channel and change to or restart the Repeat Message State.

requirement SWS_CanNm_00381 [SWS_CanNm_00381] 📄 PDF

If the bits Partial Network Learning and Repeat Message Request both are received with value 1 on a channel where CanNmDynamicPncToChannelMappingEnabled is set to TRUE and CanNm is in the Network Mode, then CanNm shall set the Parti al Network Learning Bit in the CBV to 1 on this channel and change to or restart the Repeat Message State.

requirement SWS_CanNm_00382 [SWS_CanNm_00382] 📄 PDF

If CanNmDynamicPncToChannelMapping Enabled is set to T RUE CanNm shall clear the Partial Network Learning Bit when leaving the Repeat Message State.

requirement SWS_CanNm_00384 [SWS_CanNm_00384] 📄 PDF

If the function CanNm_PnLearningRequest is called in Prepare Bus - Sleep Mode or Bus Sleep Mode no functionality shall be executed and E_NOT_OK shall be returned.

requirement SWS_CanNm_00385 [SWS_CanNm_00385] 📄 PDF

The function CanNm_PnLearningRequest shall only be available if CanNmDynamicPncToChannelMappingSupport is set to TRUE .

requirement SWS_CanNm_00401 [SWS_CanNm_00401] 📄 PDF

If the CanNm performs a state change from Bus Sleep Mode or Prepare Bus Sleep Mode to Network Mode due to a call to Can Nm_NetworkRequest ( i.e. due to an active wakeup) and CanNmActiveWakeupBitEnabled is TRUE , the CanNm shall set the ActiveWakeupBit in the CBV.

requirement SWS_CanNm_00402 [SWS_CanNm_00402] 📄 PDF

If the CanNm module leaves the Network Mode and CanNmActiveWakeupBitEnabled is TRUE , the CanNm module shall cl ear th e ActiveWakeupBit in the CBV.

requirement SWS_CanNm_00445 [SWS_CanNm_00445] 📄 PDF

{OBSOLETE} If CanNmPnE i raCalcEnabled is TRUE and CanNmPnEraCalcEnabled is TRUE , the PN status information has to be stored separately for both, the EIRA and ERA information (compare SWS_CanNm_00 4 35 and SWS_CanNm_00424 ).

requirement SWS_CanNm_00446 [SWS_CanNm_00446] 📄 PDF

If CanNmGlobalPnSupport is set to TR UE and NM Message Tx Timeout Timer has expired then CanNm shall call the function CanSM_TxTimeoutException .

requirement SWS_CanNm_00454 [SWS_CanNm_00454] 📄 PDF

If CanNmPnHandleMultipleNetworkRequests is set to TRUE CanNm_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 CanNmImmediateNmCycleTime 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 CanNmImmediateNmCycleTime . The CanNmMsgCycleOffset shall not be applied in this case.

requirement SWS_CanNm_00460 [SWS_CanNm_00460] 📄 PDF

{ DRAFT } If transmission of NM PDUs has been started, the CanNm Message Cycle Timer expires and when CanNmSynchronizedPncShutdownEnabled is set to TRUE and requests for synchronized PNC shutdown are pending, the transmission of the NM PDU shall be postponed to the next CanNm_Mainfunction call .

requirement SWS_CanNm_00461 [SWS_CanNm_00461] 📄 PDF

If CanNmSynchronizedPncShutdownEnabled is set to TRUE , when a NM PDU is received where PNI bit and PNSR bit ar e 1 and the corresponding ComMChannel configured via CanNmComMNetworkHandleRef is actively coordinated ( ComMPncGatewayType set to COMM_GATEWAY_TYPE_ACTIVE ), CanNm module shall report the runtime error CANNM_E_INVALID_PN_SYNC_SHUTDOWN_REQUEST to DET , ignore the PNSR bit and handle the PDU as usual NM PDU.

requirement SWS_CanNm_00462 [SWS_CanNm_00462] 📄 PDF

{ DRAFT } If CanNmSynchronizedPncShutdownEnabled is set to TRUE and the service CanNm_RequestSynchronizedPncShutdown is called the CanNm module shall store the given PNC ( pncId ) per given NM - Channel ( nmChannelH andle ) as a pending request for a synchronized PNC shutdown.

requirement SWS_CanNm_00463 [SWS_CanNm_00463] 📄 PDF

{ OBSOLETE, replaced by SWS_CanNm_00506 } If CanNmSynchronizedPncShutdownEnabled is set to TRUE , requests for synchronized PNC shutdown are pending and no transmission confirmation (indicated via CanNm_TxConfirmation ) of a previous call is pending, then the CanNm module shall request in the next main function call a transmission of a NM message by calling CanIf_Transmit . In case the NM - PDU is not configured for triggered transmission in CanIf ( CanIfTxPduTriggerTransmit set to FALSE ), CanNm 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 CanN mComUserDataSupport 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.

requirement SWS_CanNm_00464 [SWS_CanNm_00464] 📄 PDF

{ DRAFT } If CanNmSynchronizedPncShutdownEnabled is set to TRUE , the CanNm module has requested a transmission due to synchronized PNC shutdown (see [SWS_CanNm_00463] ) and CanNm_TxConfirmation is called with result E_OK , the CanNm shall consider those PNC IDs stored as pending request for a synchronized PNC shutdown of the corresponding NM - channel as completed and remove them from storage. Additionally, if CanNmPnShutdownMessageRetransmissionDur ation is configured, then CanNm shall cancel the retransmission timer for PN shutdown messages of the affected NM - channel.

requirement SWS_CanNm_00465 [SWS_CanNm_00465] 📄 PDF

{ DRAFT } If CanNmSyn chronizedPncShutdownEnabled is set to TRUE , CanNmPnShutdownMessageRetransmissionDuration is configured, the CanNm module has requested a transmission due to synchronized PNC sh utdown ( see [SWS_CanNm_00463] ), CanNm_TxConfirmation is called with result E_NOT_OK or the transmission request for this PN shutdown message was not accepted ( CanIf_Transmit returned E_NOT_OK) , the n the CanNm shall keep those PNC IDs stored as pending request for a synchronized PNC shutdown and perform a re transmission in the next main function .

requirement SWS_CanNm_00466 [SWS_CanNm_00466] 📄 PDF

DRAFT If CanNmSynchronizedPncShutdownEnabled is TRUE and the PNSR bit is set to 1 of the received NM PDU, the CanNm module shall set the bits in the ERA PDU to 0 of the corresponding bits which are set to 1 in the r eceived PN info range, stop the according monitoring for these externally requested PNs (see [ SWS_CanNm_ 00439 ] ) and inform the upper layers in the given order:  call PduR_CanNmRxIndication() for the configured ERA PDU  call Nm_For wardSynchronizedPncShutdown() with the configured NetworkHandle ( CanNmComMNetworkHandleRef )

requirement SWS_CanNm_00467 [SWS_CanNm_00467] 📄 PDF

{ DRAFT } If CanNm SynchronizedPncShutdownEnabled is set to TRUE the CanNm implementation shall provide the API CanNm _ RequestSynchronizedPncShutdown .

requirement SWS_CanNm_00468 [SWS_CanNm_00468] 📄 PDF

{ DRAFT } If CanNmPnShutdownMessageRetransmissionDuration is configured and transmission of a P N shutdown message is requested (refer to [SWS_CanNm_00506] ) for the first time, then the corresponding retransmission timer for PN shutdown messages shall be started with CanNmPnShutdownMessageRetransmissionDuration on all affe cted NM - channels.

requirement SWS_CanNm_00469 [SWS_CanNm_00469] 📄 PDF

{ OBSOLETE, replaced by SWS_CanNm_00509 } If CanNmSynchronizedPncShutdownEnabled is set to TRUE and requests for synchronized PNC shutdown are pending, then the CanNm module shall set for this message additionally the following data beneath the normal data within the call of CanNm_TriggerTransmit: - Set the PNSR bit in the CBV to 1 - Overwrit e the PN information in the user data (after NM User Data has been fetched, if CanNmComUserDataSupport 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."

requirement SWS_CanNm_00470 [SWS_CanNm_00470] 📄 PDF

{ DRAFT } If CanNmSynchronizedPncShutdownEnabled is set to TRUE and the CanNm module has stored PNC IDs as pending request for a synchronized PNC shutdown, then the CanNm shall remove those PNC IDs from storage which are either externally or internally requested a gain:  CanNm shall check on reception of an NM - message, if externally requested PNCs are received  CanNm shall check up front to each transmission of an PN shutdown message if internal PNC requests are available by deriving the internal PNC requests from the corresponding ComPdu (see ECUC_CanNm_00046 : )

requirement SWS_CanNm_00471 [SWS_CanNm_00471] 📄 PDF

{ DRAFT } If CanNmSynchronizedPncShutdownEnabled is set to TRUE , CanNmPnShutdownMessageRetransmissionDuration is not configured, the CanNm module has requested a transmission due to synchronized PNC shutdown (see [SWS_CanNm_00463] ), CanNm_TxConfirmation is called with result E_NOT_OK or the transmissions request for this PN shutdown message was not accepted ( CanIf_Transmit returned E_NOT_OK), then the CanNm shall remove the PNC IDs stored as pend ing request for a synchronized PNC shutdown of the corresponding NM - channel and report the runtime error CANNM_E_TRANSMISSION_OF_PN_SHUTDOWN_MESSAGE_FAILED to DET.

requirement SWS_CanNm_00472 [SWS_CanNm_00472] 📄 PDF

{ DRAFT } If CanNmSynchronizedPncShutdownEnabled is set to TRUE and a retransmission timer for a PN shutdown message (see ECUC_CanNm_00098 : ) expires, then CanNm shall remove the pending reque st for a synchronized PNC shutdown of the corresponding NM - channel from the storage and report the runtime error CANNM_E_TRANSMISSION_OF_PN_SHUTDOWN_MESSAGE_FAILED to DET .

requirement SWS_CanNm_00500 [SWS_CanNm_00500] 📄 PDF

During initialization and if CanNmPnEnabled is TRUE , the CanNm module shall set each byte of the PNC bit vector to 0x00 .

requirement SWS_CanNm_00501 [SWS_CanNm_00501] 📄 PDF

{DRAFT} The re maining bytes not assigned to Nm System Bytes or PNC bit v ector shall be available for User Data.

requirement SWS_CanNm_00502 [SWS_CanNm_00502] 📄 PDF

If CanNmPnEnabled is set to TRUE , the PNI bit in the received NM - PDU is set to 1 and one of the following pre - conditions is valid:  CanNmSynchronizedPncShutdownEnabled is set to FALSE  CanNmSynchronizedPncShutdownEnabled is set to TRUE and the PNSR bit is se t to 0 then the CanNm module shall extract the PNC bit v ector from the received NM - PDU according to the partial network configuration (NmPncBitVectorOffset and NmPncBitVectorLength of the corresponding NM - channel) and forward the PNC bit v ector by calling Nm_PncBitVectorRxIndication .

requirement SWS_CanNm_00503 [SWS_CanNm_00503] 📄 PDF

If CanNmPnEnabled is set to TRUE and Nm_PncBitVectorRxIndication was called, a received NM PDU shall only be considered for further processing under the following conditions:  CanNmAllNmMessagesKeepAwake is set to TRUE OR  CanNm_ConfirmPnAvailability has not been called yet OR  the output value of RelevantPncRequestDetectedPt r is set to TRUE

requirement SWS_CanNm_00504 [SWS_CanNm_00504] 📄 PDF

If CanNmSynchronizedPncShutdownEnabled is TRUE , the PNI bit in the received NM - P DU is set to 1 and the PNSR bit is set to 1 , CanNm module shall extract the PNC bit v ector from the received NM - PDU according to the partial network configuration ( NmPncBitVectorOffset and NmPncBitVectorLength of the corresponding NM - channel) and forward t he PNC bit vector by calling Nm_ForwardSynchronizedPncShutdown .

requirement SWS_CanNm_00505 [SWS_CanNm_00505] 📄 PDF

{DRAFT} If Can NmPnEnabled is TRUE , the NM - PDU is not configured for triggered transmission in CanIf ( CanIfTxPduTriggerTransmit set to FA LSE ), no requests for synchronized PNC shutdown are pending and a NM - PDU has to be transmitted, t he CanNm module shall perform the following actions in the given order: - Call Nm_PncBitVectorTxIndication(<NM - channel>, <buffer to store the unfiltered PNC bit vector of aggregated internal PNC requests>) to indicate the transmission request and to retrieve internal PNC requests . - Copy the received PNC bit vector for internal PNC requests to the NM - PDU by considering NmPncBitVectorOffset and NmPncBitVectorLength o f the corresponding NM - channel - If user data is enabled, fetch the available data (either from Com if CanNmComUserDataSupport is enabled or from internal storage) and copy the data in the user data range of the NM - PDU. - Trigger transmission of the NM - PDU by calling CanIf_Transmit

requirement SWS_CanNm_00506 [SWS_CanNm_00506] 📄 PDF

{DRAFT} If CanNmSynchronizedPn cShutdownEnabled is set to TRUE , requests for synchronized PNC shutdown are pending and no transmission confirmation (indicated via CanNm_TxConfirmation ) of a previous call is pending, then the CanNm module shall request in the next main function call a tr ansmission of a NM - PDU as PN shutdown message by calling CanIf_Transmit . In case the NM - PDU is not configured for triggered transmission in CanIf ( CanIfTxPduTriggerTransmit set to FALSE ), CanNm shall set for this message additionally the following data ben eath the normal data:  Set the PNSR bit in the CBV to 1  If user data is enabled, fetch the available data (either from Com if CanNmComUserDataSupport is enabled or from internal storage) and copy the data in the user data range of the NM - PDU  Write the PNC b it vector with respect to NmPncBitVectorOffset and NmPncBitVectorLength of the corresponding NM - channel 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

requirement SWS_CanNm_00507 [SWS_CanNm_00507] 📄 PDF

When a Null pointer has been passed to a CanNm service, the called function shall not be executed and it shall return E_NOT_OK to the calling function if applicable. If development error detection is enabled ( CanNmDevErrorDetect is set to TRUE ) the corresponding error CANNM_E_PARAM_POINTER shall be reported to DET.

requirement SWS_CanNm_00509 [SWS_CanNm_00509] 📄 PDF

{DRAFT} If CanNmSynchronizedPncShutdownEnabled is set to TRUE and requests for synchronized PNC shutdown are pending, then the CanNm module shall set for this message additionally the following data beneath the normal data within the call of CanNm_TriggerTransmit : - Set the PNSR bit in the CBV to 1 - If user data is enabled, fetch the available data (either from Com if CanNmComUserDataSupport is enabled or from internal storage) and copy the data in the user data range of the NM - PDU - W rite the PNC bit vector with respect to NmPncBitVectorOffset and NmPncBitVectorLength of the corresponding NM - channel 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

requirement SWS_CanNm_00510 [SWS_CanNm_00510] 📄 PDF

{DRAFT} If CanNm_TriggerTransmit is called and CanNmComUserDataSupport is enabled, CanNm shall collect the NM Us er Data from the referenced NM I - PDU by calling PduR_CanNmTriggerTransmit and copy the data to the user data range of the NM - PDU .

requirement SWS_CanNm_00511 [SWS_CanNm_00511] 📄 PDF

I f CanNmSynchronizedPncShutdownEnabled is set to TRUE , the CanNm module shall consider transmission of PN shutdown message as inactive after initialization .

requirement SWS_CanNm_00513 [SWS_CanNm_00513] 📄 PDF

If transmission of Network Management PDUs has been started, the CanNm Message Cycle Timer expires and when CanNmSynchronizedPncShutdownEnabled is set to TRUE and the transmission of PN shutdown messages is active , the transmission of this NM PDU shall be postponed to the next CanNm_Mainfunction call .

requirement SWS_CanNm_00514 [SWS_CanNm_00514] 📄 PDF

If the CanNm module has requested a transmission of a NM - PDU, CanNmS ynchronizedPncShutdownEnabled is set to TRUE , the transmission of PN shutdown messages is active , CanNm_TxConfirmation is called with result E_NOT_OK or the transmission request for this NM - PDU was not accepted ( CanIf_Transmit returned E_NOT_OK ) , the n the CanNm module shall perform a retransmission of a NM - PDU for this NM - Channel in the next main function call.

requirement SWS_CanNm_00515 [SWS_CanNm_00515] 📄 PDF

If CanNmGlobalPnSupport is set to TRUE , the CanNm module shall store the latest PNC bit vector per NM - channel everytime the PNC bit vector has been fetched from the Nm modul via call of Nm_PncBitVectorTxIndication .

requirement SWS_CanNm_00516 [SWS_CanNm_00516] 📄 PDF

If CanNmGlobalPnSupport is set to TRUE , a NM - PDU has been transmitted on a NM - Channel and CanNm_TxConfirmation is called with result E_OK for this NM - PDU, then the CanNm shall forward the confirmation to Nm by calling Nm_PncBitVectorTxConfirmation with the stored PNC bit vector (see [SWS_CanNm_00515] ) for this NM - channel with result set to E_OK .

requirement SWS_CanNm_00517 [SWS_CanNm_00517] 📄 PDF

If CanNmGlobalPnSupport is set to TRUE , a NM - PDU has been transmitted on a NM - Channel and CanNm_TxConfirmation is called with result E_NOT_OK or the transmission request for this NM - PDU was not accepted ( CanIf_Transmit returned E_NOT_OK ) for this NM - PDU , then the CanNm module shall forward the confirmation to Nm by calling Nm_ PncBitVectorTxConfirmation with the stored PNC bit vector (see [SWS_CanNm_00515] ) for this NM - Channel with result set to E_NOT_OK

requirement SWS_CanNm_00518 [SWS_CanNm_00518] 📄 PDF

If Can NmPnEnabled is TRUE and a NM - PDU has to be transmitted (either as cylic NM - PDU transmitted with CanNmMsgCycleTime (see [SWS_CanNm_00512 ) or as PN shutdown message), the CanNm module shall additionally fetch the PNC bit vector by calling Nm_PncBitVectorTxIndication and copy the PNC bit vector with respect to NmPncBitVectorOffset and NmPncBitVectorLength of the corresponding NM - channel to the NM - PDU before requesting the transmission of the NM - PDU .

requirement SWS_CanNm_00519 [SWS_CanNm_00519] 📄 PDF

If CanNmSynchronizedPncShutdown Enabled is set to TRUE , the transmission of PN shutdown messages is active for this NM - Channel and no transmission confirmation of a previous call to transmit a NM - PDU as PN shutdown message on this NM - Channel is pending, then the CanNm module shall reque st in the next main function call a transmission of a NM - PDU as PN shutdown message by calling CanIf_Transmit .

requirement SWS_CanNm_00520 [SWS_CanNm_00520] 📄 PDF

If CanNmSynchronizedPncShutdownEnabled is set to TRUE the CanNm implementation shall provide the API CanNm_ActivateTxPnShutdownMsg .

requirement SWS_CanNm_00521 [SWS_CanNm_00521] 📄 PDF

If CanNmSynchronizedPncShutdownEnabled is set to TRUE and CanNm_ActivateTxPnShutdownMs g is called with a valid NM - Channel ( nmChannelHandle ), then the Can Nm module shall consider the PN shutdown message transmission as active on the given NM - channel, set PNSR bit in the CBV to 1 and return with E_OK .

requirement SWS_CanNm_00522 [SWS_CanNm_00522] 📄 PDF

If Can NmSynchronizedPncShutdownEnabled is set to TRUE the CanNm implementation shall provide the API CanNm_DeactivateTxPnShutdownMsg .

requirement SWS_CanNm_00523 [SWS_CanNm_00523] 📄 PDF

If CanNmSynchronizedPncShutdownEnabled is set to TRUE and CanNm_DeactivateTxPnShutdownMsg is c alled with a valid NM - Channel ( nmChannelHandle ), then the CanNm module shall consider the PN shutdown message transmission as inactive on the given NM - channel, set PNSR bit in the CBV to 0 and return with E_OK.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/CP_MOD_CanNm
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_CanNm@rel:R20-11#9e8395fa
Content hash
9e8395fa
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_CANNetworkManagement.pdf#nameddest=SWS_CanNm_00208

主题图

需求

112
SWS_CanNm_00006SWS_CanNm_00013SWS_CanNm_00045SWS_CanNm_00061SWS_CanNm_00064SWS_CanNm_00065SWS_CanNm_00066SWS_CanNm_00073SWS_CanNm_00074SWS_CanNm_00075SWS_CanNm_00130SWS_CanNm_00132SWS_CanNm_00133SWS_CanNm_00138SWS_CanNm_00147SWS_CanNm_00153SWS_CanNm_00172SWS_CanNm_00176SWS_CanNm_00177SWS_CanNm_00187SWS_CanNm_00189SWS_CanNm_00190SWS_CanNm_00192SWS_CanNm_00193SWS_CanNm_00194SWS_CanNm_00195SWS_CanNm_00245SWS_CanNm_00254SWS_CanNm_00255SWS_CanNm_00256SWS_CanNm_00257SWS_CanNm_00259SWS_CanNm_00260SWS_CanNm_00261SWS_CanNm_00262SWS_CanNm_00263SWS_CanNm_00264SWS_CanNm_00265SWS_CanNm_00266SWS_CanNm_00267SWS_CanNm_00268SWS_CanNm_00269SWS_CanNm_00271SWS_CanNm_00273SWS_CanNm_00275SWS_CanNm_00277SWS_CanNm_00279SWS_CanNm_00280SWS_CanNm_00281SWS_CanNm_00282SWS_CanNm_00283SWS_CanNm_00285SWS_CanNm_00295SWS_CanNm_00316SWS_CanNm_00317SWS_CanNm_00324SWS_CanNm_00325SWS_CanNm_00330SWS_CanNm_00333SWS_CanNm_00339SWS_CanNm_00340SWS_CanNm_00345SWS_CanNm_00346SWS_CanNm_00348SWS_CanNm_00350SWS_CanNm_00351SWS_CanNm_00352SWS_CanNm_00380SWS_CanNm_00381SWS_CanNm_00382SWS_CanNm_00384SWS_CanNm_00385SWS_CanNm_00401SWS_CanNm_00402SWS_CanNm_00445SWS_CanNm_00446SWS_CanNm_00454SWS_CanNm_00460SWS_CanNm_00461SWS_CanNm_00462SWS_CanNm_00463SWS_CanNm_00464SWS_CanNm_00465SWS_CanNm_00466SWS_CanNm_00467SWS_CanNm_00468SWS_CanNm_00469SWS_CanNm_00470SWS_CanNm_00471SWS_CanNm_00472SWS_CanNm_00500SWS_CanNm_00501SWS_CanNm_00502SWS_CanNm_00503SWS_CanNm_00504SWS_CanNm_00505SWS_CanNm_00506SWS_CanNm_00507SWS_CanNm_00509SWS_CanNm_00510SWS_CanNm_00511SWS_CanNm_00513SWS_CanNm_00514SWS_CanNm_00515SWS_CanNm_00516SWS_CanNm_00517SWS_CanNm_00518SWS_CanNm_00519SWS_CanNm_00520SWS_CanNm_00521SWS_CanNm_00522SWS_CanNm_00523

详细视图

请在大纲中选择一个条目。

初始化与状态

De - initializes the Can Nm module.

void CanNm_DeInit(void);

This service returns the version information of this module.

void CanNm_GetVersionInfo(Std_VersionInfoType* versioninfo);
CanNm_Init 函数

Initialize the Can Nm module.

void CanNm_Init(const CanNm_ConfigType* cannmConfigPtr);

服务

NM indicate to activate the transmission of PN shutdown messages on the given NM - Channel. This results in transmission of a NM - PD U with PNSR bit set to 1 (PN shutdown message).

Std_ReturnType CanNm_ActivateTxPnShutdownMsg(NetworkHandleType nmChannelHandle);

Check if remote sleep indication takes place or not.

Std_ReturnType CanNm_CheckRemoteSleepIndication(NetworkHandleType nmChannelHandle, boolean* nmRemoteSleepIndPtr);

Enables the PN filter functionality on the indicated NM channel. Availability: The API is only available if Can Nm Global Pn Support is TRUE.

void CanNm_ConfirmPnAvailability(NetworkHandleType nmChannelHandle);

NM indicate to deactive the transmission of PN shutdown messages on the given NM - Channel. This result in transmission of a usual NM - PDUs with PNSR bit set to 0.

Std_ReturnType CanNm_DeactivateTxPnShutdownMsg(NetworkHandleType nmChannelHandle);

Disable the NM PDU transmission ability due to a ISO14229 Communication Control (28hex) service

Std_ReturnType CanNm_DisableCommunication(NetworkHandleType nmChannelHandle);

Enable the NM PDU transmission ability due to a ISO14229 Communication Control (28hex) service

Std_ReturnType CanNm_EnableCommunication(NetworkHandleType nmChannelHandle);

Get node identifier configured for the local node.

Std_ReturnType CanNm_GetLocalNodeIdentifier(NetworkHandleType nmChannelHandle, uint8* nmNodeIdPtr);

Get node identifier out of the most recently received N M PDU.

Std_ReturnType CanNm_GetNodeIdentifier(NetworkHandleType nmChannelHandle, uint8* nmNodeIdPtr);

Get the whole PDU data out of the most recently received NM PDU.

Std_ReturnType CanNm_GetPduData(NetworkHandleType nmChannelHandle, uint8* nmPduDataPtr);

Returns the state and the mode of the network management.

Std_ReturnType CanNm_GetState(NetworkHandleType nmChannelHandle, Nm_StateType* nmStatePtr, Nm_ModeType* nmModePtr);

Get user data out of the most recently received NM PDU.

Std_ReturnType CanNm_GetUserData(NetworkHandleType nmChannelHandle, uint8* nmUserDataPtr);

Release the network, since ECU doesn't have to communicate on the bus.

Std_ReturnType CanNm_NetworkRelease(NetworkHandleType nmChannelHandle);

Request the network, since ECU needs to communicate on the bus.

Std_ReturnType CanNm_NetworkRequest(NetworkHandleType nmChannelHandle);

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: Can Nm is initia lized correctly.

Std_ReturnType CanNm_PassiveStartUp(NetworkHandleType nmChannelHandle);

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.

Std_ReturnType CanNm_PnLearningRequest(NetworkHandleType nmChannelHandle);

Set Repeat Message Request Bit for NM PDUs transmitted next on the bus.

Std_ReturnType CanNm_RepeatMessageRequest(NetworkHandleType nmChannelHandle);

Request bus synchronization.

Std_ReturnType CanNm_RequestBusSynchronization(NetworkHandleType nmChannelHandle);

Requests transmission of a NM - PDU with PNSR bit set to 1 (PN shutdown message) Tags: atp.Status=draft

Std_ReturnType CanNm_RequestSynchronizedPncShutdown(NetworkHandleType nmChannelHandle, PNCHandleType pncId);

Set the NM Coordinator S leep Ready bit in the Control Bit Vector

Std_ReturnType CanNm_SetSleepReadyBit(NetworkHandleType nmChannelHandle, boolean nmSleepReadyBit);

Set user data for NM PDUs transmitted next on the bus.

Std_ReturnType CanNm_SetUserData(NetworkHandleType nmChannelHandle, const uint8* nmUserDataPtr);

Requests transmission of a PDU.

Std_ReturnType CanNm_Transmit(PduIdType TxPduId, const PduInfoType* PduInfoPtr);

回调

Indication of a receive d PDU from a lower layer communication interface module.

void CanNm_RxIndication(PduIdType RxPduId, const PduInfoType* PduInfoPtr);

Within this API, the upper layer module (called module) shall check whether the available data fits into the buffer size reported by Pdu Info Ptr - >Sdu Length. If it fits, it shall copy its data into the buffer provided by Pdu Info Ptr - >Sdu Data Ptr and update the length of the actual copied data in Pdu Info Ptr - >Sdu Length. If not, it returns E_ NOT_ OK without changing Pdu Info Ptr.

Std_ReturnType CanNm_TriggerTransmit(PduIdType TxPduId, PduInfoType* PduInfoPtr);

The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.

void CanNm_TxConfirmation(PduIdType TxPduId, Std_ReturnType result);

周期性

Main function of the Can Nm which processes the algorithm describes in that document.

void CanNm_MainFunction(void);

类型

This type shall contain at least all parameters that are post - build able according to chapter 10.

需求

SWS_CanNm_00006 requirement

If Normal Operation State is entered from Ready Sleep State the transmission of NM PDUs shall be started immediately.

SWS_CanNm_00013 requirement

The CanNm module shall set the S ource N ode I dentifier with the configuration parameter CanNmNodeId unless CanNmPduNidPosition is set to off.

SWS_CanNm_00045 requirement

The Control Bit Vector shall consist of Bit 0: Repeat Message Request Bit 0: Repeat Message State not requested 1: Repeat Message State requested Bit 1 : PN Shutdown Request Bit (PNSR) 0: NM message does not contain synchronized Partial Network shutdown re quest 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 mai n 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 Part ial Network Information Bit (PNI) 0: NM PDU contains no Partial Network request information 1: NM PDU contains Partial Network request information Bit 2 and 7 are reserved for future extensions 0: Disabled / Reserved for future usage

SWS_CanNm_00061 requirement

[SWS_CanNm_00061],

SWS_CanNm_00064 requirement

[SWS_CanNm_00064],

SWS_CanNm_00065 requirement

[SWS_CanNm_00065],

SWS_CanNm_00066 requirement

[SWS_CanNm_00066] and

SWS_CanNm_00073 requirement

[SWS_CanNm_00073] ⌈If CanNmPassiveModeEnabled is set to TRUE or CanNmImmediateTxconfEnabled is set to TRUE CanNm shall not perform transmission error handling and omit the requirements [SWS_CanNm_00061],

SWS_CanNm_00074 requirement

The location of the S ource N ode I dentifier shall be configurable by means of CanNmPduNidPosition to Byte 0, Byte 1, or off.

SWS_CanNm_00075 requirement

The location of the C ontrol Bit V ector shall be configurable by means of C anNmPduCbvPosition to Byte 0, By te 1, or off.

SWS_CanNm_00130 requirement

[SWS_CanNm_00130] Upstream requirements: RS_Nm_02516 ⌈The service call CanNm_RequestBusSynchronization shall trigger transmission of a single Network Management PDU if CanNmPassiveModeEnabled (configuration parameter) is not defined.⌋ Rationale: This service is typically used for supporting the NM gateway extensions.

SWS_CanNm_00132 requirement

[SWS_CanNm_00132] Upstream requirements: RS_Nm_02506, SRS_BSW_00483 ⌈The service call CanNm_GetNodeIdentifier shall provide the node identifier out of the most recently received Network Management PDU if CanNmNodeIdEnabled is set to TRUE.⌋

SWS_CanNm_00133 requirement

[SWS_CanNm_00133] Upstream requirements: RS_Nm_02508, SRS_BSW_00483 ⌈The service call CanNm_GetLocalNodeIdentifier shall provide the node identi- fier configured for the local host node if CanNmNodeIdEnabled is set to TRUE.⌋

SWS_CanNm_00138 requirement

The service call CanNm_GetPduData shall provide whole PDU data (Node ID, Control Bit Vector and User Data) of the most recently received Network Management PDU if CanNmNodeDetectionEnabled or Can nNmUserDataEnabled or CanNmNodeIdEnabled is set to TRUE.

SWS_CanNm_00147 requirement

If CanNm_PassiveStartUp is called in the Network Mode, the CanNm module shall not execute this service and shall return E_NOT_OK .

SWS_CanNm_00153 requirement

[SWS_CanNm_00153] Upstream requirements: RS_Nm_00052, RS_Nm_02509, SRS_BSW_00483 ⌈Service call CanNm_CheckRemoteSleepIndication shall provide the information about current status of Remote Sleep Indication (i.e. already detected or not).⌋

SWS_CanNm_00172 requirement

[SWS_CanNm_00172] ⌈The service CanNm_DisableCommunication shall return E_NOT_OK, if the current mode is not Network Mode.⌋

SWS_CanNm_00176 requirement

[SWS_CanNm_00176] Upstream requirements: RS_Nm_02512 ⌈The service CanNm_EnableCommunication shall enable the Network Management PDU transmission ability if the Network Management PDU transmission ability is dis- abled.⌋

SWS_CanNm_00177 requirement

[SWS_CanNm_00177] ⌈The service CanNm_EnableCommunication shall return E_NOT_OK if the Network Management PDU transmission ability is enabled.⌋

SWS_CanNm_00187 requirement

[SWS_CanNm_00187] Upstream requirements: RS_Nm_02516 ⌈If CanNm_RequestBusSynchronization is called in Bus-Sleep Mode and Prepare Bus-Sleep Mode the CanNm module shall not execute the service and shall return E_- NOT_OK.⌋

SWS_CanNm_00189 requirement

The CanNm module shall not return development errors by API functions; in case of a development error, the execution of the respective API function shall be aborted and E_NOT_OK shall be returned, if applicable.

SWS_CanNm_00190 requirement

The CanNm module sha ll not return production errors by API functions; in case of a production error, the execution of the respective API function shall be aborted and E_NOT_OK shall be returned, if applicable.

SWS_CanNm_00192 requirement

When a CanNm service with an invalid networ k handle is called, the called function shall not be executed and it shall return E_NOT_OK to the calling function if applicable. If development error detection is enabled ( CanNmDevErrorDetect is set to TRUE ) the corresponding error CANNM_E_ INVALID_CHANNEL shall be reported to DET.

SWS_CanNm_00193 requirement

When the NM - Timeout Timer expires in the Repeat Message State the CanNm module shall report CANNM_E_NETWORK_TIMEOUT to the DET.

SWS_CanNm_00194 requirement

When the NM - Timeout Timer expires in the Normal Operation State the CanNm module shall report CANNM_E_NETWORK_TIMEOUT to the DET.

SWS_CanNm_00195 requirement

When a CanNm service with an inva lid PDU ID is called, the called function shall not be executed and it shall return E_NOT_OK to the calling function if applicable. If development error detection is enabled ( CanNmDevErrorDetect is set to TRUE ) the corresponding error CANNM_E_ INVALID_PDUID shall be reported to DET.

SWS_CanNm_00245 requirement

Module Header File Imported Type Com Stack_ Types Com Stack_ Types.h Network Handle Type Com Stack_ Types.h Pdu Id Type Com Stack_ Types.h Pdu Info Type Com Stack_ Types.h Pdu Length Type Nm Nm Stack_ types.h Nm _ Mode Type Nm Stack_ types.h Nm _ State Type Std Std_ Types.h Std _ Return Type Std_ Types.h Std _ Version Info Type

SWS_CanNm_00254 requirement

[SWS_CanNm_00254] ⌈Caveats of CanNm_PassiveStartUp: The CanNm module is initialized correctly.⌋

SWS_CanNm_00255 requirement

[SWS_CanNm_00255] ⌈The function CanNm_NetworkRequest shall change the Network state to ‘requested’.⌋

SWS_CanNm_00256 requirement

[SWS_CanNm_00256] ⌈Caveats of CanNm_NetworkRequest: The CanNm module is initialized correctly.⌋

SWS_CanNm_00257 requirement

[SWS_CanNm_00257] ⌈Configuration of CanNm_NetworkRequest: Optional (Only available if CanNmPassiveModeEnabled is not defined).⌋

SWS_CanNm_00259 requirement

[SWS_CanNm_00259] ⌈Caveats of CanNm_NetworkRelease: The CanNm module is initialized correctly.⌋

SWS_CanNm_00260 requirement

[SWS_CanNm_00260] ⌈Configuration of CanNm_NetworkRelease: Optional (Only available if CanNmPassiveModeEnabled is not defined)⌋

SWS_CanNm_00261 requirement

[SWS_CanNm_00261] ⌈Caveats of CanNm_DisableCommunication: The CanNm module is initialized correctly.⌋

SWS_CanNm_00262 requirement

[SWS_CanNm_00262] ⌈Configuration of CanNm_DisableCommunication: Op- tional (Only available if CanNmComControlEnabled is set to TRUE)⌋

SWS_CanNm_00263 requirement

[SWS_CanNm_00263] ⌈Caveats of CanNm_EnableCommunication: The CanNm module is initialized correctly.⌋

SWS_CanNm_00264 requirement

[SWS_CanNm_00264] ⌈Configuration of CanNm_EnableCommunication: Optional (Only available if CanNmComControlEnabled is set to TRUE).⌋

SWS_CanNm_00265 requirement

[SWS_CanNm_00265] ⌈Caveats of CanNm_SetUserData: The CanNm module is initialized correctly.⌋

SWS_CanNm_00266 requirement

[SWS_CanNm_00266] ⌈Configuration of CanNm_SetUserData: Optional (Only avail- able if CanNmUserDataEnabled is set to TRUE and CanNmPassiveModeEnabled is not defined)⌋

SWS_CanNm_00267 requirement

[SWS_CanNm_00267] ⌈Caveats of CanNm_GetUserData: The CanNm module is initialized correctly.⌋

SWS_CanNm_00268 requirement

[SWS_CanNm_00268] ⌈Configuration of CanNm_GetUserData: Optional (Only avail- able if CanNmUserDataEnabled is set to TRUE).⌋

SWS_CanNm_00269 requirement

[SWS_CanNm_00269] ⌈Caveats of CanNm_GetNodeIdentifier: The CanNm module is initialized correctly.⌋

SWS_CanNm_00271 requirement

[SWS_CanNm_00271] ⌈Caveats of CanNm_GetLocalNodeIdentifier: The CanNm module is initialized correctly.⌋

SWS_CanNm_00273 requirement

[SWS_CanNm_00273] ⌈Caveats of CanNm_RepeatMessageRequest: The CanNm module is initialized correctly.⌋

SWS_CanNm_00275 requirement

[SWS_CanNm_00275] ⌈Caveats of CanNm_GetPduData: The CanNm module is ini- tialized correctly.⌋

SWS_CanNm_00277 requirement

[SWS_CanNm_00277] ⌈Caveats of CanNm_GetState: The CanNm module is initial- ized correctly.⌋

SWS_CanNm_00279 requirement

[SWS_CanNm_00279] ⌈Caveats of CanNm_RequestBusSynchronization: The CanNm module is initialized correctly.⌋

SWS_CanNm_00280 requirement

[SWS_CanNm_00280] Upstream requirements: RS_Nm_02516 ⌈Configuration of CanNm_RequestBusSynchronization: Optional (Only available if CanNmBusSynchronizationEnabled is set to TRUE) and CanNmPassiveMod- eEnabled is not defined.⌋

SWS_CanNm_00281 requirement

[SWS_CanNm_00281] ⌈Caveats of CanNm_CheckRemoteSleepIndication: The CanNm module is initialized correctly.⌋

SWS_CanNm_00282 requirement

[SWS_CanNm_00282] ⌈Configuration of CanNm_CheckRemoteSleepIndication: Optional (Only available if CanNmRemoteSleepIndEnabled is set to TRUE).⌋

SWS_CanNm_00283 requirement

[SWS_CanNm_00283] ⌈Caveats of CanNm_TxConfirmation: • The call context is either on interrupt level (interrupt mode) or on task level (polling mode). This callback service is re-entrant for multiple CAN controller usage. • The CanNm module is initialized correctly. ⌋

SWS_CanNm_00285 requirement

[SWS_CanNm_00285] ⌈Caveats of CanNm_RxIndication: • Until this service returns the CAN Interface will not access canSduPtr. The can SduPtr is only valid and can be used by upper layers until the indication returns. CAN Interface guarantees that the number of configured bytes for this CanNm- RxPduId is valid. The call context is either on interrupt level (interrupt mode) or on task level (polling mode). This callback service is re-entrant for multiple CAN controller usage. • The CanNm module is initialized correctly. ⌋

SWS_CanNm_00295 requirement

[SWS_CanNm_00295] ⌈The service CanNm_EnableCommunication shall return E_NOT_OK, if the current mode is not Network Mode.⌋

SWS_CanNm_00316 requirement

Type of error Related error code Error value API service used without module initialization CANNM_ E_ UNINIT 0x01 API service called with wrong channel handle CANNM_ E_ INVALID_ CHANNEL 0x02 API service called with wrong PDU - ID CANNM_ E_ INVALID_ PDUID 0x03 Can Nm initialization has failed, e.g. selected configuration set doesn't exist. CANNM_ E_ INIT_ FAILED 0x05 Null pointer has been passed as an argument CANNM_ E_ PARAM_ POINTER 0x12 De Init API service called when not all CAN networks are in Bus Sleep mode CANNM_ E_ NOT_ IN_ BUS_ SLEEP 0x13

SWS_CanNm_00317 requirement

Type of error Related error code Error value Reception of NM PDUs in Bus - Sleep Mode. CANNM_ E_ NET_ START _ IND 0x04 NM - Timeout Timer has abnormally expired outside of the Ready Sleep State; it may happen: (1) because of Bus - Off state,(2)if some ECU requests bus communication or node detection shortly before the NM - Timeout Timer expires so that a Network Management PDU c an not be transmitted in time; this race condition applies to event - triggered systems CANNM_ E_ NETWORK_ TIMEOUT 0x11 A NM message with PN Shutdown Request Bit was received on a CANNM_ E_ 0x20 channel that is actively coordinated by the Com M PNC Gateway. INVA LID_ PN_ SYNC_ SHUTDOWN_ REQUEST

SWS_CanNm_00324 requirement

Det _ Report - Runtime Error Det.h Service to report runtime errors. If a callout has been configured then this callout shall be called. Nm _ Bus Sleep - Mode Nm.h Notification that the network management has entered Bus - Sleep Mode. Nm _ Network - Mode Nm.h Notification that the network manag ement has entered Network Mode. Nm _ Network - Start Indication Nm.h Notification that a NM - message has been received in the Bus - Sleep Mode, what indicates that some nodes in the network have already entered the Network Mode. Nm _ Prepare - Bus Sleep Mode Nm .h Notification that the network management has entered Prepare Bus - Sleep Mode.

SWS_CanNm_00325 requirement

Can If _ Transmit Can If.h Requests transmission of a PDU. Can S M _ Tx - Timeout Exception Can SM_ Can If.h This function shall notify the Can SM module, that the Can Nm has detected for the affected partial CAN network a tx timeout exception, which shall be recovered within the respective network state machine of the Can SM module. Det _ Report Error Det.h Service to report development errors. Nm _ Car Wake Up - Indication Nm.h This function is called by a <Bus>Nm to indicate reception of a CWU request. Nm _ Coord Ready - To Sleep - Cancellation Nm.h Cancels an indication, when the NM Coordinator Sleep Ready bit in the Control Bit Vector is set back to 0. Nm _ Coord Ready - To Sleep Indication Nm.h Sets an indication, when the NM Coordinator Sleep Ready bit in the Control Bit Vector is set Nm _ Forward - Synchronized Pnc - Shutdown Nm.h Notification that the network management has received a PN shutdown message on a particular NM - channel. This is used to grant a nearly synchronized PNC shutdown across the entire PN topology. Nm _ Pdu Rx - Indication Nm.h Not ification that a NM message has been received. Nm _ Pnc Bit Vector - Nm.h Indication that a bus specific network management has received a Rx Indication NM message on a particular NM - channel that contain a PNC bit vector. This is used to aggregate the exter nal PNC requests. The function evaluate if a relevant PNC request (PNC bit set to '1') is available in the given PNC bit vector. If a relevant PNC request is available (PNC bit passes the PNC bit vector filter), then the Relevant Pnc Request Detected Ptr r efers to a boolean with value set to TRUE. Otherwise refer to booelan with value set to FALSE. Relevant Pnc Request Detected Ptr is evaluated by the callee <Bus>Nm module to qualify the further processing of the received NM - PDU. Nm _ Pnc Bit Vector - Tx Con firmation Nm.h Function called by <Bus>Nms to confirm the state of the transmission for the given PNC bit vector on the given NM - Channel. Nm _ Pnc Bit Vector - Tx Indication Nm.h Function called by <Bus> Nms to request the aggregated internal PNC requests for transmission within the Nm message. Nm _ Remote - Sleep Cancellation Nm.h Notification that the network management has detected that not all other nodes on the network are longer ready to enter Bus - Sle ep Mode. Nm _ Remote - Sleep Indication Nm.h Notification that the network management has detected that all other nodes on the network are ready to enter Bus - Sleep Mode. Nm _ Repeat - Message - Indication Nm.h Service to indicate that an NM message with set Re peat Message Re - quest Bit has been received. This is needed for node detection and the Dynamic PNC - to - channel - mapping feature. Nm _ State - Change - Notification Nm.h Notification that the state of the lower layer <Bus>Nm has changed. Nm _ Tx Timeout - Except ion Nm.h Service to indicate that an attempt to send an NM message failed. Pdu R _ Can Nm Rx - Indication Pdu R_ Can Nm.h Indication of a received PDU from a lower layer communication interface module. Pdu R _ Can Nm - Trigger Transmit Pdu R_ Can Nm.h Within this API, the upper layer module (called module) shall check whether the available data fits into the buffer size reported by Pdu Info Ptr - >Sdu Length. If it fits, it shall copy its data into the buffer provided by Pdu Info Ptr - >Sdu Data Ptr and upd ate the length of the actual copied data in Pdu Info Ptr - >Sdu Length. If not, it returns E_ NOT_ OK without changing Pdu Info Ptr. Pdu R _ Can Nm Tx - Confirmation Pdu R_ Can Nm.h The lower layer communication interface module confirms the transmission of a PDU, or the failure to transmit a PDU.

SWS_CanNm_00330 requirement

[SWS_CanNm_00330] ⌈If CanNmComUserDataSupport or CanNmGlobalPnSup- port is enabled the CanNm implementation shall provide an API CanNm_Transmit.⌋

SWS_CanNm_00333 requirement

[SWS_CanNm_00333] Upstream requirements: RS_Nm_02527, SRS_BSW_00483 ⌈If CanNmComUserDataSupport is enabled and if CanNm is in RepeatMessage state or NormalOperation state and if CanNm_Transmit() is called CanNm shall request an additional transmission of the NM PDU with the current data.⌋ Note: The call of CanNm_Transmit request to transmit a NM PDU between the pe- riodic transmissions with the current data (e.g., system bytes, user data and PNC bit vector).

SWS_CanNm_00339 requirement

[SWS_CanNm_00339] ⌈Caveats of CanNm_SetSleepReadyBit: The CanNm mod- ule is initialized correctly.⌋

SWS_CanNm_00340 requirement

[SWS_CanNm_00340] ⌈Configuration of CanNm_SetSleepReadyBit: Optional (Only available if CanNmCoordinatorSyncSupport is set to TRUE).⌋

SWS_CanNm_00345 requirement

[SWS_CanNm_00345] ⌈Caveats of CanNm_ConfirmPnAvailability: The CanNm module is initialized correctly.⌋

SWS_CanNm_00346 requirement

[SWS_CanNm_00346] ⌈Configuration of CanNm_ConfirmPnAvailability: Op- tional (Only available if CanNmGlobalPnSupport is set to TRUE).⌋

SWS_CanNm_00348 requirement

If CanNmCoordinatorSyncSupport is set to TRUE and CanNm called Nm_CoordReadyToSleepIndication and is still in Network Mode it shall notify the Nm by calling Nm_CoordReadyToSleep Cancellation on the f irst reception of a NM PDU with the NmCoordinatorSleepReady bit (see CBV) set to 0.

SWS_CanNm_00350 requirement

{OBSOLETE, replaced by SWS_CanNm_05 10 } If CanNm ComUserDataSupport is enabled CanNm shall collect the NM User Data from the referenced NM I - PDU by calling PduR_CanNmTriggerTransmit and combine the user data with the further NM bytes within the call of CanNm_TriggerTransmit.

SWS_CanNm_00351 requirement

The function CanNm_TriggerTransmit shall copy the NM PDU data of the according NM PDU requested by TxPduId

SWS_CanNm_00352 requirement

If development error detection for the CanNm module is enabled: Th e function CanNm_DeInit shall raise the error CANNM_E_NOT_IN_BUS_SLEEP if not all CAN networks are in Bus Sleep mode.

SWS_CanNm_00380 requirement

If fun ction CanNm_PnLearningRequest is called on a channel where CanNmDynamicPncToChannelMappingEnabled is set to TRUE and CanNm is in the Network Mode the CanNm module shall set the Repeat Message Bit and the Partial Network Learning Bit in the CBV to 1 on thi s channel and change to or restart the Repeat Message State.

SWS_CanNm_00381 requirement

If the bits Partial Network Learning and Repeat Message Request both are received with value 1 on a channel where CanNmDynamicPncToChannelMappingEnabled is set to TRUE and CanNm is in the Network Mode, then CanNm shall set the Parti al Network Learning Bit in the CBV to 1 on this channel and change to or restart the Repeat Message State.

SWS_CanNm_00382 requirement

If CanNmDynamicPncToChannelMapping Enabled is set to T RUE CanNm shall clear the Partial Network Learning Bit when leaving the Repeat Message State.

SWS_CanNm_00384 requirement

If the function CanNm_PnLearningRequest is called in Prepare Bus - Sleep Mode or Bus Sleep Mode no functionality shall be executed and E_NOT_OK shall be returned.

SWS_CanNm_00385 requirement

The function CanNm_PnLearningRequest shall only be available if CanNmDynamicPncToChannelMappingSupport is set to TRUE .

SWS_CanNm_00401 requirement

If the CanNm performs a state change from Bus Sleep Mode or Prepare Bus Sleep Mode to Network Mode due to a call to Can Nm_NetworkRequest ( i.e. due to an active wakeup) and CanNmActiveWakeupBitEnabled is TRUE , the CanNm shall set the ActiveWakeupBit in the CBV.

SWS_CanNm_00402 requirement

If the CanNm module leaves the Network Mode and CanNmActiveWakeupBitEnabled is TRUE , the CanNm module shall cl ear th e ActiveWakeupBit in the CBV.

SWS_CanNm_00445 requirement

{OBSOLETE} If CanNmPnE i raCalcEnabled is TRUE and CanNmPnEraCalcEnabled is TRUE , the PN status information has to be stored separately for both, the EIRA and ERA information (compare SWS_CanNm_00 4 35 and SWS_CanNm_00424 ).

SWS_CanNm_00446 requirement

If CanNmGlobalPnSupport is set to TR UE and NM Message Tx Timeout Timer has expired then CanNm shall call the function CanSM_TxTimeoutException .

SWS_CanNm_00454 requirement

If CanNmPnHandleMultipleNetworkRequests is set to TRUE CanNm_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 CanNmImmediateNmCycleTime 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 CanNmImmediateNmCycleTime . The CanNmMsgCycleOffset shall not be applied in this case.

SWS_CanNm_00460 requirement

{ DRAFT } If transmission of NM PDUs has been started, the CanNm Message Cycle Timer expires and when CanNmSynchronizedPncShutdownEnabled is set to TRUE and requests for synchronized PNC shutdown are pending, the transmission of the NM PDU shall be postponed to the next CanNm_Mainfunction call .

SWS_CanNm_00461 requirement

If CanNmSynchronizedPncShutdownEnabled is set to TRUE , when a NM PDU is received where PNI bit and PNSR bit ar e 1 and the corresponding ComMChannel configured via CanNmComMNetworkHandleRef is actively coordinated ( ComMPncGatewayType set to COMM_GATEWAY_TYPE_ACTIVE ), CanNm module shall report the runtime error CANNM_E_INVALID_PN_SYNC_SHUTDOWN_REQUEST to DET , ignore the PNSR bit and handle the PDU as usual NM PDU.

SWS_CanNm_00462 requirement

{ DRAFT } If CanNmSynchronizedPncShutdownEnabled is set to TRUE and the service CanNm_RequestSynchronizedPncShutdown is called the CanNm module shall store the given PNC ( pncId ) per given NM - Channel ( nmChannelH andle ) as a pending request for a synchronized PNC shutdown.

SWS_CanNm_00463 requirement

{ OBSOLETE, replaced by SWS_CanNm_00506 } If CanNmSynchronizedPncShutdownEnabled is set to TRUE , requests for synchronized PNC shutdown are pending and no transmission confirmation (indicated via CanNm_TxConfirmation ) of a previous call is pending, then the CanNm module shall request in the next main function call a transmission of a NM message by calling CanIf_Transmit . In case the NM - PDU is not configured for triggered transmission in CanIf ( CanIfTxPduTriggerTransmit set to FALSE ), CanNm 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 CanN mComUserDataSupport 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.

SWS_CanNm_00464 requirement

{ DRAFT } If CanNmSynchronizedPncShutdownEnabled is set to TRUE , the CanNm module has requested a transmission due to synchronized PNC shutdown (see [SWS_CanNm_00463] ) and CanNm_TxConfirmation is called with result E_OK , the CanNm shall consider those PNC IDs stored as pending request for a synchronized PNC shutdown of the corresponding NM - channel as completed and remove them from storage. Additionally, if CanNmPnShutdownMessageRetransmissionDur ation is configured, then CanNm shall cancel the retransmission timer for PN shutdown messages of the affected NM - channel.

SWS_CanNm_00465 requirement

{ DRAFT } If CanNmSyn chronizedPncShutdownEnabled is set to TRUE , CanNmPnShutdownMessageRetransmissionDuration is configured, the CanNm module has requested a transmission due to synchronized PNC sh utdown ( see [SWS_CanNm_00463] ), CanNm_TxConfirmation is called with result E_NOT_OK or the transmission request for this PN shutdown message was not accepted ( CanIf_Transmit returned E_NOT_OK) , the n the CanNm shall keep those PNC IDs stored as pending request for a synchronized PNC shutdown and perform a re transmission in the next main function .

SWS_CanNm_00466 requirement

DRAFT If CanNmSynchronizedPncShutdownEnabled is TRUE and the PNSR bit is set to 1 of the received NM PDU, the CanNm module shall set the bits in the ERA PDU to 0 of the corresponding bits which are set to 1 in the r eceived PN info range, stop the according monitoring for these externally requested PNs (see [ SWS_CanNm_ 00439 ] ) and inform the upper layers in the given order:  call PduR_CanNmRxIndication() for the configured ERA PDU  call Nm_For wardSynchronizedPncShutdown() with the configured NetworkHandle ( CanNmComMNetworkHandleRef )

SWS_CanNm_00467 requirement

{ DRAFT } If CanNm SynchronizedPncShutdownEnabled is set to TRUE the CanNm implementation shall provide the API CanNm _ RequestSynchronizedPncShutdown .

SWS_CanNm_00468 requirement

{ DRAFT } If CanNmPnShutdownMessageRetransmissionDuration is configured and transmission of a P N shutdown message is requested (refer to [SWS_CanNm_00506] ) for the first time, then the corresponding retransmission timer for PN shutdown messages shall be started with CanNmPnShutdownMessageRetransmissionDuration on all affe cted NM - channels.

SWS_CanNm_00469 requirement

{ OBSOLETE, replaced by SWS_CanNm_00509 } If CanNmSynchronizedPncShutdownEnabled is set to TRUE and requests for synchronized PNC shutdown are pending, then the CanNm module shall set for this message additionally the following data beneath the normal data within the call of CanNm_TriggerTransmit: - Set the PNSR bit in the CBV to 1 - Overwrit e the PN information in the user data (after NM User Data has been fetched, if CanNmComUserDataSupport 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."

SWS_CanNm_00470 requirement

{ DRAFT } If CanNmSynchronizedPncShutdownEnabled is set to TRUE and the CanNm module has stored PNC IDs as pending request for a synchronized PNC shutdown, then the CanNm shall remove those PNC IDs from storage which are either externally or internally requested a gain:  CanNm shall check on reception of an NM - message, if externally requested PNCs are received  CanNm shall check up front to each transmission of an PN shutdown message if internal PNC requests are available by deriving the internal PNC requests from the corresponding ComPdu (see ECUC_CanNm_00046 : )

SWS_CanNm_00471 requirement

{ DRAFT } If CanNmSynchronizedPncShutdownEnabled is set to TRUE , CanNmPnShutdownMessageRetransmissionDuration is not configured, the CanNm module has requested a transmission due to synchronized PNC shutdown (see [SWS_CanNm_00463] ), CanNm_TxConfirmation is called with result E_NOT_OK or the transmissions request for this PN shutdown message was not accepted ( CanIf_Transmit returned E_NOT_OK), then the CanNm shall remove the PNC IDs stored as pend ing request for a synchronized PNC shutdown of the corresponding NM - channel and report the runtime error CANNM_E_TRANSMISSION_OF_PN_SHUTDOWN_MESSAGE_FAILED to DET.

SWS_CanNm_00472 requirement

{ DRAFT } If CanNmSynchronizedPncShutdownEnabled is set to TRUE and a retransmission timer for a PN shutdown message (see ECUC_CanNm_00098 : ) expires, then CanNm shall remove the pending reque st for a synchronized PNC shutdown of the corresponding NM - channel from the storage and report the runtime error CANNM_E_TRANSMISSION_OF_PN_SHUTDOWN_MESSAGE_FAILED to DET .

SWS_CanNm_00500 requirement

During initialization and if CanNmPnEnabled is TRUE , the CanNm module shall set each byte of the PNC bit vector to 0x00 .

SWS_CanNm_00501 requirement

{DRAFT} The re maining bytes not assigned to Nm System Bytes or PNC bit v ector shall be available for User Data.

SWS_CanNm_00502 requirement

If CanNmPnEnabled is set to TRUE , the PNI bit in the received NM - PDU is set to 1 and one of the following pre - conditions is valid:  CanNmSynchronizedPncShutdownEnabled is set to FALSE  CanNmSynchronizedPncShutdownEnabled is set to TRUE and the PNSR bit is se t to 0 then the CanNm module shall extract the PNC bit v ector from the received NM - PDU according to the partial network configuration (NmPncBitVectorOffset and NmPncBitVectorLength of the corresponding NM - channel) and forward the PNC bit v ector by calling Nm_PncBitVectorRxIndication .

SWS_CanNm_00503 requirement

If CanNmPnEnabled is set to TRUE and Nm_PncBitVectorRxIndication was called, a received NM PDU shall only be considered for further processing under the following conditions:  CanNmAllNmMessagesKeepAwake is set to TRUE OR  CanNm_ConfirmPnAvailability has not been called yet OR  the output value of RelevantPncRequestDetectedPt r is set to TRUE

SWS_CanNm_00504 requirement

If CanNmSynchronizedPncShutdownEnabled is TRUE , the PNI bit in the received NM - P DU is set to 1 and the PNSR bit is set to 1 , CanNm module shall extract the PNC bit v ector from the received NM - PDU according to the partial network configuration ( NmPncBitVectorOffset and NmPncBitVectorLength of the corresponding NM - channel) and forward t he PNC bit vector by calling Nm_ForwardSynchronizedPncShutdown .

SWS_CanNm_00505 requirement

{DRAFT} If Can NmPnEnabled is TRUE , the NM - PDU is not configured for triggered transmission in CanIf ( CanIfTxPduTriggerTransmit set to FA LSE ), no requests for synchronized PNC shutdown are pending and a NM - PDU has to be transmitted, t he CanNm module shall perform the following actions in the given order: - Call Nm_PncBitVectorTxIndication(<NM - channel>, <buffer to store the unfiltered PNC bit vector of aggregated internal PNC requests>) to indicate the transmission request and to retrieve internal PNC requests . - Copy the received PNC bit vector for internal PNC requests to the NM - PDU by considering NmPncBitVectorOffset and NmPncBitVectorLength o f the corresponding NM - channel - If user data is enabled, fetch the available data (either from Com if CanNmComUserDataSupport is enabled or from internal storage) and copy the data in the user data range of the NM - PDU. - Trigger transmission of the NM - PDU by calling CanIf_Transmit

SWS_CanNm_00506 requirement

{DRAFT} If CanNmSynchronizedPn cShutdownEnabled is set to TRUE , requests for synchronized PNC shutdown are pending and no transmission confirmation (indicated via CanNm_TxConfirmation ) of a previous call is pending, then the CanNm module shall request in the next main function call a tr ansmission of a NM - PDU as PN shutdown message by calling CanIf_Transmit . In case the NM - PDU is not configured for triggered transmission in CanIf ( CanIfTxPduTriggerTransmit set to FALSE ), CanNm shall set for this message additionally the following data ben eath the normal data:  Set the PNSR bit in the CBV to 1  If user data is enabled, fetch the available data (either from Com if CanNmComUserDataSupport is enabled or from internal storage) and copy the data in the user data range of the NM - PDU  Write the PNC b it vector with respect to NmPncBitVectorOffset and NmPncBitVectorLength of the corresponding NM - channel 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

SWS_CanNm_00507 requirement

When a Null pointer has been passed to a CanNm service, the called function shall not be executed and it shall return E_NOT_OK to the calling function if applicable. If development error detection is enabled ( CanNmDevErrorDetect is set to TRUE ) the corresponding error CANNM_E_PARAM_POINTER shall be reported to DET.

SWS_CanNm_00509 requirement

{DRAFT} If CanNmSynchronizedPncShutdownEnabled is set to TRUE and requests for synchronized PNC shutdown are pending, then the CanNm module shall set for this message additionally the following data beneath the normal data within the call of CanNm_TriggerTransmit : - Set the PNSR bit in the CBV to 1 - If user data is enabled, fetch the available data (either from Com if CanNmComUserDataSupport is enabled or from internal storage) and copy the data in the user data range of the NM - PDU - W rite the PNC bit vector with respect to NmPncBitVectorOffset and NmPncBitVectorLength of the corresponding NM - channel 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

SWS_CanNm_00510 requirement

{DRAFT} If CanNm_TriggerTransmit is called and CanNmComUserDataSupport is enabled, CanNm shall collect the NM Us er Data from the referenced NM I - PDU by calling PduR_CanNmTriggerTransmit and copy the data to the user data range of the NM - PDU .

SWS_CanNm_00511 requirement

I f CanNmSynchronizedPncShutdownEnabled is set to TRUE , the CanNm module shall consider transmission of PN shutdown message as inactive after initialization .

SWS_CanNm_00513 requirement

If transmission of Network Management PDUs has been started, the CanNm Message Cycle Timer expires and when CanNmSynchronizedPncShutdownEnabled is set to TRUE and the transmission of PN shutdown messages is active , the transmission of this NM PDU shall be postponed to the next CanNm_Mainfunction call .

SWS_CanNm_00514 requirement

If the CanNm module has requested a transmission of a NM - PDU, CanNmS ynchronizedPncShutdownEnabled is set to TRUE , the transmission of PN shutdown messages is active , CanNm_TxConfirmation is called with result E_NOT_OK or the transmission request for this NM - PDU was not accepted ( CanIf_Transmit returned E_NOT_OK ) , the n the CanNm module shall perform a retransmission of a NM - PDU for this NM - Channel in the next main function call.

SWS_CanNm_00515 requirement

If CanNmGlobalPnSupport is set to TRUE , the CanNm module shall store the latest PNC bit vector per NM - channel everytime the PNC bit vector has been fetched from the Nm modul via call of Nm_PncBitVectorTxIndication .

SWS_CanNm_00516 requirement

If CanNmGlobalPnSupport is set to TRUE , a NM - PDU has been transmitted on a NM - Channel and CanNm_TxConfirmation is called with result E_OK for this NM - PDU, then the CanNm shall forward the confirmation to Nm by calling Nm_PncBitVectorTxConfirmation with the stored PNC bit vector (see [SWS_CanNm_00515] ) for this NM - channel with result set to E_OK .

SWS_CanNm_00517 requirement

If CanNmGlobalPnSupport is set to TRUE , a NM - PDU has been transmitted on a NM - Channel and CanNm_TxConfirmation is called with result E_NOT_OK or the transmission request for this NM - PDU was not accepted ( CanIf_Transmit returned E_NOT_OK ) for this NM - PDU , then the CanNm module shall forward the confirmation to Nm by calling Nm_ PncBitVectorTxConfirmation with the stored PNC bit vector (see [SWS_CanNm_00515] ) for this NM - Channel with result set to E_NOT_OK

SWS_CanNm_00518 requirement

If Can NmPnEnabled is TRUE and a NM - PDU has to be transmitted (either as cylic NM - PDU transmitted with CanNmMsgCycleTime (see [SWS_CanNm_00512 ) or as PN shutdown message), the CanNm module shall additionally fetch the PNC bit vector by calling Nm_PncBitVectorTxIndication and copy the PNC bit vector with respect to NmPncBitVectorOffset and NmPncBitVectorLength of the corresponding NM - channel to the NM - PDU before requesting the transmission of the NM - PDU .

SWS_CanNm_00519 requirement

If CanNmSynchronizedPncShutdown Enabled is set to TRUE , the transmission of PN shutdown messages is active for this NM - Channel and no transmission confirmation of a previous call to transmit a NM - PDU as PN shutdown message on this NM - Channel is pending, then the CanNm module shall reque st in the next main function call a transmission of a NM - PDU as PN shutdown message by calling CanIf_Transmit .

SWS_CanNm_00520 requirement

If CanNmSynchronizedPncShutdownEnabled is set to TRUE the CanNm implementation shall provide the API CanNm_ActivateTxPnShutdownMsg .

SWS_CanNm_00521 requirement

If CanNmSynchronizedPncShutdownEnabled is set to TRUE and CanNm_ActivateTxPnShutdownMs g is called with a valid NM - Channel ( nmChannelHandle ), then the Can Nm module shall consider the PN shutdown message transmission as active on the given NM - channel, set PNSR bit in the CBV to 1 and return with E_OK .

SWS_CanNm_00522 requirement

If Can NmSynchronizedPncShutdownEnabled is set to TRUE the CanNm implementation shall provide the API CanNm_DeactivateTxPnShutdownMsg .

SWS_CanNm_00523 requirement

If CanNmSynchronizedPncShutdownEnabled is set to TRUE and CanNm_DeactivateTxPnShutdownMsg is c alled with a valid NM - Channel ( nmChannelHandle ), then the CanNm module shall consider the PN shutdown message transmission as inactive on the given NM - channel, set PNSR bit in the CBV to 0 and return with E_OK.