CLASSIC
Modul: canif
Rolle: heuristic
Konfidenz: 80%
SNIP_CLASSIC_CANIF_SECTION_7_11_1_General_behavior
Wortlaut
7.11.1 General behavior
At the scope of CanIf the transmit process starts with the call of CanIf_Transmit() and it ends with invocation of upper layer module’s callback service <User_TxConfirmation>(). During the transmit process CanIf, CanDrv and the CAN Mailbox altogether shall store the L-PDU to be transmitted only once at a single location. Depending on the transmit method, these are:
• The CAN hardware transmit object or
• The Transmit L-PDU Buffer inside CanIf, if transmit buffering is enabled. For triggered transmission, CanIf only has to store the transmit request for the given L-PDU but not its data. The data is fetched just in time by means of the trigger transmit function when the HTH is free (again). A single Tx L-PDU, requested for transmission, shall never be stored twice. This behavior corresponds to the usual way of periodic communication on the CAN network. If transmit buffering is enabled, CanIf will store a Tx L-PDU in a CanIf Transmit L-PDU Buffer (CanIfBufferCfg), if it is rejected by CanDrv at Transmit Request. Basically, the overall buffer in CanIf for buffering Tx L-PDUs consits of one or multiple CanIfBufferCfg (see CanIfBufferCfg). Whereas each CanIfBufferCfg is assigned to one or multiple dedicated CanIfBufferHthRef (see CanIfBufferHthRef) and can be configured to buffer one or multiple Tx L-PDUs. But as already mentioned above only one instance per Tx L-PDU can be buffered in the overall amount of CanIfBufferCfg. The behavior of CanIf during L-PDU transmission differs whether transmit buffering is enabled in the configuration setup for the corresponding Tx L-PDU, or not. If transmit buffering is disabled and a transmit request to CanDrv fails (CAN Controller mailbox is in use, BasicCAN), the L-PDU is not copied to the CAN Controller’s mailbox and CanIf_Transmit() returns the value E_NOT_OK. If transmit buffering is enabled and a transmit request to CanDrv fails, depending on the CanIfTxBuffer configuration the L-PDU can be stored in a CanIfTxBuffer. In this case the API CanIf_Transmit() returns the value E_OK although the transmission could not be performed. In this case CanIf takes care of the outstanding transmission of the L- -PDU via CanIf_TxConfirmation() callback and the upper layer doesn’t have to retry the transmit request. The number of available transmit CanIf Tx L-PDU Buffers can be configured completely independent from the number of used Transmit L-PDUs defined in the CAN network description file for this ECU. As per [SWS_CANIF_00835] a Tx L-PDU refers HTHs via the CanIfBufferCfg configuration container (see CanIfBufferCfg). This is valid if transmit buffering is not needed as well. In this case, the buffer size (see CanIfBufferSize) of the CanIfBufferCfg has to be set to 0. Then CanIfBufferCfg configuration container is only used to refer a HTH.
Versionen & Provenienz · Zugeordnete Anforderungen
Diese Angaben zeigt der Versions-Explorer.
Begründung & Zuweisungs-Evidenz
Buffering Tx L-PDU in free buffer element
Dokumenten-Herkunft & Rückverfolgbarkeit
| Spezifikations-Dokument | SWS_CANInterface.pdf |
|---|---|
| Dokumentseite | Seite 43 |
| Ziel-Modul | canif (classic) |
| Ziel-Anforderung | SWS_CANIF_00836 |
| Semantische Rolle | heuristic |
| Automatisierungs-Konfidenz | 0.80 |