- Open your model and go to the “Code Mappings” editor.
- Select the “Inports” tab and choose the inport mapped to your AUTOSAR receiver port.
- Set its AUTOSAR data access mode to “ImplicitReceive”, “ExplicitReceive”, or “EndToEndRead”.
- Open the “AUTOSAR Dictionary”, expand the “AtomicComponents” node, and select “Runnables” under your receiver component.
- Create a new runnable to handle the 'DataReceiveErrorEvent' by clicking the “Add” button.
- In the Events pane, click “Add Event”, select the type as “DataReceiveErrorEvent”, and enter an event name.
- Under Event Properties, set the trigger to the appropriate receiver port and data element.
How to configure AUTOSAR Receiver Port for DataReceiveErrorEvent
조회 수: 3 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
답변 (1개)
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:
Alternatively, you can configure the ’DataReceiveErrorEvent’ 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!
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 AUTOSAR Blockset에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!