Generating code for actors
You can select the code generation capability for actors within a component
About this task
When you create a configuration, you can choose to generate code for actors (see Defining configurations). If you set the active configuration to generate code for actors, IBM® Engineering Systems Design Rhapsody® generates, compiles, and links the actor code into the same library or executable file as the rest of the system. This enables you to use actors to simulate inputs and responses to the system during system tests.
Classes have code generation properties that determine whether the product generates code for relations and dependencies between actors and classes.
To select code generation for actors within a component:
Procedure
- Right-click the component in the browser and then select Features.
- Select the Initialization tab.
- Under Initial Instances, select the actors to participate in the component.
- Make sure Generate Code for Actors is
selected.
Generate Code for Actors is selected by default, but is cleared when loading pre‑version 3.0 models to maintain compatibility with earlier versions.
Results
By default, relations between actors and
classes are generated only if the actor is generated. You can fine-tune
this setting within the class by using the CG::Relation::GenerateRelationWithActors
property.
See the definition provided for the property on the applicable Properties tab
of the Features window.