DEENESPTFRRUARHIKOZHNL

PDU Router (PduR)

ModulPduR (PDU Router)
BSW-Modul-ID51
Standard-Header#include "PduR.h"
SWS-SpezifikationAUTOSAR_SWS_PDURouter.pdf
ClusterCommunication Services

Module guideAI-GENERATED

Routes I-PDUs unchanged between upper and lower communication modules using a static routing table.
AI-GENERATED unreviewed Model: claude-opus-5-5 · Effort: high · Temperature: not controllable · Prompt: 3a20c4ee9a26 Provenance Open questions (1)
Causal anchor: R20-11 Valid from R20-11 Synthesized for this specification release.
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Routes I-PDUs unchanged between upper and lower communication modules using a static routing table.

The PDU Router routes I-PDUs between upper modules such as Com and DCM, communication interfaces, and transport protocols. In doing so, it only translates the I-PDU IDs along configured routing paths and does not modify the content [SWS_PduR_00160]. Its tasks include transmission, reception, TriggerTransmit, segmented TP transmissions, and gateways with optional FIFO buffering. Routing takes place exclusively in the PDUR_ONLINE state after successful PduR_Init [SWS_PduR_00328]. At runtime, routing path groups can be switched via PduR_EnableRouting and PduR_DisableRouting.

The PDU Router routes I-PDUs between upper modules such as Com and DCM, communication interfaces such as CanIf, FrIf, and LinIf, as well as transport protocols. In doing so, it does not modify the I-PDUs [SWS_PduR_00160] and routes only along configured routing paths [SWS_PduR_00162]. Its core capability is the translation of I-PDU IDs on the transmit path as well as on the confirmation and indication paths [SWS_PduR_00766]. The interfaces are generic; the placeholders <Up>, <Lo>, and <LoTp> result from the configuration PduRBswModules [SWS_PduR_00504].

kontext cluster_oben Obere Module (<Up>) cluster_if Communication Interfaces (<Lo>) cluster_tp Transportprotokolle (<LoTp>) Com Com PduR PduR Routing-Tabellen, I-PDU-ID-Umsetzung, Gateway-Puffer Com->PduR PduR_ComTransmit Dcm Dcm Dcm->PduR PduR_<User:Up>Transmit BswM BswM BswM->PduR PduR_EnableRouting, PduR_DisableRouting PduR->Com Com_RxIndication, Com_TxConfirmation, Com_TriggerTransmit PduR->Dcm Dcm_StartOfReception, Dcm_CopyRxData, Dcm_CopyTxData, Dcm_TpRxIndication, Dcm_TpTxConfirmation Det Det PduR->Det Development and runtime errors CanIf CanIf PduR->CanIf <Lo>_Transmit FrIf FrIf PduR->FrIf LinIf LinIf PduR->LinIf CanTp CanTp PduR->CanTp <LoTp>_Transmit FrTp FrTp PduR->FrTp LinTp LinTp (in LinIf) PduR->LinTp CanIf->PduR PduR_<User:Lo>RxIndication, TxConfirmation, TriggerTransmit CanTp->PduR PduR_<User:LoTp>StartOfReception, CopyRxData, CopyTxData, RxIndication, TxConfirmation

Context diagram: PduR is located between upper modules and IF or TP modules; BswM switches path groups, errors are reported to the DET. Sources: [SWS_PduR_00504], SWS PDU Router p. 16

PduR only knows the states PDUR_UNINIT and PDUR_ONLINE [SWS_PduR_00324]. Routing takes place exclusively in PDUR_ONLINE [SWS_PduR_00328]. It transitions there through PduR_Init(ConfigPtr) [SWS_PduR_00334]. Prior to that, all functions except PduR_Init and PduR_GetVersionInfo report the error PDUR_E_UNINIT, provided error detection is enabled [SWS_PduR_00119].

zustaende Powerup Powerup UNINIT PDUR_UNINIT no routing; APIs except PduR_Init and PduR_GetVersionInfo report PDUR_E_UNINIT (if PduRDevErrorDetect) Powerup->UNINIT immediate ONLINE PDUR_ONLINE routing according to routing tables UNINIT->ONLINE PduR_Init(ConfigPtr) without error: release buffers, set default values, enable routing path groups according to configuration ONLINE->ONLINE erneuter PduR_Init: PDUR_E_UNINIT an DET

