CommonHeaderTracer Class Reference

#include <headertracer.h>

Inheritance diagram for CommonHeaderTracer:

Inheritance graph
[legend]
Collaboration diagram for CommonHeaderTracer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CommonHeaderTracer ()
void format (Packet *p, SAP *sap)

Detailed Description

The CommonHeaderTracer is born for tracing the common header of a Packet, which is present in all packets because it contains: The class extend Tracer, but it is compiled and linked in another library. Thus, users which want to change the output format of the trace file can write a new class and plug their library in the simulation (instead this). When the library are loaded a CommonHeaderTracer are instanced and is plugged to the PktTracer by invoking the Sap addTracer static method.

See also:
Tracer, PktTracer, SAP, format

Definition at line 58 of file headertracer.h.


Constructor & Destructor Documentation

CommonHeaderTracer::CommonHeaderTracer (  ) 

The class constructor initialize the level to 1. This means that it will be the first Tracer which will process the incoming packets

See also:
Tracer

Definition at line 42 of file headertracer.cc.


Member Function Documentation

void CommonHeaderTracer::format ( Packet *  p,
SAP sap 
) [virtual]

This method writes a string in the trace file with the following format:

UID TYPE SIZE DIRECTION

where

Parameters:
p pointer to the packet to be traced
sap pointer to the SAP instance which ask for the trace

Implements Tracer.

Definition at line 44 of file headertracer.cc.

References Tracer::writeTrace().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Wed Nov 26 15:48:29 2008 for NS-MIRACLE library by  doxygen 1.5.2