checkpoint

This commit is contained in:
Craig Dowell
2010-01-22 12:44:53 -08:00
parent 699ade6453
commit a58a79f06e
53 changed files with 1120 additions and 762 deletions

View File

@@ -381,20 +381,21 @@ main (int argc, char *argv[])
///////////////////////////////////////////////////////////////////////////
NS_LOG_INFO ("Configure Tracing.");
std::ofstream ascii;
if (enableTracing == true)
{
//
// Let's set up some ns-2-like ascii traces, using another helper class
//
ascii.open ("mixed-wireless.tr");
YansWifiPhyHelper::EnableAsciiAll (ascii);
CsmaHelper::EnableAsciiAll (ascii);
InternetStackHelper::EnableAsciiAll (ascii);
CsmaHelper csma;
//
// Let's set up some ns-2-like ascii traces, using another helper class
//
AsciiTraceHelper ascii;
Ptr<OutputStreamObject> stream = ascii.CreateFileStream ("mixed-wireless.tr");
wifiPhy.EnableAsciiAll (stream);
csma.EnableAsciiAll (stream);
internet.EnableAsciiAll (stream);
// Let's do a pcap trace on the application source and sink, ifIndex 0
// Csma captures in non-promiscuous mode
CsmaHelper csma;
#if 0
csma.EnablePcap ("mixed-wireless", appSource->GetId (), 0, false);
#else

View File

@@ -493,9 +493,8 @@ Experiment::Run (const WifiHelper &wifi, const YansWifiPhyHelper &wifiPhy,
if (enableTracing)
{
std::ofstream ascii;
ascii.open ((GetOutputFileName() + ".tr").c_str());
phy.EnableAsciiAll (ascii);
AsciiTraceHelper ascii;
phy.EnableAsciiAll (ascii.CreateFileStream (GetOutputFileName() + ".tr"));
}
Ptr<FlowMonitor> flowmon;

View File

@@ -216,10 +216,10 @@ int main (int argc, char *argv[])
if (tracing == true)
{
AsciiTraceHelper ascii;
wifiPhy.EnableAsciiAll (ascii.CreateFileStream ("wifi-simple-adhoc-grid.tr"));
wifiPhy.EnablePcap ("wifi-simple-adhoc-grid", devices);
std::ofstream ascii;
ascii.open ("wifi-simple-adhoc-grid.tr");
YansWifiPhyHelper::EnableAsciiAll (ascii);
// To do-- enable an IP-level trace that shows forwarding events only
}