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 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 8 Aug. 2024
Beantwortet: MathWorks Support Team
am 8 Aug. 2024
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?
Akzeptierte Antwort
MathWorks Support Team
am 8 Aug. 2024
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu AUTOSAR Blockset finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!