CLASSIC
Modul: cantp
Rolle: heuristic
Konfidenz: 80%
SNIP_CLASSIC_CANTP_SECTION_7_3_8_N_PDU_padding
Wortlaut
7.3.8 N-PDU padding
To guarantee complete compatibility with all upper layer requirements concerning the frame data length (e.g. OBD requires data length to always be set to 8 bytes, however UDS does not), the padding activation is configurable at pre-compile time per N-SDU by using either CanTpRxPaddingActivation for a Rx N-SDU or CanTpTxPaddingActivation for a Tx N-SDU.
[SWS_CanTp_00116] Upstream requirements: SRS_Can_01073
⌈In both padding and no padding modes, the CanTp module shall only transfer used data bytes to the upper layer.⌋
[SWS_CanTp_00059] Upstream requirements: SRS_Can_01086
⌈The value used for padding bytes is configurable via configuration parameter CANTP_PADDING_BYTE (see CanTpPaddingByte).⌋
[SWS_CanTp_00344] Upstream requirements: SRS_Can_01073
⌈If frames with a payload <= 8 (either CAN 2.0 frames or small CAN FD frames) are used for a Rx N-SDU and CanTpRxPaddingActivation is equal to CANTP_ON, then CanTp shall only accept SF Rx N-PDUs or last CF Rx N-PDUs, belonging to that N-SDU, with a length of eight bytes (i.e. PduInfoPtr.SduLength = 8).⌋
[SWS_CanTp_00345] Upstream requirements: SRS_Can_01073
⌈If frames with a payload <= 8 (either CAN 2.0 frames or small CAN FD frames) are used for a Rx N-SDU and CanTpRxPaddingActivation is equal to CANTP_ON, then CanTp receives by means of CanTp_RxIndication() call an SF Rx N-PDU belonging to that N-SDU, with a length smaller than eight bytes (i.e. PduInfoPtr.SduLength < 8), CanTp shall reject the reception. The runtime error code CANTP_E_PADDING shall be reported to the Default Error Tracer.⌋
[SWS_CanTp_00346] Upstream requirements: SRS_Can_01073
⌈If frames with a payload <= 8 (either CAN 2.0 frames or small CAN FD frames) are used for a Rx N-SDU and CanTpRxPaddingActivation is equal to CANTP_ON, and CanTp receives by means of CanTp_RxIndication() call a last CF Rx N-PDU belonging to that N-SDU, with a length smaller than eight bytes (i.e. PduInfoPtr. SduLength != 8), CanTp shall abort the ongoing reception by calling PduR_CanTpRxIndication() with the result E_NOT_OK. The runtime error code CANTP_E_PADDING shall be reported to the Default Error Tracer.⌋
[SWS_CanTp_00347] ⌈If CanTpRxPaddingActivation is equal to CANTP_ON for an Rx N-SDU, the CanTp module shall transmit FC N-PDUs with a length of eight bytes. Unused bytes in N-PDU shall be updated with CANTP_PADDING_BYTE (see CanTpPaddingByte).⌋
[SWS_CanTp_00348] Upstream requirements: SRS_Can_01073
⌈If frames with a payload <= 8 (either CAN 2.0 frames or small CAN FD frames) are used for a Tx N-SDU and if CanTpTxPaddingActivation is equal to CANTP_ON, CanTp shall transmit by means of LSduR_CanTpTransmit() call, SF Tx N-PDU or last CF Tx N-PDU that belongs to that Tx N-SDU with the length of eight bytes(i.e. PduInfoPtr.SduLength = 8). Unused bytes in N-PDU shall be updated with CANTP_PADDING_BYTE (see CanTpPaddingByte).⌋
[SWS_CanTp_00349] ⌈If CanTpTxPaddingActivation is equal to CANTP_ON for a Tx N-SDU, and if a FC N-PDU is received for that Tx N-SDU on a ongoing transmission, by means of CanTp_RxIndication() call, and the length of this FC is smaller than eight bytes (i.e. PduInfoPtr.SduLength <8) the CanTp module shall abort the transmission session by calling PduR_CanTpTxConfirmation() with the result E_NOT_OK. The runtime error code CANTP_E_PADDING shall be reported to the Default Error Tracer.⌋
[SWS_CanTp_00351] Upstream requirements: SRS_Can_01073
⌈If the data length which shall be transmitted via LSduR_CanTpTransmit() does not match possible DLC values (0..8, 12, 16, 20, 24, 32, 48, or 64), CanTp shall use the next higher valid DLC for transmission with initialization of unused bytes to the value of CANTP_PADDING_BYTE (see CanTpPaddingByte).⌋ Rationale: The ISO 11898-1:2015 [9] DLC values from 9 to 15 are assigned to non- linear discrete values for CAN frame payload length up to 64 byte. To prevent the transmission of uninitialized data the padding of CAN frame data is mandatory for DLC values greater than eight when the length of the N_PDU size to be transmitted is not equal to one of the discrete length values defined in the [9] DLC table. For DLC values from 9 to 15 only the mandatory padding should be used. The following picture represents an ISO frame: Figure 7.9: ISO frame construction
Versionen & Provenienz · Zugeordnete Anforderungen
Diese Angaben zeigt der Versions-Explorer.
Begründung & Zuweisungs-Evidenz
runtime error CANTP_E_PADDING defined here
Dokumenten-Herkunft & Rückverfolgbarkeit
| Spezifikations-Dokument | SWS_CANTransportLayer.pdf |
|---|---|
| Dokumentseite | Seite 43 |
| Ziel-Modul | cantp (classic) |
| Ziel-Anforderung | SWS_CanTp_00352 |
| Semantische Rolle | heuristic |
| Automatisierungs-Konfidenz | 0.80 |