SNIP_CLASSIC_STD_SECTION_9_9_Read_received_data
Wortlaut
9.9 Read received data
«module» CanIf
«module» Can
«Peripheral» CanController
«module» LSduR
! "
#
$
%&
'
#
LSduR_CanIfRxIndication(PduIdType, const PduInfoType*) Read data from CANIF Rx buffer() [CAN L-PDU ID was found]: Data Length Check() Copy data to CANIF receive L-PDU buffer() Copy data to CANIF receive L-PDU buffer() Set Indication Flag() Invalidation of hardware object() Invalidation of hardware object() Reset Indication flag()
CanIf_ReadRxNotifStatus(CanIf_NotifStatusType, PduIdType) CanIf_RxIndication(const Can_HwType*, const PduInfoType*) Validation of hardware object() [L-PDU reception in BasicCAN]: Software filtering and L-PDU assignment() Validation of hardware object()
CanIf_RxIndication()
CanIf_ReadRxNotifStatus() CanIf_ReadRxPduData(Std_ReturnType, PduIdType, PduInfoType**) Receive Interrupt() Read Indication flag() Receive Interrupt() CanIf_ReadRxPduData() Figure 9.9: Read received data Activity Description Receive Interrupt The CAN Controller indicates a successful reception and triggers a receive interrupt. Invalidation of CAN hardware object, provide CPU access to CAN mailbox The CPU (CanDrv) get exclusive access rights to the CAN mailbox or at least to the corresponding hardware object, where new data were received. Buffering, normalizing The L-PDU is normalized and is buffered in the temporary buffer located in CanDrv. Each CanDrv owns such a temporary buffer for every Physical Channel only if normalizing of the data is necessary. Indication to CanIf The reception is indicated to CanIf by calling of CanIf_RxIndication(). The HRH specifies the CAN RAM Hardware Object and the corresponding CAN Controller, which contains the received L-PDU. The temporary buffer is referenced to CanIf by PduInfoPtr->SduDataPtr. Software Filtering The Software Filtering checks, whether the received L-PDU will be processed on a local ECU. If not, the received L-PDU is not indicated to upper layers. Further processing is suppressed. Data Length Check If the L-PDU is found, the Data Length of the received L-PDU is compared with the expected, statically configured one for the received L-PDU. Copy data The data is copied out of the CAN hardware into the receive CAN L-PDU buffers in CanIf. During access the CAN hardware buffers must be unlocked for CPU access/locked for CAN Controller access. Indication Flag Set indication status flag for the received L-PDU in CanIf. Receive Indication to the upper layer The corresponding receive indication service of the upper layer is called. This signals a successful reception to the target upper layer. The parameter RxPduId specifies the L-SDU, the second parameter is the reference on the temporary buffer within the L-SDU. Validation of CAN hardware object, allow access of CAN Controller to CAN mailbox The CAN Controller get back exclusive access rights to the CAN mailbox or at least to the corresponding hardware object, where new data were already being copied into the upper layer buffer. Read indication status Times later the upper layer can read the indication status by call of CanIf_ReadRxNotifStatus(). This service can also be used for transmit L-PDUs. Then it return the confirmation status. Reset indication status Before CanIf_ReadRxNotifStatus() returns, the indication status is reset. Read received data Times later the upper layer can read the received data by call of CanIf_ReadRxPduData(). Read CanIf Rx buffer CanIf_ReadRxPduData() reads the data from CanIf Rx buffer. E_OK from CanIf If CanIf_ReadRxPduData() was successful, the request returns E_OK with valid PduInfoPtr.
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 164 |
| Ziel-Modul | std (classic) |
| Ziel-Anforderung | SWS_Std_00005 |
| Semantische Rolle | constitutive |
| Automatisierungs-Konfidenz | 0.95 |