Interactive Test Program(ITP)

  1. What is ITP?
  2. Why do we need it?
  3. How does ITP work?
  4. ITP client API.
  5. Build process (and source location).
  6. Source Code Highlights
  7. Who to contact for help?
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:
  • Allows remote execution of federates (not integrated yet, available as a separate module)
  • Complements DMSO tools
  • Provides a centralized debugging environment
  • Acts as a Message dump utility
  • Provides Filtering capability
  • Does Scripting and replay
 
2.    Why do we need it?
There are many reasons why we chose to develope this product.
  • ITP can run either with or without RTI.  As a result, it will be able to debug federates even before RTI starts and/or after RTI resigns.
  • The remote execution server allows a single user to start multiple federates on multiple machines.
  • ITP provides scripting/replay capability which allows a test sequence to be recorded and played back to gather large amount of information for regression tests.
  • All trace/debug messages can be filtered by the tester to tailor the display to user's needs
  • All trace/debug messages are sent through TCP/IP connections to avoid overloading the RTI bus
  • Easy client side API requires fews lines of additional code to integrate ITP functionality into the clients(federates).
  
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.

itp.JPG (30288 bytes)

 

  
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

dlee@cs.cmu.edu