Question & Answer
Question
How do you convert an OXF-based project to an SXF-based project with IBM Rational Rhapsody
Cause
You have created a project but have realized that the SXF (Simplified Execution Framework) will better accommodate your requirement than the default OXF (Object Execution Framework).
Answer
If it is not possible to start with a blank project, it should be possible to convert an existing project. However, you will receive many compiler errors as you are switching from a fully featured
framework to the limited feature set of the Simplified Execution Framework. Please see the Rhapsody documentation for a comparison of the OXF and SXF features.
The time required to convert the project and resolve code generation issues and compiler/linker errors will depend on the size and complexity of your project. You may conclude it is not worth the time to convert a large project.
There is no official workflow, but these are the basic steps and considerations to follow:
- Add the required SXF project settings. You can use File menu > Add
Profile to Model. Go back one directory and open the Settings >
SafetyCritical > SafetyCriticalForC++Developers.sbs file.
This should add three settings at the bottom of your project browser:
SafetyCriticalForC++Developers, SXFC++ and MISRAC++.
- Set the SXF stereotype on the configuration you want to use with the
SXF. You can do this by double-clicking the configuration in the browser
and going to the general tab.
- Make sure the component/configuration is selected in the toolbar and
rebuild the SXF framework (Code menu > Build Framework).
This should result in a new library with the suffix *sxf.lib. The prefix will depend on the environment you have selected in the configuration settings. You only need to do this once. For example, this is the resulting library built for use with the Microsoft Visual Studio 2015 (MSVC14):
- Now you will need to refactor your project to remove any OXF features that are not supported by the SXF. This is trickier. However, there are
some obvious limitations that can be addressed immediately:
- Disable animation in the configuration settings.
- Remove references to the OMContainers API by switching CPP_CG::Containers::ContainerSet to "STLContainer"
- Removing any ports and interfaces and replacing them with suitable alternatives. This is the most complex task and it's complexity will differ greatly depending on your project design.
- ...further semantic issues are undocumented. You should be aware of potential dynamic memory issues if they were used with your existing project. Memory management is not be available in the SXF.
model provided with Rhapsody. This will give you an idea of the size of the task. This sample project is located in the Samples/CPPSamples directory of the Rhapsody installation.
Product Synonym
Rational Rhapsody
Was this topic helpful?
Document Information
Modified date:
27 May 2022
UID
swg22000817