Interactive Test Program(ITP)
| 1. What is ITP? | ||
ITP stands for Interactive Test Program. It is a debug utility that
interactively communicates with federates (or processes in general) in a distributed environment through TCP/IP sockets (in addition to RTI messages).
It receives trace/debug messages from various federates and sends commands back to
control the message categories to be received. It offers many advantages over conventional debugging
methods:
|
||
| 2. Why do we need it? | ||
There are many reasons why we chose to develope this product.
|
||
| 3. How does ITP work? | ||
| ITP has 2 parts, RTI components and TCP/IP component. The RTI
component is provide by the DMSO tool testFederateNT. It executes almost all HLA commands to allow users
to simulate a federate and all its required functionality. The second part is the
TCP/IP component. This required the client side(federates) to include the client
class provided. The ITP server (integrated into the testFederateNT) listens for connections from the client and
send/receives message to/from clients.
|
||
| 4. ITP client API. | ||
| In order to take advantage of the ITP's robustness, the federate
has to include the client api. A sample project of the usage can be found under
Wright/architecture/src/itp.clnt (zipped format) in CVS. The client class is called CITPClnt. Example: #include "ITPClnt.h" CITPClnt myclient; struct TraceMsgType msg; msg.type=CERROR; sprintf(msg.content, "This is an error message that will be send to the
server"); myclient.sendMessage(&msg); Incorporating the ITP functionality is as simple as instantiating a ITPClnt class and a struct. Below is a list of ITP client functions: void ITP_ASSERT(boolean expression, "error message"); void sendMessage(struct TraceMsgeType *); void sendMessage(int MessageCategoryCode, char * Message); |
||
| 5. Build Process (and source location) | ||
| 0. make sure that RTI is installed and the environment is set correctly
1. cvs checkout Wright/architecture/src/itp.clnt/ITP.lean.zip 2. unzip the archive into some directory, say DIR 3. open the project workspace file DIR/architecture/ITP.demo/ITP.tester/UITester.dsw with Microsoft Visual C++ v6.0 4. make sure that multithreading is enabled and w2_32.lib is included for the project 5. Press F7 to build the executable DIR/architecture/ITP.demo/ITP.tester/bin/win32/UITester.exe 6. open the project workspace file DIR/architecture/ITP.demo/ITP.new/UInew.dsw with Microsoft Visual C++ v6.0 7. Press F7 to build the executable DIR/architecture/ITP.demo/ITP.new/Debug/UI_new.exe 8. Run RTI, start UITester.exe. 9. Run UI_new.exe after the UTTester joined the federate execution. |
||
| 6. Source Code Highlights | ||
| a. ITPcommon.h ITPcommon.cpp : contains message structures that are used both by client and server.
b. ClntInfo.h ClntInfo.cpp : bookkeeping structure for current clients (use by ITPSrvr class). c. ITPClnt.h ITPClnt.cpp : defines ITP client class. d. ITPSrvr.h ITPSrvr.cpp : defines ITP server class. |
||
| 7. Who do I contact for help? | ||
| wcl@cyrus.andrew.cmu.edu | ||