State diagram: Power-up leads to PDUR_UNINIT; only an error-free PduR_Init leads to PDUR_ONLINE. Sources: [SWS_PduR_00325], [SWS_PduR_00326], SWS PDU Router Fig. 7.2 p. 53

During operation, PduR handles the following sequences:

At runtime, PduR_EnableRouting and PduR_DisableRouting switch entire routing path groups [SWS_PduR_00615] [SWS_PduR_00617], typically controlled by the BswM. Calls on a disabled path terminate with E_NOT_OK [SWS_PduR_00717]. PduR reports development errors such as PDUR_E_PDU_ID_INVALID to the DET [SWS_PduR_00100]. It reports FIFO losses as PDUR_E_PDU_INSTANCES_LOST [SWS_PduR_00670]. Dedicated error handling on interface paths does not exist; return values are passed back to the source SWS PDU Router p. 46.

Role and system boundary: I-PDU routing between upper modules, interfaces, and transport protocols

The PDU Router (PduR) is the central routing entity of the classic communication stack. It accepts I-PDUs from a source module and transfers them unchanged and consistently to one or more destination modules [SWS_PduR_00160]. Routing takes place exclusively along the configured routing paths [SWS_PduR_00162]. A path is uniquely determined by two specifications: the source I-PDU ID from the PduR configuration and the destination I-PDU IDs from the configurations of the called destination modules [SWS_PduR_00161]. The core capability of the PduR is therefore the translation of I-PDU IDs. This applies to the transmit path as well as to the confirmation and indication paths [SWS_PduR_00766]. Each module chooses its handle IDs independently; the configuration links them via the "global" Pdu ECU Configuration Fig. 3.13 p. 192.

Modules such as Com and DCM are located above PduR. Communication interfaces such as CanIf, FrIf, and LinIf, as well as transport protocols such as CanTp, FrTp, and LinTp, are located below SWS PDU Router p. 24. The interfaces are defined generically. The placeholders <Up>, <Lo>, and <LoTp> are replaced via the module configuration referenced in PduRBswModules, and for CDDs via their apiServicePrefix [SWS_PduR_00504] SWS PDU Router Fig. 10.2 p. 95. If a lower module supports both TP and IF, the infixes Tp and If are added [SWS_PduR_00800].

kontext cluster_oben Obere Module (<Up>) cluster_if Communication Interfaces (<Lo>) cluster_tp Transportprotokolle (<LoTp>) Com Com PduR PduR Routing-Tabellen, I-PDU-ID-Umsetzung, Gateway-Puffer Com->PduR PduR_ComTransmit Dcm Dcm Dcm->PduR PduR_<User:Up>Transmit BswM BswM BswM->PduR PduR_EnableRouting, PduR_DisableRouting PduR->Com Com_RxIndication, Com_TxConfirmation, Com_TriggerTransmit PduR->Dcm Dcm_StartOfReception, Dcm_CopyRxData, Dcm_CopyTxData, Dcm_TpRxIndication, Dcm_TpTxConfirmation Det Det PduR->Det Development and runtime errors CanIf CanIf PduR->CanIf <Lo>_Transmit FrIf FrIf PduR->FrIf LinIf LinIf PduR->LinIf CanTp CanTp PduR->CanTp <LoTp>_Transmit FrTp FrTp PduR->FrTp LinTp LinTp (in LinIf) PduR->LinTp CanIf->PduR PduR_<User:Lo>RxIndication, TxConfirmation, TriggerTransmit CanTp->PduR PduR_<User:LoTp>StartOfReception, CopyRxData, CopyTxData, RxIndication, TxConfirmation

Context diagram: PduR is located between upper modules and lower IF or TP modules; BswM switches routing path groups, errors are reported to the DET. Sources: [SWS_PduR_00504], [SWS_PduR_00615], [SWS_PduR_00119], SWS PDU Router p. 16

If PduRZeroCostOperation is set and all routing paths are pre-compile, neighboring modules may call each other directly [SWS_PduR_00287]. If at least one path is not pre-compile, the generator must report an error [SWS_PduR_00619] SWS PDU Router p. 56. The generator shall optimize away unused features, i.e., TP, IF, gateway, and FIFO [SWS_PduR_00764].

Lifecycle: from PDUR_UNINIT via PduR_Init to PDUR_ONLINE

