The profile includes a number of options for generating less demanding code. Specifically, the profile lets you specify that Rational Rhapsody generates smaller and less complex code for relations and flow ports in your model, relative to the code ordinarily generated Rational Rhapsody in the C language.
To have Rational Rhapsody generate optimized code for the relations in your model, set the value of the C_CG::Configuration::DirectRelations property to Checked.
To have the product generate optimized code for the flow ports in your model, set the value of the C_CG::Configuration::DirectFlowPorts property to Checked.
Ordinarily, the use of flow ports requires you to define attributes with the same name as the flow ports. When using the optimized code feature, this is only necessary for input flow ports. You are not required to declare matching attributes for output flow ports.
The following two properties can be used to customize some of the names used in the code generated for direct flow ports:
The code generated for direct relations is optimized by eliminating the complex setter functions that are ordinarily generated in Rational Rhapsody in the C language. The purpose of these setter functions is to allow run-time changes in terms of the objects connected by the relations. Since the MicroC profile is intended for static systems, it is assumed that the relation is initialized once and does not need to be modified, thus eliminating the need for these setter functions.
If you are using direct relations with the compile-time initialization option, the product includes const in the relevant declarations.
The code generated for direct flow ports is characterized by the following: