DEENESPTFRRUARHIKOZHNL
CLASSIC Modul: canif Rolle: constitutive Konfidenz: 95%

SNIP_CLASSIC_CANIF_SECTION_8_3_6_CanIf_Transmit

Quelle: SWS_CANInterface.pdf (Seite 87) • Ziel-Anforderung: SWS_Std_00005

Wortlaut

8.3.6 CanIf_Transmit [SWS_CANIF_00005] Definition of API function CanIf_Transmit Upstream requirements: SRS_Can_01008 ⌈ Service Name CanIf_Transmit Syntax Std_ReturnType CanIf_Transmit ( PduIdType TxPduId, const PduInfoType* PduInfoPtr ) Service ID [hex] 0x49 Sync/Async Synchronous Reentrancy Reentrant for different PduIds. Non reentrant for the same PduId. TxPduId Identifier of the PDU to be transmitted Parameters (in) PduInfoPtr Length of and pointer to the PDU data and pointer to MetaData. Parameters (inout) None Parameters (out) None Return value Std_ReturnType E_OK: Transmit request has been accepted. E_NOT_OK: Transmit request has not been accepted. Description Requests transmission of a PDU. Available via CanIf.h ⌋ Note: The corresponding CAN Controller and HTH have to be resolved by the TxPduId. [SWS_CANIF_00939] Upstream requirements: SRS_Can_01162, SRS_Can_02003 ⌈When CanIf_Transmit() is called and the container CanIfTxPduCfg.CanIfTxPduXLParams is existing which indicates a CAN XL frame, then CanXL_Write() shall be used for transmission. Otherwise Can_Write() shall be used for transmission.⌋ [SWS_CANIF_00317] ⌈The service CanIf_Transmit() shall not accept a transmit request, if the controller mode referenced by ControllerId is different to CAN_CS_ STARTED and the channel mode at least for the transmit path is not online or offline active.⌋ [SWS_CANIF_00318] ⌈CanIf_Transmit() shall call Can_Write() with the hardware transmit handle corresponding to the provided TxPduId and a Can_PduType structure where: • swPduHandle is set to the CanTxPduId used in the corresponding CanIf_TxConfirmation() call • length is set to the value provided as PduInfoPtr->SduLength, possibly reduced according to [SWS_CANIF_00894] • id is set to the CAN ID associated with the TxPduId • sdu is set to the pointer provided as PduInfoPtr->SduDataPtr ⌋ Note: PduInfoPtr is a pointer to a L-SDU user memory, CAN Identifier, L-SDU handle and Data Length (see [1, Specification of CAN Driver]). [SWS_CANIF_00957] Upstream requirements: SRS_Can_02003 ⌈CanIf_Transmit() shall call CanXL_Write() with the hardware transmit handle corresponding to the provided TxPduId and a CanXL_PduType structure where: • swPduHandle is set to the CanTxPduId used in the corresponding CanIf_TxConfirmation() call • length is set to the value provided as PduInfoPtr->SduLength • sdu is set to the pointer provided as PduInfoPtr->SduDataPtr • XLParams is set to a pointer to a CanXL_Params structure containing the PriorityId, Vcid, SduType, AcceptanceField, and Sec (the Sec element is currently not supported and always set to 0) ⌋ [SWS_CANIF_00882] ⌈CanIf_Transmit() shall accept a NULL pointer as PduInfoPtr->SduDataPtr, if the PDU is configured for triggered transmission: CanIfTxPduTriggerTransmit = TRUE.⌋ [SWS_CANIF_00162] Upstream requirements: SRS_Can_01162, SRS_Can_02003 ⌈If the call of Can_Write()/CanXL_Write() returns E_OK the transmit request service CanIf_Transmit() shall return E_OK.⌋ Note: If the call of Can_Write()/CanXL_Write() returns E_NOT_OK, then the transmit request service CanIf_Transmit() shall return E_NOT_OK. If the transmit request service CanIf_Transmit() returns E_NOT_OK, then the upper layer module is responsible to repeat the transmit request. [SWS_CANIF_00319] Upstream requirements: SRS_BSW_00323 ⌈If parameter TxPduId of CanIf_Transmit() has an invalid value, CanIf shall report development error code CANIF_E_INVALID_TXPDUID to the Det_ReportError service of the DET, when CanIf_Transmit() is called.⌋ [SWS_CANIF_00320] Upstream requirements: SRS_BSW_00323 ⌈If parameter PduInfoPtr of CanIf_Transmit() has an invalid value, CanIf shall report development error code CANIF_E_PARAM_POINTER to the Det_ReportError service of the DET module, when CanIf_Transmit() is called.⌋ [SWS_CANIF_00893] Upstream requirements: SRS_Can_01162, SRS_Can_02003 ⌈When CanIf_Transmit() is called with PduInfoPtr->SduLength exceeding the maximum length of the PDU referenced by TxPduId: • SduLength > 8 if the Can_IdType indicates a classic CAN frame • SduLength > 64 if the Can_IdType indicates a CAN FD frame • SduLength > 2048 if the container CanIfTxPduCfg.CanIfTxPduXLParams is existing which indicates a CAN XL frame CanIf shall report runtime error code CANIF_E_DATA_LENGTH_MISMATCH to the Det_ReportRuntimeError() service of the DET.⌋ [SWS_CANIF_00940] Upstream requirements: SRS_Can_02003 ⌈When CanIf_Transmit() is called with PduInfoPtr->SduLength less than 1 and the container CanIfTxPduCfg.CanIfTxPduXLParams is existing which indicates a CAN XL frame, and SDU Type is configured to a value different from 03h (tunneled CAN 2.0/FD frame), CanIf shall report runtime error code CANIF_E_DATA_ LENGTH_MISMATCH to the Det_ReportRuntimeError() service of the DET.⌋ Note: Besides static configured transmissions there are dynamic transmissions, too. Therefore, the valid data length is always passed by PduInfoPtr->SduLength. Furthermore, even the frame type might change via CanIf_SetDynamicTxId(). [SWS_CANIF_00893] ensures that not matching transmit requests can be detected via DET. [SWS_CANIF_00894] ⌈When CanIf_Transmit() is called with PduInfoPtr-> SduLength exceeding the length of the global PDU (see [ECUC_EcuC_00078]) referenced by TxPduId and CanIfTxPduTruncation is enabled, CanIf shall transmit data up to the length of the global PDU (see [ECUC_EcuC_00078]) and discard the rest.⌋ [SWS_CANIF_00900] ⌈When CanIf_Transmit() is called with PduInfoPtr-> SduLength exceeding the length of the global PDU (see [ECUC_EcuC_00078]) referenced by TxPduId and CanIfTxPduTruncation is disabled, CanIf shall report the runtime error CANIF_E_TXPDU_LENGTH_EXCEEDED and return E_NOT_OK without further actions.⌋ Note: During the call of CanIf_Transmit() the buffer of PduInfoPtr is controlled by CanIf and this buffer should not be accessed for read/write from another call context. After return of this call the ownership changes to the upper layer. [SWS_CANIF_00941] Upstream requirements: SRS_Can_02003 ⌈When CanIf_Transmit is called and the container CanIfTxPduCfg.CanIfTxPduXLParams is existing which indicates a CAN XL frame, the CanXL_Params passed to CanXL_Write shall be composed as described in [SWS_CANIF_00938] of the CAN XL parameters configured in CanIfTxPduXLParams, and those passed as MetaData via the PduInfoPtr->MetaDataPtr.⌋ As mentioned in Chapter 7.27.1, each CAN XL Param is either configured or passed via MetaData. [SWS_CANIF_00942] Upstream requirements: SRS_Can_02003 ⌈For a tunneled CAN 2.0/FD frame (SDU Type 03h) the CAN ID shall by transmitted in the Acceptance Field. The CAN ID is either configured with the parameter CanIfTxPduCanId or passed as MetaData.⌋ [SWS_CANIF_00943] Upstream requirements: SRS_Can_02003 ⌈When CanIf_Transmit is called and CanXL_Write is used for transmission the parameter PduInfo->Sec shall be set to 0.⌋

Versionen & Provenienz · Zugeordnete Anforderungen

Diese Angaben zeigt der Versions-Explorer.

Begründung & Zuweisungs-Evidenz

Cited verbatim in the snippet (deterministic citation).

Dokumenten-Herkunft & Rückverfolgbarkeit

Spezifikations-Dokument SWS_CANInterface.pdf
Dokumentseite Seite 87
Ziel-Modul canif (classic)
Ziel-Anforderung SWS_Std_00005
Semantische Rolle constitutive
Automatisierungs-Konfidenz 0.95