PduR possesses exactly one state machine [SWS_PduR_00644]. It has the states PDUR_UNINIT and PDUR_ONLINE from PduR_StateType [SWS_PduR_00324] [SWS_PduR_00742]. After power-on, the module is in PDUR_UNINIT [SWS_PduR_00325]. After successful PduR_Init, it transitions to PDUR_ONLINE [SWS_PduR_00326]. Routing only takes place in PDUR_ONLINE [SWS_PduR_00328]; nothing is routed in PDUR_UNINIT [SWS_PduR_00330] SWS PDU Router Fig. 7.2 p. 53. An older diagram additionally shows a state PDUR_REDUCED after failed initialization SWS PDU Router (alt) p. 30. This state does not apply to R20-11, as there are only two states here.

zustaende Powerup Powerup UNINIT PDUR_UNINIT no routing; APIs except PduR_Init and PduR_GetVersionInfo report PDUR_E_UNINIT (if PduRDevErrorDetect) Powerup->UNINIT immediate ONLINE PDUR_ONLINE routing according to routing tables UNINIT->ONLINE PduR_Init(ConfigPtr) without error: release buffers, set default values, enable routing path groups according to configuration ONLINE->ONLINE erneuter PduR_Init: PDUR_E_UNINIT an DET

State diagram: After power-up, PduR is in PDUR_UNINIT and does not route; it routes in PDUR_ONLINE only after error-free PduR_Init. Sources: [SWS_PduR_00325], [SWS_PduR_00326], [SWS_PduR_00119], [SWS_PduR_00100], SWS PDU Router Fig. 7.2 p. 53

PduR_Init(ConfigPtr) is synchronous and non-reentrant [SWS_PduR_00334]. The function performs three things:

Prior to initialization, all functions except PduR_Init and PduR_GetVersionInfo report the error PDUR_E_UNINIT, provided PduRDevErrorDetect is active [SWS_PduR_00119]. PduR_GetVersionInfo [SWS_PduR_00338] is enabled via PduRVersionInfoApi System Template p. 656.

The post-build data is located in PduR_PBConfigType and implemented in PduR_PBcfg.c [SWS_PduR_00241] [SWS_PduR_00743]. It is uniquely identified via PduRConfigurationId [SWS_PduR_00281]. PduR_GetConfigurationId [SWS_PduR_00341] [SWS_PduR_00280] provides this identifier as an uint16-based PduR_PBConfigIdType; an ECU can contain multiple selectable configurations [SWS_PduR_00771]. Routing tables can be updated at post-build time [SWS_PduR_00295], though only in the uninitialized state [SWS_PduR_00296]. Memory consumption can grow with a new configuration and must therefore be planned for at design time SWS PDU Router p. 160.

Communication interface paths: Transmit, TriggerTransmit, and confirmations

If an upper module calls PduR_<User:Up>Transmit [SWS_PduR_00406], PduR calls <Lo>_Transmit for each destination [SWS_PduR_00625]. In doing so, it does not buffer [SWS_PduR_00629]. For the return value, the following applies:

The destinations of a multicast are either all interfaces or all transport protocols, never mixed [SWS_PduR_00633].

CanIf copies the data directly upon Transmit SWS PDU Router Fig. 9.5 p. 100. FrIf and LinIf, in contrast, retrieve it later via PduR_<User:Lo>TriggerTransmit [SWS_PduR_00369]. PduR forwards this call to <Up>_TriggerTransmit [SWS_PduR_00430] and returns its return value [SWS_PduR_00661] SWS PDU Router Fig. 9.6 p. 101. PduR_<User:Lo>TxConfirmation [SWS_PduR_00365] is forwarded to <Up>_TxConfirmation together with the result [SWS_PduR_00627]. For multicast, this occurs only after the last confirmation [SWS_PduR_00589].

Transmission of an I-PDU via communication interfacesComPduRCanIfFrIfPduR_ComTransmit(TxPduId, PduInfoPtr)Quell-I-PDU-ID in Ziel-I-PDU-ID umsetzenaltDestination with direct data provision (CanIf)CanIf_Transmit(PduId, PduInfoPtr)copy data()Std_ReturnTypeDestination with TriggerTransmit (FrIf, LinIf)FrIf_Transmit(PduId, PduInfoPtr)set flag()Std_ReturnTypeReturn value (singlecast unchanged)Use Case: Later: transmit point in time in FlexRay cyclePduR_<User:Lo>TriggerTransmit(TxPduId, PduInfoPtr)Com_TriggerTransmit(TxPduId, PduInfoPtr)copy buffer()E_OK, SduLengthReturn value unchangedUse Case: After transmissionPduR_<User:Lo>TxConfirmation(TxPduId, result)Com_TxConfirmation(TxPduId, result)Confirmation via CanIf proceeds identically;for multicast only after the last confirmation

