Effacer les filtres
Effacer les filtres

Rte_IrvRead is generated always in the begining of function

3 vues (au cours des 30 derniers jours)
Jeevan Kumar Guntammagari
Jeevan Kumar Guntammagari le 3 Juin 2020
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
}

Réponses (0)

Catégories

En savoir plus sur AUTOSAR Blockset dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by