Why cannot a server call point call the server runnable in the same instance?
9 次查看(过去 30 天)
显示 更早的评论
I´m modeling an AUTOSAR software component named "A" by means of corresponding Simulink model "A". The model has one server interface "Sp". This server interface "Sp" shall provide a runnable "r" so that a client interface "Cp" from other AUTOSAR software component "B" can use the service from the server interface "Sp".
Furthermore, the software component "A" shall use the services of it´s own server port "Sp".
After making all the configurations for the AUTOSAR SWC and the mentioned interfaces, I´m getting following error:
The Function Caller block 'A / FunctionCallerERV_UPDATE_PROC' calls the Simulink Function block 'A / ERV_UPDATE_PROC'. This is not allowed, because the server call point in an AUTOSAR software component cannot call the server runnable in the same instance.
How is it possible to use the interface (provided function) of the server port inside the same AUTOSAR software component "A"?
I really do not want to model the same functionality which is being provided by mentioned server port "Sp" inside the same AUTOSAR software component "A" since it means that the generated code would contain double functionalities.
I´m using Matlab 2018b.
Many thanks in advance for your help.
0 个评论
采纳的回答
Matt Brauer
2019-3-25
It is currently required within AUTOSAR models that global Simulink Functions and Function Callers to global functions are mapped to client-server interfaces. These elements are function interfaces and are naturally represented as such in an AUTOSAR context.
In R2017a, Simulink began enforcing that the call point and server interfaces cannot be contained within the same instance of a runnable. This restriction is not explicit in the AUTOSAR specification. However, in practice, we have found that this limitation is common in AUTOSAR implementations and authoring tools. Imposing this restriction within Simulink helps avoid potential integration issues for customer.
The suggested mechanism to use Simulink Function & Function Callers pairs within an AUTOSAR runnable is to use scoped Simulink Functions. (Functionality introduced in R2017b)
2 个评论
Jeevan Kumar Guntammagari
2020-5-24
Hi Can you elaborate the sentence "The suggested mechanism to use Simulink Function & Function Callers pairs within an AUTOSAR runnable is to use scoped Simulink Functions. "??
How do i implement a runnable1 calling runnable2 within the same Software Component?
For example I want to call Runnable2 from Runnable1. I tried creating a scoped simulink function with function caller giving function name /function prototype as Runnable2. But i see this doesn't call Runnable2 as i want. Instead it creates a Runnable2_c which is called from Runnable1.
//Expected
void Runnable1(uint8 var)
{
Runnable2();
}
//But if i use scoped simulink function with Runnable2 name within Runnable1 and function caller i see the code as below
void Runnable1(uint8 var)
{
Runnable2_c();
}
end
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!