Sequence diagram: Transmission from Com with direct data provision (CanIf) or with delayed data retrieval via TriggerTransmit (FrIf), each with subsequent confirmation. Sources: [SWS_PduR_00625], [SWS_PduR_00430], [SWS_PduR_00627], SWS PDU Router Fig. 9.5 p. 100, SWS PDU Router Fig. 9.6 p. 101

Upon reception, PduR_<User:Lo>RxIndication [SWS_PduR_00362] leads to a call of <Up>_RxIndication for each upper destination [SWS_PduR_00621]; 1:n is supported [SWS_PduR_00164] SWS PDU Router Fig. 9.1 p. 97. PduR checks the length neither during local reception [SWS_PduR_00744] nor during local transmission [SWS_PduR_00745].

Transport protocol paths: segmented I-PDUs between DCM and TP modules

For TP transmission, PduR calls <LoTp>_Transmit for each destination [SWS_PduR_00634]. The TP module retrieves the data segment by segment via PduR_<User:LoTp>CopyTxData [SWS_PduR_00518]. PduR forwards each request to <Up>_CopyTxData [SWS_PduR_00299] and passes through the return value [SWS_PduR_00676] SWS PDU Router Fig. 9.9 p. 104.

For multicast, the upper layer must provide the same data multiple times. The request of the first destination is sent to the upper layer with TP_CONFPENDING [SWS_PduR_00631], all further requests with TP_DATARETRY [SWS_PduR_00632]. After the last confirmation, the upper layer receives a single <Up>_TpTxConfirmation. This reports E_OK if at least one destination reported E_OK [SWS_PduR_00765] SWS PDU Router Fig. 9.10 p. 83.

TP multicast transmission from the DcmDcmPduRCanTpFrTpPduR_<User:Up>Transmit(TxPduId, PduInfoPtr)CanTp_Transmit(PduId, PduInfoPtr)Std_ReturnTypeFrTp_Transmit(PduId, PduInfoPtr)Std_ReturnTypeStd_ReturnTypeloopfor each position of the transmissionPduR_<User:LoTp>CopyTxData(id, info, retry, availableDataPtr)Dcm_CopyTxData(…)TpDataState = TP_CONFPENDINGBufReq_ReturnTypeBufReq_ReturnTypePduR_<User:LoTp>CopyTxData(id, info, retry, availableDataPtr)Dcm_CopyTxData(…)TpDataState = TP_DATARETRYBufReq_ReturnTypeBufReq_ReturnTypePduR_<User:LoTp>TxConfirmation(id, result)PduR_<User:LoTp>TxConfirmation(id, result)after the last confirmation:E_OK if at least one destination reported E_OKDcm_TpTxConfirmation(id, result)

Sequence diagram: For TP multicast from DCM, PduR requests the same data per destination using TP_CONFPENDING or TP_DATARETRY and aggregates the confirmations. Sources: [SWS_PduR_00634], [SWS_PduR_00631], [SWS_PduR_00632], [SWS_PduR_00765], SWS PDU Router Fig. 9.10 p. 83

TP reception begins with PduR_<User:LoTp>StartOfReception [SWS_PduR_00507]. PduR forwards it to <Up>_StartOfReception [SWS_PduR_00549] and returns its return value unchanged [SWS_PduR_00623]. This is followed by two forwardings:

A call with SduLength 0 queries the available buffer or the available data [SWS_PduR_00740] SWS PDU Router Fig. 9.4 p. 99. PduR passes cancellations on to each destination. PduR_<User:Up>CancelTransmit results in <Lo>_CancelTransmit or <LoTp>_CancelTransmit [SWS_PduR_00769] [SWS_PduR_00723] [SWS_PduR_00724]. PduR_<User:Up>CancelReceive results in <LoTp>_CancelReceive [SWS_PduR_00727].

TP-Empfang von CanTp an DcmCanTpPduRDcmPduR_<User:LoTp>StartOfReception(id, info, TpSduLength, bufferSizePtr)Dcm_StartOfReception(…)BUFREQ_OK, bufferSizePtrReturn value unchangedloopfor each further segmentPduR_<User:LoTp>CopyRxData(id, info, bufferSizePtr)Dcm_CopyRxData(…)copy data()BufReq_ReturnTypeBufReq_ReturnTypePduR_<User:LoTp>RxIndication(id, result)Dcm_TpRxIndication(id, result)

