Why do I get the error message 'A definition for the function 'readData' called by Function Caller block could not be found' when simulating a client model for AUTOSAR communication?
조회 수: 6 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2024년 8월 8일
답변: MathWorks Support Team
2024년 8월 8일
I use arxml.importer to generate the simulink model from ARXML and it generated in the FunctionCaller model for Client-Server Runnables. AUTOSAR validation is successful, but model simulation is not possible as I get the following error:
"A definition for the function 'readData' called by Function Caller block 'mControllerWithInterface_client / Runnable3_subsystem / readData' could not be found."
Why does it happen and how to avoid this error and proceed with simulation?
채택된 답변
MathWorks Support Team
2024년 8월 8일
The error message you're encountering during the simulation of the client model is anticipated, primarily because the model does not include the necessary function implementation that the client is trying to invoke.
To circumvent this issue, consider integrating the component model into a test harness using a model reference. This test harness should include a Simulink Function that mimics the server's behavior. If you use Simulink Test to create the test-harness for the client component, we shall automatically create a stub function to emulate the server behavior so that you don't have to manually create a server runnable at harness level.
Please refer to the below video that explains in detail about AUTOSAR Client-Server simulation workflow:
In summary, the reason the component model can't simulate is due to the absence of an implementation or emulation of the function that the function caller is attempting to invoke. By providing a simulated server behavior within the test harness, you should be able to avoid this error.
If you are using DEM or NvM caller blocks to invoke the operations from those services, there are special blocks which AUTOSAR Blockset ships which will provide the emulated behavior for a subset of the functions available in those areas of the AUTOSAR specification. Please refer to the below documentation page which will illustrate about the BSW service calls simulation in Simulink.
댓글 수: 0
추가 답변 (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!