C code defect: Output Port value set, before subcomponent is executed
When generating c code from the Contoller component of the SimpleTrafficLights example, the perform_step method first propagates the outputs of (the subcomponent) Behavior to the output of Contoller, before even executing Behavior.
In this case however, perform_step_Behavior_ID_51() should be executed, before setting the outputs of Controller.
From Controller_ID_50.c:
void perform_step_Controller_ID_50(){
noval_ctrlOutPedestrianSignal_ID_139 =
noval_behaviorOutPedestrianSignal_ID_128;
if (!noval_behaviorOutPedestrianSignal_ID_128) {
ctrlOutPedestrianSignal_ID_139 =
behaviorOutPedestrianSignal_ID_128;
}
[…]
noval_behaviorInRequest_ID_123 = noval_ctrlInRequest_ID_137;
if (!noval_ctrlInRequest_ID_137) {
behaviorInRequest_ID_123 = ctrlInRequest_ID_137;
}
perform_step_Behavior_ID_51( );
}
(from redmine: issue id 1718, created on 2013-09-16, closed on 2019-05-29)