Sequence diagram: During TP reception from CanTp to DCM, PduR passes through StartOfReception, the CopyRxData loop, and RxIndication 1:1. Sources: [SWS_PduR_00549], [SWS_PduR_00428], [SWS_PduR_00429], SWS PDU Router Fig. 9.4 p. 99

Gateway operation: immediate forwarding, FIFO buffering, and on-the-fly TP

Between communication interfaces, PduR routes 1:n [SWS_PduR_00436] and with immediate forwarding, i.e., without its own rate control [SWS_PduR_00437]. Gatewaying is only performed IF↔IF or TP↔TP [SWS_PduR_00638]. For the forwarded length, the following applies:

  • Without buffering, PduR forwards the minimum of the received length and the configured destination length [SWS_PduR_00783].
  • With buffering, it copies at most PduRPduMaxLength and discards the remainder [SWS_PduR_00746].

An I-PDU can be routed locally to Com and simultaneously forwarded to a second CAN SWS PDU Router Fig. 9.14 p. 114.

How the destination obtains the data is determined by PduRDestPduDataProvision:

A FIFO can be configured per destination I-PDU [SWS_PduR_00307]. FIFO behavior applies for PduRQueueDepth greater than 1 [SWS_PduR_00785]. The activity diagram summarizes the input and output rules [SWS_PduR_00665] [SWS_PduR_00666].

gateway_fifo rx PduR_<SrcLo>RxIndication on buffered gateway path prov PduRDestPduDataProvision? rx->prov dleer FIFO empty and no TxConfirmation pending? prov->dleer PDUR_DIRECT tleer FIFO leer? prov->tleer PDUR_TRIGGERTRANSMIT ddirekt <DstLo>_Transmit direkt aufrufen; FIFO bleibt leer dleer->ddirekt yes voll FIFO voll? dleer->voll no tkopie I-PDU in FIFO kopieren, <DstLo>_Transmit aufrufen tleer->tkopie yes tleer->voll no flush Flush FIFO, PDUR_E_PDU_INSTANCES_LOST to DET; handle new I-PDU as for empty FIFO voll->flush yes einreihen enqueue I-PDU as newest entry voll->einreihen no tt PduR_<DstLo>TriggerTransmit ttleer FIFO leer? tt->ttleer ttnok return E_NOT_OK ttleer->ttnok yes ttok copy and remove oldest entry; FIFO not empty: <DstLo>_Transmit with oldest I-PDU ttleer->ttok no conf PduR_<DstLo>TxConfirmation (direkte Datenbereitstellung) confnext FIFO not empty: <DstLo>_Transmit with oldest I-PDU, then remove conf->confnext

Activity diagram: Depending on data provision and FIFO fill level, a gatewayed I-PDU is transmitted immediately, queued, or restarted after an overflow; TriggerTransmit and TxConfirmation empty the FIFO. Sources: [SWS_PduR_00665], [SWS_PduR_00793], [SWS_PduR_00786], [SWS_PduR_00787], [SWS_PduR_00255], [SWS_PduR_00669], [SWS_PduR_00666], [SWS_PduR_00667], [SWS_PduR_00662]

Two procedures exist for TP gateways. In direct gatewaying, <DstLoTp>_Transmit starts in the RxIndication with E_OK [SWS_PduR_00551]. In on-the-fly gatewaying, retransmission starts as soon as PduRTpThreshold is reached [SWS_PduR_00317]. In that case, only one destination is permitted [SWS_PduR_00708], and data already transmitted is not retransmitted [SWS_PduR_00707] SWS PDU Router p. 58. PduR selects the buffer by size:

  • If the message fits into PduRPduMaxLength, it uses the dedicated buffer [SWS_PduR_00797].
  • Otherwise, it dynamically retrieves a buffer from PduRTxBuffer [SWS_PduR_00798].

With TxConfirmation, it releases the buffer [SWS_PduR_00637]. If the I-PDU is additionally to be received locally, PduR calls <UpTp>_StartOfReception, <UpTp>_CopyRxData, and <UpTp>_RxIndication in this order [SWS_PduR_00789]. For this, it must buffer because DCM has no knowledge of the gateway SWS PDU Router p. 112.

