code generation framework for model based control apps