The Source Code Insertion (SCI) technology used for Test RealTime is designed to minimize overhead. The instrumented code stores information in memory (except for the Runtime Tracing feature) and dumps this SCI data when the program terminates. To use this technique, you must add a call to a dumping function in your source code:
extern "C" _atl_obstools_dump(int);
...
_atl_obstools_dump(1);
In some cases, such as in embedded applications, it is not practical to dump traces upon exit. See Generating Trace Dumps for more information.
To connect the SCI data dump to the Rose RealTime Stop button:
Add the following code to the cmdCommand.cc file.
At the beginning of the file:
#include <RTDebugger.h>
#include <RTMemoryUtil.h>
#include <RTObserver.h>
#include <RTTcpSocket.h>
#include <stdio.h>
extern "C" _atl_obstools_dump(int);
In the RTObserver::cmdCommand method:
else if( 0 == RTMemoryUtil::strcmp( commandString, "stop" ) )
{
_atl_obstools_dump(1);
printf("TestRT dump\n");
haltByProbe = 0;
resumeToRun = 0;
debugger->step( 0U );
}
Re-compile this file and add the cmdCommand.obj to the Additional Object Files section of the model's Component Specification window
Note For
Visual C 6.0 and .NET, such an object file is already provided in:
<install dir>\bin\intel\RoseRT\cvisual6
or cvisual7
where <install dir> is the
Test RealTime installation directory.
By default, when executing the model, press the Rose RealTime Stop button to ensure that trace information is uploaded.
Any other code point could be used to dump the traces, as long as the chosen code point is linked to a specific event—a particular message or an external event—in order to force the dump.
Related Topics
Generating Trace Dumps | Working with Rational Rose RealTime | Using the Product with Rose RealTime