On-the-fly gateway of a TP I-PDU from CAN1 to CAN2CanTp (CAN1, Quelle)PduRCanTp (CAN2, Ziel)PduR_<User:LoTp>StartOfReception(id, info, TpSduLength, bufferSizePtr)Select buffer: dedicated if TpSduLength ≤ PduRPduMaxLength,otherwise dynamic from PduRTxBufferBUFREQ_OK (without buffer: BUFREQ_E_OVFL)loopbis PduRTpThreshold erreichtPduR_<User:LoTp>CopyRxData(id, info, bufferSizePtr)copy data()BUFREQ_OKCanTp_Transmit(PduId, PduInfoPtr)Std_ReturnTypeloopremaining segments, interleavedPduR_<User:LoTp>CopyRxData(…)BUFREQ_OKPduR_<User:LoTp>CopyTxData(id, info, retry, availableDataPtr)BUFREQ_OKPduR_<User:LoTp>RxIndication(id, result)PduR_<User:LoTp>TxConfirmation(id, result)release buffer for this destinationOnly one destination TP module permitted;no retransmission of already transmitted data

Sequence diagram: In on-the-fly gatewaying between two CAN networks, forwarding begins as soon as the threshold is reached; reception and transmission run interleaved. Sources: [SWS_PduR_00317], [SWS_PduR_00708], [SWS_PduR_00797], [SWS_PduR_00799], [SWS_PduR_00637], SWS PDU Router Fig. 9.15 p. 110

Routing path groups: switching routing at runtime

Routing path groups bundle paths per network or PDU type. They are typically switched by BswM SWS PDU Router p. 69. PduR_EnableRouting(id) [SWS_PduR_00615] and PduR_DisableRouting(id, initialize) [SWS_PduR_00617] serve this purpose; the identifier is of type uint16 [SWS_PduR_00654]. The activation takes effect immediately [SWS_PduR_00715]. When disabling, the following rules apply:

Later versions explicitly enumerate the affected functions SWS PDU Router p. 69.

routinggruppen aufruf PduR_EnableRouting(id) or PduR_DisableRouting(id, initialize) exist Routing-Pfadgruppe id existiert? aufruf->exist det PduRDevErrorDetect aktiv? exist->det no art Aufruf? exist->art yes meld PDUR_E_ROUTING_PATH_GROUP_ID_INVALID melden det->meld yes keine Return without action det->keine no meld->keine ein Enable group immediately: subsequent transmit is serviced directly art->ein EnableRouting aus Gruppe deaktivieren art->aus DisableRouting fifo Paths with FIFO (PduRQueueDepth > 1): flush FIFO, PDUR_E_PDU_INSTANCES_LOST aus->fifo init initialize = TRUE: single buffer to default value initialize = FALSE: retain current value fifo->init gesperrt APIs with I-PDU ID of a disabled path: E_NOT_OK without further action init->gesperrt

Activity diagram: For an unknown group ID, the call returns without action (optionally with a DET report); otherwise, the group is immediately enabled or disabled, with FIFO flushing and buffer handling. Sources: [SWS_PduR_00647], [SWS_PduR_00648], [SWS_PduR_00716], [SWS_PduR_00649], [SWS_PduR_00715], [SWS_PduR_00663], [SWS_PduR_00717]

The Mode Management Guide recommends path groups for I-PDUs without a Com I-PDU group, such as for LdCom. Switching is performed via BswM rules, for example depending on the partial network state Mode Management Guide p. 50. The BswM action BswMPduRouterControl calls PduR_EnableRouting or PduR_DisableRouting for this purpose SWS BSW Mode Manager p. 145. In n:1 routing to a local module, at most one path may be active at runtime System Template p. 736 [SWS_PduR_00615].

Behavior in the event of an error

Development errors are defined by [SWS_PduR_00100]. They are reported only if PduRDevErrorDetect is active [SWS_PduR_00119] [SWS_PduR_00221]. PduR does not report production errors SWS PDU Router p. 60.

Error codeValueTrigger
PDUR_E_INIT_FAILED0x00invalid configuration pointer
PDUR_E_UNINIT0x01API before initialization or PduR_Init outside of PDUR_UNINIT
PDUR_E_PDU_ID_INVALID0x02invalid PDU identifier
PDUR_E_ROUTING_PATH_GROUP_ID_INVALID0x08unknown group upon enable/disable [SWS_PduR_00648] [SWS_PduR_00649]
PDUR_E_PARAM_POINTER0x09null pointer as argument

