Rte_IrvRead is generated always in the begining of function
3 ビュー (過去 30 日間)
古いコメントを表示
I observed that no matter how i change the model, Rte_IrvRead is generated always in the begining of function. I want it to generate in the middle or end of the function as per the requirement. Is there anyway to change the sequence Rte_IrvRead call is generated?
I even tried assigning priority to the blocks and ports but no change.
% The current C code generated looks something like below
FUNC(void SetDutyCycle(VAR (Channel, AUTOMATIC) DutyCycle)
{
uint16 tmpIrvReadVal;
tmpIrvReadVal = Rte_IrvRead_Pwm_SetDutyCycle_PWM();
if (Rte_CData_FaultInjection() == ENABLED)
{
//.... Do something
}
Rte_IrvWrite_Pwm_SetDutyCycle_PWM(rtDW.Merge);
//... Do something
//... Do something
}
% Instead I want to generate something like below
FUNC(void SetDutyCycle(VAR (IoHwAb_Pwm_PwmChannel, AUTOMATIC) DutyCyclePercent)
{
uint16 tmpIrvReadVal;
if (Rte_CData_FaultInjection() == ENABLED)
{
//.... Do something
}
Rte_IrvWrite_Pwm_SetDutyCycle_PWM(rtDW.Merge);
tmpIrvReadVal = Rte_IrvRead_Pwm_SetDutyCycle_PWM();
//... Do something
//... Do something
}
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!