Azzera filtri
Azzera filtri

Rte_IrvRead is generated always in the begining of function

3 visualizzazioni (ultimi 30 giorni)
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
}

Risposte (0)

Categorie

Scopri di più su AUTOSAR Blockset in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by