The runtime error PDUR_E_PDU_INSTANCES_LOST occurs in three cases:

As a mandatory interface for this, PduR uses Det_ReportRuntimeError [SWS_PduR_91001].

On IF paths, PduR does not handle errors itself. It passes return values through to the source [SWS_PduR_00626] SWS PDU Router p. 46 and does not retry transmission [SWS_PduR_00256]. On TP paths as well, errors are passed to the upper layer via return value [SWS_PduR_00700] SWS PDU Router p. 49. With multiple destinations, E_OK applies only if all destinations return E_OK [SWS_PduR_00701]. This rule likely refers to TP multicast, whereas [SWS_PduR_00218] applies to IF multicast. Question Q-4bd42fd8dc77ccf2 (open) PduR merely forwards erroneous TP RxIndications [SWS_PduR_00207].

Dedicated rules apply to TP gateways:

Further detailed evidence

The following references substantiate the statements in this guide. The sequences in Chapter 9 of the specification illustrate them, such as SWS PDU Router Fig. 9.5 p. 100.

AI-generated guide based on the requirements of the SWS PDU Router (R20-11) and associated documentation sections; only the linked requirements are normative. Please verify statements marked as interpretations against the specification.

PDU Router (PduR)

The PDU Router routes I-PDUs between communication interfaces, transport protocols, and upper layers without payload inspection.

Funktionen — Übersicht

Typen — Übersicht

Funktionen & Typen — Detailansicht

function PduR_Init [SWS_PduR_00334] 📄 PDF

void PduR_Init (const PduR_PBConfigType* ConfigPtr);

Initializes the PDU Router

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 8eca52c90f1c Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The synchronous and non-reentrant function PduR_Init initializes the PDU Router [SWS_PduR_00334]. As a parameter, it takes a pointer to the post-build configuration of the module (PduR_PBConfigType) with ConfigPtr and returns no value [SWS_PduR_00334]. As part of the initialization, PduR_Init pre-initializes all PDU transmit buffers with the configured default values [SWS_PduR_00308].

Interplay and Sequence Conditions

After power-on, the module is initially in the state PDUR_UNINIT [SWS_PduR_00325]. PduR_Init must be called before all other functions of the module, since other interfaces—with the exception of PduR_GetVersionInfo—report the error PDUR_E_UNINIT via the DET in the uninitialized state, provided that PduRDevErrorDetect is activated [SWS_PduR_00119].

Error Handling and Concurrency

If PduR_Init is called in a state other than PDUR_UNINIT, this is evaluated as PDUR_E_UNINIT [SWS_PduR_00100]. In the event of an invalid configuration pointer or the passing of a null pointer, the error codes PDUR_E_INIT_FAILED and PDUR_E_PARAM_POINTER, respectively, take effect [SWS_PduR_00100]. Due to the lack of reentrancy, no parallel call to the initialization routine may take place [SWS_PduR_00334].

This text was generated by an AI based on the AUTOSAR specification R20-11.

Implementer's Guide to follow (complexity I1)

function PduR_EnableRouting [SWS_PduR_00615] 📄 PDF

void PduR_EnableRouting (PduR_RoutingPathGroupIdType id);

Enables a routing path group.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: e3aad02fdb37 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function PduR_EnableRouting (service ID 0xf3) serves for targeted activation of a defined routing path group in the PDU Router ([SWS_PduR_00615]). As its only parameter, it takes the group identifier id of type PduR_RoutingPathGroupIdType, which addresses the corresponding routing path group in the configuration of the PDU Router ([SWS_PduR_00615]). The call has no return value and is available via header file PduR.h ([SWS_PduR_00615]).

System states and parameter boundaries are decisive for error-free use: Prior to the call, module PduR must be fully initialized, since execution in the uninitialized state triggers the error PDUR_E_UNINIT ([SWS_PduR_00100]). If an invalid routing table or path group identifier is passed to function PduR_EnableRouting, this leads to error PDUR_E_ROUTING_PATH_GROUP_ID_INVALID with error value 0x08 ([SWS_PduR_00100]).

Regarding concurrency, the interface is declared as reentrant ([SWS_PduR_00615]), so that parallel calls to control path groups are generally permissible. In the overall system, the function serves to dynamically enable communication relations; presumably, the service is typically triggered by higher-level entities such as the mode manager to activate routing paths at runtime depending on system or network states. Question Q-365f4b81f59f3511 (open)

