How to configure AUTOSAR Receiver Port for DataReceiveErrorEvent

조회 수: 3 (최근 30일)
Nagaraj Chincholli
Nagaraj Chincholli 2020년 7월 31일
답변: Shaunak 2025년 5월 15일
Hi,
I want to configure the AUTOSAR receiver port for datareceiveerrorevent when the input port doesnt receive the data within the configured AliveTimeout period.
I couldn't understand better the details provided at the link https://in.mathworks.com/help/autosar/ug/configure-autosar-sender-receiver-communication.html#buzqk5i-1 to configure this.
So can you please help me how I can configure this.

답변 (1개)

Shaunak
Shaunak 2025년 5월 15일
Hi Nagaraj,
To configure the AUTOSAR receiver port for DataReceiveErrorEvent, you can use the “Code Mappings” editor and the “AUTOSAR Dictionary” in Simulink to configure a DataReceiveErrorEvent for an AUTOSAR receiver port. This allows you to handle cases where the input port does not receive data within the configured AliveTimeout period. Here are some steps that you can follow to achieve the same:
  1. Open your model and go to the “Code Mappings” editor.
  2. Select the “Inports” tab and choose the inport mapped to your AUTOSAR receiver port.
  3. Set its AUTOSAR data access mode to “ImplicitReceive”,ExplicitReceive”, or “EndToEndRead”.
  4. Open the “AUTOSAR Dictionary”, expand the “AtomicComponents” node, and select “Runnables” under your receiver component.
  5. Create a new runnable to handle the 'DataReceiveErrorEvent' by clicking the “Add” button.
  6. In the Events pane, click “Add Event”, select the type as “DataReceiveErrorEvent”, and enter an event name.
  7. Under Event Properties, set the trigger to the appropriate receiver port and data element.
Alternatively, you can configure theDataReceiveErrorEvent programmatically using the “autosar.api.getAUTOSARProperties” and “add” functions. To achieve the desired outcome, you can execute the following MATLAB commands:
arProps = autosar.api.getAUTOSARProperties(mdlname);
add(arProps, ibQName, 'Events', 'DRE_Evt', ...
'Category', 'DataReceiveErrorEvent', 'Trigger', 'rPort.DE1', ...
'StartOnEvent', runnableQName);
Hope this helps!

카테고리

Help CenterFile Exchange에서 AUTOSAR Blockset에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by