フィルターのクリア

Rte_IrvRead is generated always in the begining of function

3 ビュー (過去 30 日間)
Jeevan Kumar Guntammagari
Jeevan Kumar Guntammagari 2020 年 6 月 3 日
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 件)

カテゴリ

Help Center および File ExchangeAUTOSAR Blockset についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by