Automatically generated usage note based on the AUTOSAR Classic specification (Release R20-11).

function PduR_DisableRouting [SWS_PduR_00617] 📄 PDF

void PduR_DisableRouting (PduR_RoutingPathGroupIdType id, boolean initialize);

Disables a routing path group.

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 79b319e1f13b Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The synchronous function PduR_DisableRouting serves to deactivate a configured routing path group ([SWS_PduR_00617]). It is designed to be reentrant and has no return value ([SWS_PduR_00617]).

Parameters and Behavior

  • id (PduR_RoutingPathGroupIdType): Identification of the routing path group to be deactivated, as defined in the configuration of the PDU Router ([SWS_PduR_00617]).
  • initialize (boolean): Controls buffer behavior upon deactivation. When passing true, single buffers are initialized to their default value; with false, single buffers retain their current value ([SWS_PduR_00617]).

Error Handling and Boundary Conditions

In case of error, specific error codes are defined according to the error table ([SWS_PduR_00100]):

  • If the function is called without the module being initialized, error code PDUR_E_UNINIT (0x01) is intended ([SWS_PduR_00100]).
  • If an invalid routing table or group ID is passed to PduR_DisableRouting, error PDUR_E_ROUTING_PATH_GROUP_ID_INVALID (0x08) is specified ([SWS_PduR_00100]).

The function is available via the header PduR.h ([SWS_PduR_00617]).

This usage note was generated automatically based on the specification requirements.

type PduR_PBConfigType [SWS_PduR_00743] 📄 PDF

Data structure containing post-build-time configuration data of the PDU Router.

type PduR_PBConfigIdType [SWS_PduR_00771] 📄 PDF

Identification of the post-build configuration currently used for routing I-PDUs. An ECU may contain several configurations (post-build selectable), each have unique Id.

type PduR_StateType [SWS_PduR_00742] 📄 PDF

States of the PDU Router

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 9763b14fa079 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The enumeration type PduR_StateType specifies the states of the PDU Router according to [SWS_PduR_00742]. The data type is made available via the header file PduR.h and serves in the PDU Router as a formal typed basis for representing the respective initialization state within the module as well as for calling components.

According to requirement [SWS_PduR_00324], the PDU Router module consists of exactly two operating states, which are defined by the enumeration values of PduR_StateType. The value range defined according to [SWS_PduR_00742] comprises the following values:

  • PDUR_UNINIT: Identifies the state in which the PDU Router is not initialized ([SWS_PduR_00742]).
  • PDUR_ONLINE: Signals that the PDU Router has been successfully initialized and is ready for operation ([SWS_PduR_00742]).

Within the interaction of the specification requirements, PduR_StateType functions as a binding definition for the internal and external state model of the PDU Router ([SWS_PduR_00324]). Since the value range according to [SWS_PduR_00742] is exclusively restricted to PDUR_UNINIT and PDUR_ONLINE, the specification here strictly distinguishes between the uninitialized initial state and the state after successful initialization. Additional intermediate stages, partial operating modes, or specific error states are not provided in the value range of PduR_StateType.

Automatically generated usage note based on the AUTOSAR specification.

Implementer's Guide to follow (complexity I1)

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

Record
AUTOSAR/AP/record/CP_MOD_PduR
Status
unspecified
Version
AUTOSAR/AP/record/CP_MOD_PduR@rel:R20-11#5e882d4b
Content hash
5e882d4b
Source
https://www.autosar.org/fileadmin/standards/R20-11/CP/AUTOSAR_SWS_PDURouter.pdf#nameddest=SWS_PduR_00334

Initialization and status

Returns the version information of this module.

void PduR_GetVersionInfo (Std_VersionInfoType* versionInfo);
PduR_Init function

Initializes the PDU Router

void PduR_Init (const PduR_PBConfigType* ConfigPtr);

Services

Disables a routing path group.

void PduR_DisableRouting (PduR_RoutingPathGroupIdType id, boolean initialize);

Enables a routing path group.

void PduR_EnableRouting (PduR_RoutingPathGroupIdType id);

Returns the unique identifier of the post-build time configuration of the PDU Router

PduR_PBConfigIdType PduR_GetConfigurationId (void);

Types

Identification of the post-build configuration currently used for routing I-PDUs. An ECU may contain several configurations (post-build selectable), each have unique Id.

Data structure containing post-build-time configuration data of the PDU Router.

Identification of a Routing Table

States of the PDU Router