next up previous contents index
Next: 16.2.6 Error models Up: 16.2 Using the satellite Previous: 16.2.4 Routing

   
16.2.5 Trace support

Tracefiles using satellite nodes and links are very similar to conventional  tracing described in Chapter 21. Special SatTrace objects (class SatTrace derives from class Trace) are used to log the geographic latitude and longitude of the node logging the trace (in the case of a satellite node, the latitude and longitude correspond to the nadir point of the satellite).

For example, a packet on a link from node 66 to node 26 might normally be logged as:

+ 1.0000 66 26 cbr 210 ------- 0 66.0 67.0 0 0
but in the satellite simulation, the position information is appended:
+ 1.0000 66 26 cbr 210 ------- 0 66.0 67.0 0 0 37.90 -122.30 48.90 -120.94
In this case, node 66 is at latitude 37.90 degrees, longitude -122.30 degrees, while node 26 is a LEO satellite whose subsatellite point is at 48.90 degrees latitude, -120.94 degrees longitude (negative latitude corresponds to south, while negative longitude corresponds to west).

One addition is the Class Trace/Sat/Error, which traces any packets that are errored by an error model. The error trace logs packets dropped due to errors as follows, for example:

e 1.2404 12 13 cbr 210 ------- 0 12.0 13.0 0 0 -0.00 10.20 -0.00 -10.00

To enable tracing of all satellite links in the simulator, use the following commands before instantiating nodes and links:

set f [open out.tr w]
$ns trace-all $f
Then use the following line after all node and link creation (and all error model insertion, if any) to enable tracing of all satellite links:
$ns trace-all-satlinks $f
Specifically, this will put tracing around the link layer queues in all satellite links, and will put a receive trace between the mac and the link layer for received packets. To enable tracing only on a specific link on a specific node, one may use the command:
$node trace-inlink-queue $f $i
$node trace-outlink-queue $f $i
where i is the index of the interface to be traced.

The implementations of the satellite trace objects can be found in tcl/lib/ns-sat.tcl and sattrace.{cc,h}.


next up previous contents index
Next: 16.2.6 Error models Up: 16.2 Using the satellite Previous: 16.2.4 Routing

2000-08-24