Difference between revisions of "Testing your application"

From NAMIC Wiki
Jump to: navigation, search
 
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
There are two configuration (xml) files. One is used to run the splot server and the other is used to configure the IGT Demo module in Slicer, which receives tracking data from the splot server by network.
+
Here comes the point you want to test how your application works. At this moment, we're not going to use any real tracking device; instead, we will use ConsoleSource, a built-in module in NaviTrack, to simulate the generation of tracking data.
  
== SPLOT configuration file ==
+
== Testing procedure ==
 +
* '''Make sure your LD_LIBRARY_PATH (Linux) or PATH (Windows) contains the absolute path for NaviTrack library (libNaviTrack.so on Linux, and NaviTrack.dll on Windows)'''
 +
* Download the config files in the previous page: '''Send.txt''' and '''Receive.txt''' (you can rename them as xml files but it's not necessary)
 +
* On your computer, create two shell terminals (Linux) or command prompts (Windows)
 +
* In both windows, change directory ('''cd''') to your NaviTrack-build directory
 +
* In one window, run this:
 +
'''./middleware Send.txt'''
 +
and then press 1
 +
* In the other window, run this command:
 +
'''./middleware Receive.txt'''
 +
and then press 1
 +
* Have the input focus for the window running the sending process. Press some keys on the keyboard (see next section) to generate simulated tracking data.
 +
** You should see the data update in the other window (the receiving side)
 +
** All received data will be also saved into a file named '''file-out.txt''' in the same directory where you run your application
  
  <?xml version="1.0" encoding="UTF-8"?>
+
== How to use ConsoleSource ==
  <!DOCTYPE OpenTracker SYSTEM "../data/splot.dtd">
 
 
 
  <OpenTracker>
 
  <configuration>
 
      <NDIConfig device="/dev/ttyUSB0"/>
 
  <ConsoleConfig interval="10" headerline="Aurora Test" display="on"/>
 
  </configuration>
 
  <ConsoleSink>
 
  <NetworkSink mode="unicast" name="station name" number="1" port="54321">
 
  <AuroraSource toolID="Traxtal Tech00035330003"/>
 
  </NetworkSink>
 
  </ConsoleSink>
 
  </OpenTracker>
 
  
== Slicer configuration file ==
+
On page 33 of this pdf file: <br>
 
+
http://studierstube.icg.tu-graz.ac.at/opentracker/html/howto_opentracker.pdf
  <?xml version="1.0" encoding="UTF-8"?>
+
you will find all possible functions and their default keys on your keyboard for using '''ConsoleSource'''.
  <!DOCTYPE OpenTracker SYSTEM "your-path/opentracker.dtd">
 
 
 
  <OpenTracker>
 
    <configuration>
 
   
 
    </configuration>
 
   
 
    <Callback name="cb1">
 
    <NetworkSource mode="unicast" number="1" address="localhost" port="54321"/>
 
    </Callback>
 
   
 
  </OpenTracker>
 

Latest revision as of 14:09, 18 May 2007

Home < Testing your application

Here comes the point you want to test how your application works. At this moment, we're not going to use any real tracking device; instead, we will use ConsoleSource, a built-in module in NaviTrack, to simulate the generation of tracking data.

Testing procedure

  • Make sure your LD_LIBRARY_PATH (Linux) or PATH (Windows) contains the absolute path for NaviTrack library (libNaviTrack.so on Linux, and NaviTrack.dll on Windows)
  • Download the config files in the previous page: Send.txt and Receive.txt (you can rename them as xml files but it's not necessary)
  • On your computer, create two shell terminals (Linux) or command prompts (Windows)
  • In both windows, change directory (cd) to your NaviTrack-build directory
  • In one window, run this:
./middleware Send.txt
and then press 1
  • In the other window, run this command:
./middleware Receive.txt
and then press 1
  • Have the input focus for the window running the sending process. Press some keys on the keyboard (see next section) to generate simulated tracking data.
    • You should see the data update in the other window (the receiving side)
    • All received data will be also saved into a file named file-out.txt in the same directory where you run your application

How to use ConsoleSource

On page 33 of this pdf file:
http://studierstube.icg.tu-graz.ac.at/opentracker/html/howto_opentracker.pdf you will find all possible functions and their default keys on your keyboard for using ConsoleSource.