Difference between revisions of "The XML configuration file"

From NAMIC Wiki
Jump to: navigation, search
 
 
(20 intermediate revisions by 2 users 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.
+
NaviTrack uses an XML file to configure its operations and data flow. In this tutorial, we need two xml files: one for sending data out and one for receiving:
  
== SPLOT configuration file ==
+
== Configuration file for sending data ==
  
  <?xml version="1.0" encoding="UTF-8"?>
+
<?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE OpenTracker SYSTEM "../data/splot.dtd">
+
<OpenTracker>
 
+
    <configuration>
  <OpenTracker>
+
        <ConsoleConfig interval="10" headerline="NaviTrack Sending" display="on">
  <configuration>
+
        </ConsoleConfig>
      <NDIConfig device="/dev/ttyUSB0"/>
+
    </configuration>
  <ConsoleConfig interval="10" headerline="Aurora Test" display="on"/>
+
    <ConsoleSink>
  </configuration>
+
        <NetworkSink mode="unicast" name="dummy" number="1" port="54321">
  <ConsoleSink>
+
            <ConsoleSource number="1"/>
  <NetworkSink mode="unicast" name="station name" number="1" port="54321">
+
        </NetworkSink>
  <AuroraSource toolID="Traxtal Tech00035330003"/>
+
    </ConsoleSink>
  </NetworkSink>
+
</OpenTracker>
  </ConsoleSink>
+
 
  </OpenTracker>
+
Download this file here: [[Media:Send.txt | Send.txt]].
  
== Slicer configuration file ==
+
== Configuration file for receiving data ==
  
  <?xml version="1.0" encoding="UTF-8"?>
+
<?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE OpenTracker SYSTEM "your-path/opentracker.dtd">
+
<OpenTracker>
 
 
  <OpenTracker>
 
 
     <configuration>
 
     <configuration>
   
+
        <ConsoleConfig interval="10" headerline="NaviTrack Receiving" display="on"/>
 
     </configuration>
 
     </configuration>
      
+
     <ConsoleSink>
     <Callback name="cb1">
+
     <FileSink file="./file-out.txt">
    <NetworkSource mode="unicast" number="1" address="localhost" port="54321"/>
+
        <NetworkSource mode="unicast" number="1" address="localhost" port="54321"/>
     </Callback>
+
     </FileSink>
      
+
     </ConsoleSink>
  </OpenTracker>
+
</OpenTracker>
 +
 
 +
Download this file here: [[Media:Receive.txt | Receive.txt]].

Latest revision as of 15:13, 15 May 2007

Home < The XML configuration file

NaviTrack uses an XML file to configure its operations and data flow. In this tutorial, we need two xml files: one for sending data out and one for receiving:

Configuration file for sending data

<?xml version="1.0" encoding="UTF-8"?>
<OpenTracker>
   <configuration>
       <ConsoleConfig interval="10" headerline="NaviTrack Sending" display="on">
       </ConsoleConfig>
   </configuration>
   <ConsoleSink>
       <NetworkSink mode="unicast" name="dummy" number="1" port="54321">
           <ConsoleSource number="1"/>
       </NetworkSink>
   </ConsoleSink>
</OpenTracker>

Download this file here: Send.txt.

Configuration file for receiving data

<?xml version="1.0" encoding="UTF-8"?>
<OpenTracker>
   <configuration>
       <ConsoleConfig interval="10" headerline="NaviTrack Receiving" display="on"/>
   </configuration>
   <ConsoleSink>
   <FileSink file="./file-out.txt">
       <NetworkSource mode="unicast" number="1" address="localhost" port="54321"/>
   </FileSink>
   </ConsoleSink>
</OpenTracker>

Download this file here: Receive.txt.