How to configure AUTOSAR Receiver Port for DataReceiveErrorEvent

30 visualizzazioni (ultimi 30 giorni)
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.

Risposte (1)

Shaunak
Shaunak il 15 Mag 2025
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!

Categorie

Scopri di più su AUTOSAR Blockset in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by