Validating the new adapter

About this task

To test the new adapter:

Procedure

  1. Try building a simple "Hello World" using IBM® Rational® Rhapsody® and your new adapter. In Rational Rhapsody, create a class that prints the string "Hello World" when the class is instantiated. When you generate code, be sure to select your new environment in the configuration settings.
  2. Try building the application. This action immediately finds problems in your adapter, because building the application requires the use of the generated makefile. To see the generated makefile, right-click on the configuration in Rational Rhapsody and select Edit Makefile. You might need to adjust the properties to get the correct generated makefile for your application.
  3. When you have successfully built the Hello World application, make your application more complex by adding more classes, putting in include paths, and specifying some libraries to link in. This method continues to test the properties you defined in Creating properties for a new RTOS.
  4. You must test the framework part of the adapter (see Modifying the framework) by running the Hello World example. If it does not run correctly, you might not have implemented the framework classes correctly.

    For example, Rational Rhapsody creates a main thread for all applications. Check to make sure that this thread was created correctly for your particular environment.
    Note: For this step, it is best to use your native compiler.
  5. When the Hello World application runs successfully, make your application more complex. For example:
    1. Create some active objects.
    2. Create statecharts for some objects.
    3. Use timeouts in the statecharts.
    4. Send messages and events between objects and active objects.
    5. Use protection by guarding operations and attributes.
    6. Change the instrumentation to tracing.
    7. Change the instrumentation to animation.

Results

By implementing an application that tests for this functionality, you validate a major portion of the adapter. To complete the validation, copy the RTOS Adapter Test Suite from your Rational Rhapsody installation directory\Share\LangCpp\Validation. This test suite consists of several models that cover most of the scenarios needed to test an RTOS adapter.


Feedback