About this task
To
test the new adapter:
Procedure
- 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.
- 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.
- 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.
- 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.
- When the Hello World application runs successfully,
make your application more complex. For example:
- Create some active objects.
- Create statecharts for some objects.
- Use timeouts in the statecharts.
- Send messages and events between
objects
and active objects.
- Use
protection by guarding operations
and attributes.
- Change
the instrumentation to tracing.
- 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.