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!