Creating Rational Rhapsody SDL systems

About this task

Systems engineers often use the System Design Language (SDL) to model discrete (event driven) algorithms. The SDL Suite also generates C code for its models. IBM® Rational® Rhapsody® Developer for C++ is integrated with the SDL Suite (version 5.0 or greater) to enable system simulation based on Rational Rhapsody and the SDL Suite behavior. Engineers can import an SDL model into Rational Rhapsody. The product manages the imported model as a class, stereotyped with the SDLSystem.

Note: The naming convention for an SDL signal adds the "_" prefix to the original name of the signal. This prefix can be modified by changing the SDLSignalPrefix property in the Model::Profile group.

By default the SDLSystem uses behavioral ports. This configuration can be changed to use a rapid port instead by selecting the UseRapidPorts property for the package. This property is also stored in the Model::Profile group that you access from the Properties tab of the Features window.

Note: The SDL models you import into the product cannot contain more than a single instance of any given process.
Note: The SDL integration feature cannot be used when you are using the platform integration with Eclipse.

To import an SDL model into Rational Rhapsody:

Procedure

  1. In the SDL Suite, open the SDL model. Mark the System level rectangle.
  2. From the main menu select Generate > Make.
  3. Select the CAdvanced Code Generator configuration.
  4. Select the Generate environment header file check box.
  5. Activate the "Make" to generate the model C file (modelname.c) and environment header file (modelname.ifc).
  6. Select SDLAccess Code Generator configuration and activate the Full Make to generate the model SDL_Access file (modelname.sac).
  7. Open Rational Rhapsody and choose File > New.
  8. Select the SDL_Suite for the project Type.
  9. Create a new block/class and select the SDLSystem class stereotype.
  10. Right-click this block and select Import/Sync SDL Model.
  11. Enter the locations of the SDL model files you created previously, as shown in the following example:
    Import/Sync SDL Model window showing locations of SDL model files.
  12. Click Import/Sync.
  13. To connect theRational Rhapsody block to an SDLSystem, create a user class with behavior ports and a statechart. The statechart controls the user class' sending and receiving of events to and from the SDLSystem.
  14. Create objects from the SDLSystem and the Rational Rhapsody block and connect their ports through links using the interfaces that where created by the import.
  15. To create an .exe file, perform a code generation and build on the entire model. Code generation scope must contain only one SDLSystem.

Results

Note: Since the SDLSystem is imported as a "black box," no animation is provided with this block. There is an option to view the behavior of the SDLSystem as a wrapper through a sequence diagram by checking the AnimateSDLSystemBehavior property, located in the Model::Profile property group.

Feedback