--- a/examples/energy/energy-model-example.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/energy/energy-model-example.cc Sat Mar 05 11:47:37 2011 -0800
@@ -20,7 +20,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/mobility-module.h"
#include "ns3/contrib-module.h"
#include "ns3/wifi-module.h"
--- a/examples/error-model/simple-error-model.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/error-model/simple-error-model.cc Sat Mar 05 11:47:37 2011 -0800
@@ -37,7 +37,6 @@
#include <fstream>
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"
--- a/examples/ipv6/fragmentation-ipv6.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/ipv6/fragmentation-ipv6.cc Sat Mar 05 11:47:37 2011 -0800
@@ -31,7 +31,6 @@
#include <fstream>
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
#include "ns3/ipv6-static-routing-helper.h"
--- a/examples/ipv6/icmpv6-redirect.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/ipv6/icmpv6-redirect.cc Sat Mar 05 11:47:37 2011 -0800
@@ -43,7 +43,6 @@
#include <fstream>
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
#include "ns3/ipv6-static-routing-helper.h"
--- a/examples/ipv6/loose-routing-ipv6.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/ipv6/loose-routing-ipv6.cc Sat Mar 05 11:47:37 2011 -0800
@@ -41,7 +41,6 @@
#include <fstream>
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
#include "ns3/ipv6-header.h"
--- a/examples/ipv6/ping6.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/ipv6/ping6.cc Sat Mar 05 11:47:37 2011 -0800
@@ -32,7 +32,6 @@
#include <fstream>
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
--- a/examples/ipv6/radvd-two-prefix.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/ipv6/radvd-two-prefix.cc Sat Mar 05 11:47:37 2011 -0800
@@ -35,7 +35,6 @@
#include <fstream>
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
--- a/examples/ipv6/radvd.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/ipv6/radvd.cc Sat Mar 05 11:47:37 2011 -0800
@@ -34,7 +34,6 @@
#include <fstream>
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
--- a/examples/matrix-topology/matrix-topology.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/matrix-topology/matrix-topology.cc Sat Mar 05 11:47:37 2011 -0800
@@ -50,7 +50,6 @@
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/global-route-manager.h"
#include "ns3/mobility-module.h"
--- a/examples/mobility/ns2-mobility-trace.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/mobility/ns2-mobility-trace.cc Sat Mar 05 11:47:37 2011 -0800
@@ -56,7 +56,6 @@
#include "ns3/core-module.h"
#include "ns3/mobility-module.h"
-#include "ns3/helper-module.h"
#include "ns3/mobility-module.h"
#include "ns3/ns2-mobility-helper.h"
--- a/examples/mpi/nms-p2p-nix-distributed.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/mpi/nms-p2p-nix-distributed.cc Sat Mar 05 11:47:37 2011 -0800
@@ -41,7 +41,6 @@
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/onoff-application.h"
#include "ns3/packet-sink.h"
#include "ns3/point-to-point-net-device.h"
--- a/examples/mpi/simple-distributed.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/mpi/simple-distributed.cc Sat Mar 05 11:47:37 2011 -0800
@@ -43,7 +43,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/mpi-interface.h"
#include "ns3/ipv4-global-routing-helper.h"
#include "ns3/ipv4-static-routing-helper.h"
--- a/examples/mpi/third-distributed.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/mpi/third-distributed.cc Sat Mar 05 11:47:37 2011 -0800
@@ -16,7 +16,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/wifi-module.h"
#include "ns3/mobility-module.h"
#include "ns3/mpi-interface.h"
--- a/examples/naming/object-names.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/naming/object-names.cc Sat Mar 05 11:47:37 2011 -0800
@@ -23,7 +23,6 @@
//
#include "ns3/core-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
--- a/examples/realtime/realtime-udp-echo.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/realtime/realtime-udp-echo.cc Sat Mar 05 11:47:37 2011 -0800
@@ -27,7 +27,6 @@
#include <fstream>
#include "ns3/core-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
--- a/examples/routing/dynamic-global-routing.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/routing/dynamic-global-routing.cc Sat Mar 05 11:47:37 2011 -0800
@@ -69,7 +69,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
--- a/examples/routing/global-injection-slash32.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/routing/global-injection-slash32.cc Sat Mar 05 11:47:37 2011 -0800
@@ -29,7 +29,6 @@
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/ipv4-static-routing.h"
#include "ns3/ipv4-global-routing.h"
--- a/examples/routing/global-routing-slash32.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/routing/global-routing-slash32.cc Sat Mar 05 11:47:37 2011 -0800
@@ -29,7 +29,6 @@
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/ipv4-global-routing-helper.h"
--- a/examples/routing/mixed-global-routing.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/routing/mixed-global-routing.cc Sat Mar 05 11:47:37 2011 -0800
@@ -39,7 +39,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/point-to-point-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
#include "ns3/ipv4-global-routing-helper.h"
--- a/examples/routing/simple-alternate-routing.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/routing/simple-alternate-routing.cc Sat Mar 05 11:47:37 2011 -0800
@@ -41,7 +41,6 @@
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/ipv4-global-routing-helper.h"
--- a/examples/routing/simple-global-routing.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/routing/simple-global-routing.cc Sat Mar 05 11:47:37 2011 -0800
@@ -43,7 +43,6 @@
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/flow-monitor-helper.h"
#include "ns3/ipv4-global-routing-helper.h"
--- a/examples/routing/simple-routing-ping6.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/routing/simple-routing-ping6.cc Sat Mar 05 11:47:37 2011 -0800
@@ -31,7 +31,6 @@
#include <fstream>
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
#include "ns3/ipv6-static-routing-helper.h"
--- a/examples/routing/static-routing-slash32.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/routing/static-routing-slash32.cc Sat Mar 05 11:47:37 2011 -0800
@@ -29,7 +29,6 @@
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/csma-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/ipv4-static-routing-helper.h"
--- a/examples/socket/socket-bound-static-routing.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/socket/socket-bound-static-routing.cc Sat Mar 05 11:47:37 2011 -0800
@@ -39,7 +39,6 @@
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
-#include "ns3/helper-module.h"
#include "ns3/ipv4-static-routing-helper.h"
#include "ns3/ipv4-list-routing-helper.h"
--- a/examples/socket/socket-bound-tcp-static-routing.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/socket/socket-bound-tcp-static-routing.cc Sat Mar 05 11:47:37 2011 -0800
@@ -39,7 +39,6 @@
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/ipv4-static-routing-helper.h"
#include "ns3/ipv4-list-routing-helper.h"
--- a/examples/stats/wifi-example-sim.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/stats/wifi-example-sim.cc Sat Mar 05 11:47:37 2011 -0800
@@ -38,7 +38,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/mobility-module.h"
#include "ns3/wifi-module.h"
#include "ns3/internet-module.h"
--- a/examples/tcp/tcp-bulk-send.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/tcp/tcp-bulk-send.cc Sat Mar 05 11:47:37 2011 -0800
@@ -27,7 +27,6 @@
#include <string>
#include <fstream>
#include "ns3/core-module.h"
-#include "ns3/helper-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/internet-module.h"
#include "ns3/applications-module.h"
--- a/examples/tcp/tcp-large-transfer.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/tcp/tcp-large-transfer.cc Sat Mar 05 11:47:37 2011 -0800
@@ -37,7 +37,6 @@
#include <cassert>
#include "ns3/core-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
--- a/examples/tcp/tcp-nsc-lfn.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/tcp/tcp-nsc-lfn.cc Sat Mar 05 11:47:37 2011 -0800
@@ -34,7 +34,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"
--- a/examples/tcp/tcp-nsc-zoo.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/tcp/tcp-nsc-zoo.cc Sat Mar 05 11:47:37 2011 -0800
@@ -31,7 +31,6 @@
#include <string>
#include "ns3/core-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/network-module.h"
#include "ns3/csma-module.h"
--- a/examples/tcp/tcp-star-server.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/tcp/tcp-star-server.cc Sat Mar 05 11:47:37 2011 -0800
@@ -50,7 +50,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"
--- a/examples/tutorial/fifth.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/tutorial/fifth.cc Sat Mar 05 11:47:37 2011 -0800
@@ -18,7 +18,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
-#include "ns3/helper-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"
--- a/examples/tutorial/first.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/tutorial/first.cc Sat Mar 05 11:47:37 2011 -0800
@@ -18,7 +18,6 @@
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
using namespace ns3;
--- a/examples/tutorial/second.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/tutorial/second.cc Sat Mar 05 11:47:37 2011 -0800
@@ -16,7 +16,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
--- a/examples/tutorial/sixth.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/tutorial/sixth.cc Sat Mar 05 11:47:37 2011 -0800
@@ -18,7 +18,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
-#include "ns3/helper-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"
--- a/examples/tutorial/third.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/tutorial/third.cc Sat Mar 05 11:47:37 2011 -0800
@@ -17,7 +17,6 @@
#include "ns3/core-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/wifi-module.h"
#include "ns3/mobility-module.h"
--- a/examples/udp-client-server/udp-client-server.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/udp-client-server/udp-client-server.cc Sat Mar 05 11:47:37 2011 -0800
@@ -26,7 +26,6 @@
#include <fstream>
#include "ns3/core-module.h"
#include "ns3/core-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
--- a/examples/udp-client-server/udp-trace-client-server.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/udp-client-server/udp-trace-client-server.cc Sat Mar 05 11:47:37 2011 -0800
@@ -25,7 +25,6 @@
#include <fstream>
#include "ns3/core-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
--- a/examples/udp/udp-echo.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/udp/udp-echo.cc Sat Mar 05 11:47:37 2011 -0800
@@ -27,7 +27,6 @@
#include <fstream>
#include "ns3/core-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
--- a/examples/wireless/mixed-wireless.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/wireless/mixed-wireless.cc Sat Mar 05 11:47:37 2011 -0800
@@ -62,7 +62,6 @@
#include <string>
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/contrib-module.h"
--- a/examples/wireless/multirate.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/wireless/multirate.cc Sat Mar 05 11:47:37 2011 -0800
@@ -50,7 +50,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/contrib-module.h"
--- a/examples/wireless/simple-wifi-frame-aggregation.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/wireless/simple-wifi-frame-aggregation.cc Sat Mar 05 11:47:37 2011 -0800
@@ -19,7 +19,6 @@
*/
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/wifi-module.h"
#include "ns3/mobility-module.h"
--- a/examples/wireless/wifi-adhoc.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/wireless/wifi-adhoc.cc Sat Mar 05 11:47:37 2011 -0800
@@ -20,7 +20,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/contrib-module.h"
--- a/examples/wireless/wifi-ap.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/wireless/wifi-ap.cc Sat Mar 05 11:47:37 2011 -0800
@@ -21,7 +21,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/contrib-module.h"
--- a/examples/wireless/wifi-blockack.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/wireless/wifi-blockack.cc Sat Mar 05 11:47:37 2011 -0800
@@ -42,7 +42,6 @@
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/wifi-module.h"
#include "ns3/mobility-module.h"
--- a/examples/wireless/wifi-clear-channel-cmu.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/wireless/wifi-clear-channel-cmu.cc Sat Mar 05 11:47:37 2011 -0800
@@ -20,7 +20,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/mobility-module.h"
#include "ns3/contrib-module.h"
#include "ns3/wifi-module.h"
--- a/examples/wireless/wifi-hidden-terminal.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/wireless/wifi-hidden-terminal.cc Sat Mar 05 11:47:37 2011 -0800
@@ -32,7 +32,6 @@
#include "ns3/core-module.h"
#include "ns3/propagation-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/internet-module.h"
--- a/examples/wireless/wifi-simple-adhoc-grid.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/wireless/wifi-simple-adhoc-grid.cc Sat Mar 05 11:47:37 2011 -0800
@@ -71,7 +71,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/mobility-module.h"
#include "ns3/contrib-module.h"
#include "ns3/wifi-module.h"
--- a/examples/wireless/wifi-simple-adhoc.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/wireless/wifi-simple-adhoc.cc Sat Mar 05 11:47:37 2011 -0800
@@ -53,7 +53,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/mobility-module.h"
#include "ns3/contrib-module.h"
#include "ns3/wifi-module.h"
--- a/examples/wireless/wifi-simple-infra.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/wireless/wifi-simple-infra.cc Sat Mar 05 11:47:37 2011 -0800
@@ -54,7 +54,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/mobility-module.h"
#include "ns3/contrib-module.h"
#include "ns3/wifi-module.h"
--- a/examples/wireless/wifi-simple-interference.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/wireless/wifi-simple-interference.cc Sat Mar 05 11:47:37 2011 -0800
@@ -82,7 +82,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/mobility-module.h"
#include "ns3/contrib-module.h"
#include "ns3/wifi-module.h"
--- a/examples/wireless/wifi-wired-bridging.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/wireless/wifi-wired-bridging.cc Sat Mar 05 11:47:37 2011 -0800
@@ -45,7 +45,6 @@
#include "ns3/core-module.h"
#include "ns3/mobility-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/wifi-module.h"
#include "ns3/network-module.h"
--- a/examples/wireless/wscript Sat Mar 05 10:51:26 2011 -0800
+++ b/examples/wireless/wscript Sat Mar 05 11:47:37 2011 -0800
@@ -14,7 +14,7 @@
obj = bld.create_ns3_program('wifi-ap', ['core', 'mobility', 'wifi'])
obj.source = 'wifi-ap.cc'
- obj = bld.create_ns3_program('wifi-wired-bridging', ['core', 'mobility', 'wifi', 'csma', 'helper', 'bridge'])
+ obj = bld.create_ns3_program('wifi-wired-bridging', ['core', 'mobility', 'wifi', 'csma', 'bridge'])
obj.source = 'wifi-wired-bridging.cc'
obj = bld.create_ns3_program('simple-wifi-frame-aggregation', ['core', 'mobility', 'wifi'])
--- a/samples/main-random-topology.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/samples/main-random-topology.cc Sat Mar 05 11:47:37 2011 -0800
@@ -2,7 +2,6 @@
#include "ns3/core-module.h"
#include "ns3/mobility-module.h"
-#include "ns3/helper-module.h"
using namespace ns3;
--- a/samples/main-random-walk.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/samples/main-random-walk.cc Sat Mar 05 11:47:37 2011 -0800
@@ -1,7 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
#include "ns3/core-module.h"
-#include "ns3/helper-module.h"
#include "ns3/mobility-module.h"
using namespace ns3;
--- a/samples/main-simple.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/samples/main-simple.cc Sat Mar 05 11:47:37 2011 -0800
@@ -1,7 +1,6 @@
#include <iostream>
#include "ns3/core-module.h"
-#include "ns3/helper-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
--- a/samples/wscript Sat Mar 05 10:51:26 2011 -0800
+++ b/samples/wscript Sat Mar 05 11:47:37 2011 -0800
@@ -39,11 +39,11 @@
obj.source = 'main-grid-topology.cc'
obj = bld.create_ns3_program('main-random-topology',
- ['core', 'helper', 'mobility'])
+ ['core', 'mobility'])
obj.source = 'main-random-topology.cc'
obj = bld.create_ns3_program('main-random-walk',
- ['core', 'helper', 'mobility'])
+ ['core', 'mobility'])
obj.source = 'main-random-walk.cc'
obj = bld.create_ns3_program('main-propagation-loss',
--- a/scratch/multiple-sources/simple-simulation.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/scratch/multiple-sources/simple-simulation.cc Sat Mar 05 11:47:37 2011 -0800
@@ -1,7 +1,6 @@
#include <iostream>
#include "ns3/core-module.h"
-#include "ns3/helper-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
--- a/scratch/simple.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/scratch/simple.cc Sat Mar 05 11:47:37 2011 -0800
@@ -1,7 +1,6 @@
#include <iostream>
#include "ns3/core-module.h"
-#include "ns3/helper-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
--- a/src/bridge/examples/csma-bridge-one-hop.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/bridge/examples/csma-bridge-one-hop.cc Sat Mar 05 11:47:37 2011 -0800
@@ -71,7 +71,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/bridge-module.h"
#include "ns3/csma-module.h"
--- a/src/bridge/examples/csma-bridge.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/bridge/examples/csma-bridge.cc Sat Mar 05 11:47:37 2011 -0800
@@ -34,7 +34,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/bridge-module.h"
#include "ns3/csma-module.h"
--- a/src/click/examples/nsclick-raw-wlan.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/click/examples/nsclick-raw-wlan.cc Sat Mar 05 11:47:37 2011 -0800
@@ -27,7 +27,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/click-internet-stack-helper.h"
#include "ns3/log.h"
#include "ns3/mobility-helper.h"
--- a/src/click/examples/nsclick-routing.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/click/examples/nsclick-routing.cc Sat Mar 05 11:47:37 2011 -0800
@@ -32,7 +32,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/ipv4-click-routing.h"
#include "ns3/ipv4-l3-click-protocol.h"
#include "ns3/click-internet-stack-helper.h"
--- a/src/click/examples/nsclick-simple-lan.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/click/examples/nsclick-simple-lan.cc Sat Mar 05 11:47:37 2011 -0800
@@ -27,7 +27,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/click-internet-stack-helper.h"
#include "ns3/log.h"
--- a/src/click/examples/nsclick-udp-client-server-csma.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/click/examples/nsclick-udp-client-server-csma.cc Sat Mar 05 11:47:37 2011 -0800
@@ -35,7 +35,6 @@
#include <fstream>
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/ipv4-click-routing.h"
#include "ns3/click-internet-stack-helper.h"
--- a/src/click/examples/nsclick-udp-client-server-wifi.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/click/examples/nsclick-udp-client-server-wifi.cc Sat Mar 05 11:47:37 2011 -0800
@@ -33,7 +33,6 @@
#include <fstream>
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/ipv4-click-routing.h"
#include "ns3/click-internet-stack-helper.h"
#include "ns3/mobility-helper.h"
--- a/src/csma/examples/csma-broadcast.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/csma/examples/csma-broadcast.cc Sat Mar 05 11:47:37 2011 -0800
@@ -34,7 +34,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
--- a/src/csma/examples/csma-multicast.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/csma/examples/csma-multicast.cc Sat Mar 05 11:47:37 2011 -0800
@@ -34,7 +34,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
#include "ns3/ipv4-static-routing-helper.h"
--- a/src/csma/examples/csma-one-subnet.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/csma/examples/csma-one-subnet.cc Sat Mar 05 11:47:37 2011 -0800
@@ -30,7 +30,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
--- a/src/csma/examples/csma-packet-socket.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/csma/examples/csma-packet-socket.cc Sat Mar 05 11:47:37 2011 -0800
@@ -34,7 +34,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
--- a/src/csma/examples/csma-ping.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/csma/examples/csma-ping.cc Sat Mar 05 11:47:37 2011 -0800
@@ -30,7 +30,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
--- a/src/csma/examples/csma-raw-ip-socket.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/csma/examples/csma-raw-ip-socket.cc Sat Mar 05 11:47:37 2011 -0800
@@ -33,7 +33,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
--- a/src/csma/examples/csma-star.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/csma/examples/csma-star.cc Sat Mar 05 11:47:37 2011 -0800
@@ -17,7 +17,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-star-helper.h"
#include "ns3/applications-module.h"
#include "ns3/csma-module.h"
--- a/src/dsdv/examples/dsdv-manet.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/dsdv/examples/dsdv-manet.cc Sat Mar 05 11:47:37 2011 -0800
@@ -30,7 +30,6 @@
*/
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/contrib-module.h"
--- a/src/emu/examples/emu-ping.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/emu/examples/emu-ping.cc Sat Mar 05 11:47:37 2011 -0800
@@ -57,7 +57,6 @@
#include "ns3/network-module.h"
#include "ns3/emu-module.h"
#include "ns3/applications-module.h"
-#include "ns3/helper-module.h"
#include "ns3/ipv4-static-routing-helper.h"
#include "ns3/ipv4-list-routing-helper.h"
--- a/src/emu/examples/emu-udp-echo.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/emu/examples/emu-udp-echo.cc Sat Mar 05 11:47:37 2011 -0800
@@ -63,7 +63,6 @@
#include <fstream>
#include "ns3/core-module.h"
-#include "ns3/helper-module.h"
#include "ns3/internet-module.h"
#include "ns3/applications-module.h"
#include "ns3/emu-helper.h"
--- a/src/helper/athstats-helper.cc Sat Mar 05 10:51:26 2011 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,309 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2009 CTTC
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Author: Nicola Baldo <nbaldo@cttc.es>
- */
-
-#include "ns3/log.h"
-#include "ns3/assert.h"
-#include "ns3/abort.h"
-#include "ns3/simulator.h"
-#include "ns3/nstime.h"
-#include "ns3/config.h"
-#include "athstats-helper.h"
-#include <iomanip>
-#include <iostream>
-#include <fstream>
-
-
-NS_LOG_COMPONENT_DEFINE("Athstats");
-
-namespace ns3 {
-
-
-AthstatsHelper::AthstatsHelper ()
- : m_interval (Seconds (1.0))
-{
-}
-
-void
-AthstatsHelper::EnableAthstats (std::string filename, uint32_t nodeid, uint32_t deviceid)
-{
- Ptr<AthstatsWifiTraceSink> athstats = CreateObject<AthstatsWifiTraceSink> ();
- std::ostringstream oss;
- oss << filename
- << "_" << std::setfill ('0') << std::setw (3) << std::right << nodeid
- << "_" << std::setfill ('0') << std::setw (3) << std::right << deviceid;
- athstats->Open (oss.str ());
-
- oss.str ("");
- oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid;
- std::string devicepath = oss.str ();
-
- Config::Connect (devicepath + "/Mac/MacTx", MakeCallback (&AthstatsWifiTraceSink::DevTxTrace, athstats));
- Config::Connect (devicepath + "/Mac/MacRx", MakeCallback (&AthstatsWifiTraceSink::DevRxTrace, athstats));
-
- Config::Connect (devicepath + "/RemoteStationManager/TxRtsFailed", MakeCallback (&AthstatsWifiTraceSink::TxRtsFailedTrace, athstats));
- Config::Connect (devicepath + "/RemoteStationManager/MacTxDataFailed", MakeCallback (&AthstatsWifiTraceSink::TxDataFailedTrace, athstats));
- Config::Connect (devicepath + "/RemoteStationManager/MacTxFinalRtsFailed", MakeCallback (&AthstatsWifiTraceSink::TxFinalRtsFailedTrace, athstats));
- Config::Connect (devicepath + "/RemoteStationManager/MacTxFinalDataFailed", MakeCallback (&AthstatsWifiTraceSink::TxFinalDataFailedTrace, athstats));
-
- Config::Connect (devicepath + "/Phy/State/RxOk", MakeCallback (&AthstatsWifiTraceSink::PhyRxOkTrace, athstats));
- Config::Connect (devicepath + "/Phy/State/RxError", MakeCallback (&AthstatsWifiTraceSink::PhyRxErrorTrace, athstats));
- Config::Connect (devicepath + "/Phy/State/Tx", MakeCallback (&AthstatsWifiTraceSink::PhyTxTrace, athstats));
- Config::Connect (devicepath + "/Phy/State/State", MakeCallback (&AthstatsWifiTraceSink::PhyStateTrace, athstats));
-}
-
-void
-AthstatsHelper::EnableAthstats (std::string filename, Ptr<NetDevice> nd)
-{
- EnableAthstats (filename, nd->GetNode ()->GetId (), nd->GetIfIndex ());
-}
-
-
-void
-AthstatsHelper::EnableAthstats (std::string filename, NetDeviceContainer d)
-{
- for (NetDeviceContainer::Iterator i = d.Begin (); i != d.End (); ++i)
- {
- Ptr<NetDevice> dev = *i;
- EnableAthstats (filename, dev->GetNode ()->GetId (), dev->GetIfIndex ());
- }
-}
-
-
-void
-AthstatsHelper::EnableAthstats (std::string filename, NodeContainer n)
-{
- NetDeviceContainer devs;
- for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i)
- {
- Ptr<Node> node = *i;
- for (uint32_t j = 0; j < node->GetNDevices (); ++j)
- {
- devs.Add (node->GetDevice (j));
- }
- }
- EnableAthstats (filename, devs);
-}
-
-
-
-
-
-NS_OBJECT_ENSURE_REGISTERED (AthstatsWifiTraceSink);
-
-TypeId
-AthstatsWifiTraceSink::GetTypeId (void)
-{
- static TypeId tid = TypeId ("ns3::AthstatsWifiTraceSink")
- .SetParent<Object> ()
- .AddConstructor<AthstatsWifiTraceSink> ()
- .AddAttribute ("Interval",
- "Time interval between reports",
- TimeValue (Seconds(1.0)),
- MakeTimeAccessor (&AthstatsWifiTraceSink::m_interval),
- MakeTimeChecker ())
- ;
- return tid;
-}
-
-AthstatsWifiTraceSink::AthstatsWifiTraceSink ()
- : m_txCount (0),
- m_rxCount (0),
- m_shortRetryCount (0),
- m_longRetryCount (0),
- m_exceededRetryCount (0),
- m_phyRxOkCount (0),
- m_phyRxErrorCount (0),
- m_phyTxCount (0),
- m_writer (0)
-{
- Simulator::ScheduleNow (&AthstatsWifiTraceSink::WriteStats, this);
-}
-
-AthstatsWifiTraceSink::~AthstatsWifiTraceSink ()
-{
- NS_LOG_FUNCTION (this);
-
- if (m_writer != 0)
- {
- NS_LOG_LOGIC ("m_writer nonzero " << m_writer);
- if (m_writer->is_open ())
- {
- NS_LOG_LOGIC ("m_writer open. Closing " << m_writer);
- m_writer->close ();
- }
-
- NS_LOG_LOGIC ("Deleting writer " << m_writer);
- delete m_writer;
-
- NS_LOG_LOGIC ("m_writer = 0");
- m_writer = 0;
- }
- else
- {
- NS_LOG_LOGIC ("m_writer == 0");
- }
-}
-
-void
-AthstatsWifiTraceSink::ResetCounters ()
-{
- m_txCount = 0;
- m_rxCount = 0;
- m_shortRetryCount = 0;
- m_longRetryCount = 0;
- m_exceededRetryCount = 0;
- m_phyRxOkCount = 0;
- m_phyRxErrorCount = 0;
- m_phyTxCount = 0;
-}
-
-void
-AthstatsWifiTraceSink::DevTxTrace (std::string context, Ptr<const Packet> p)
-{
- NS_LOG_FUNCTION (this << context <<p);
- ++m_txCount;
-}
-
-void
-AthstatsWifiTraceSink::DevRxTrace (std::string context, Ptr<const Packet> p)
-{
- NS_LOG_FUNCTION (this << context <<p);
- ++m_rxCount;
-}
-
-
-void
-AthstatsWifiTraceSink::TxRtsFailedTrace (std::string context, Mac48Address address)
-{
- NS_LOG_FUNCTION (this << context << address);
- ++m_shortRetryCount;
-}
-
-void
-AthstatsWifiTraceSink::TxDataFailedTrace (std::string context, Mac48Address address)
-{
- NS_LOG_FUNCTION (this << context << address);
- ++m_longRetryCount;
-}
-
-void
-AthstatsWifiTraceSink::TxFinalRtsFailedTrace (std::string context, Mac48Address address)
-{
- NS_LOG_FUNCTION (this << context << address);
- ++m_exceededRetryCount;
-}
-
-void
-AthstatsWifiTraceSink::TxFinalDataFailedTrace (std::string context, Mac48Address address)
-{
- NS_LOG_FUNCTION (this << context << address);
- ++m_exceededRetryCount;
-}
-
-
-
-void
-AthstatsWifiTraceSink::PhyRxOkTrace (std::string context, Ptr<const Packet> packet, double snr, WifiMode mode, enum WifiPreamble preamble)
-{
- NS_LOG_FUNCTION (this << context <<packet<< " mode=" << mode << " snr=" << snr );
- ++m_phyRxOkCount;
-}
-
-void
-AthstatsWifiTraceSink::PhyRxErrorTrace (std::string context, Ptr<const Packet> packet, double snr)
-{
- NS_LOG_FUNCTION (this << context <<packet <<" snr=" << snr );
- ++m_phyRxErrorCount;
-}
-
-void
-AthstatsWifiTraceSink::PhyTxTrace (std::string context, Ptr<const Packet> packet, WifiMode mode, WifiPreamble preamble, uint8_t txPower)
-{
- NS_LOG_FUNCTION (this << context << packet << "PHYTX mode=" << mode );
- ++m_phyTxCount;
-}
-
-
-void
-AthstatsWifiTraceSink::PhyStateTrace (std::string context, Time start, Time duration, enum WifiPhy::State state)
-{
- NS_LOG_FUNCTION (this << context << start << duration << state);
-
-}
-
-
-
-void
-AthstatsWifiTraceSink::Open (std::string const &name)
-{
- NS_LOG_FUNCTION (this << name);
- NS_ABORT_MSG_UNLESS (m_writer == 0, "AthstatsWifiTraceSink::Open (): m_writer already allocated (std::ofstream leak detected)");
-
- m_writer = new std::ofstream ();
- NS_ABORT_MSG_UNLESS (m_writer, "AthstatsWifiTraceSink::Open (): Cannot allocate m_writer");
-
- NS_LOG_LOGIC ("Created writer " << m_writer);
-
- m_writer->open (name.c_str (), std::ios_base::binary | std::ios_base::out);
- NS_ABORT_MSG_IF (m_writer->fail (), "AthstatsWifiTraceSink::Open (): m_writer->open (" << name.c_str () << ") failed");
-
- NS_ASSERT_MSG (m_writer->is_open (), "AthstatsWifiTraceSink::Open (): m_writer not open");
-
- NS_LOG_LOGIC ("Writer opened successfully");
-}
-
-
-void
-AthstatsWifiTraceSink::WriteStats ()
-{
- NS_ABORT_MSG_UNLESS (this, "function called with null this pointer, now=" << Now () );
- // the comments below refer to how each value maps to madwifi's athstats
- // I know C strings are ugly but that's the quickest way to use exactly the same format as in madwifi
- char str[200];
- snprintf (str, 200, "%8u %8u %7u %7u %7u %6u %6u %6u %7u %4u %3uM\n",
- (unsigned int) m_txCount, // /proc/net/dev transmitted packets to which we should subract mgmt frames
- (unsigned int) m_rxCount, // /proc/net/dev received packets but subracts mgmt frames from it
- (unsigned int) 0, // ast_tx_altrate,
- (unsigned int) m_shortRetryCount, // ast_tx_shortretry,
- (unsigned int) m_longRetryCount, // ast_tx_longretry,
- (unsigned int) m_exceededRetryCount, // ast_tx_xretries,
- (unsigned int) m_phyRxErrorCount, // ast_rx_crcerr,
- (unsigned int) 0, // ast_rx_badcrypt,
- (unsigned int) 0, // ast_rx_phyerr,
- (unsigned int) 0, // ast_rx_rssi,
- (unsigned int) 0 // rate
- );
-
- if (m_writer)
- {
-
- *m_writer << str;
-
- ResetCounters ();
- Simulator::Schedule (m_interval, &AthstatsWifiTraceSink::WriteStats, this);
- }
-}
-
-
-
-
-} // namespace ns3
-
-
--- a/src/helper/athstats-helper.h Sat Mar 05 10:51:26 2011 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,230 +0,0 @@
-/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2009 CTTC
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation;
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * Author: Nicola Baldo <nbaldo@cttc.es>
- */
-
-#ifndef ATHSTATS_HELPER_H
-#define ATHSTATS_HELPER_H
-
-#include<string>
-#include "ns3/object.h"
-#include "ns3/attribute.h"
-#include "ns3/object-factory.h"
-#include "ns3/node-container.h"
-#include "ns3/net-device-container.h"
-#include "ns3/nstime.h"
-#include "ns3/wifi-phy.h"
-#include "ns3/double.h"
-#include "ns3/mac48-address.h"
-
-namespace ns3 {
-
-
-class NetDevice;
-
-/**
- * @brief create AthstatsWifiTraceSink instances and connect them to wifi devices
- *
- *
- */
-class AthstatsHelper
-{
-public:
- AthstatsHelper ();
- void EnableAthstats (std::string filename, uint32_t nodeid, uint32_t deviceid);
- void EnableAthstats (std::string filename, Ptr<NetDevice> nd);
- void EnableAthstats (std::string filename, NetDeviceContainer d);
- void EnableAthstats (std::string filename, NodeContainer n);
-
-private:
- Time m_interval;
-};
-
-
-
-
-/**
- * @brief trace sink for wifi device that mimics madwifi's athstats tool.
- *
- * The AthstatsWifiTraceSink class is a trace sink to be connected to several of the traces
- * available within a wifi device. The purpose of AthstatsWifiTraceSink is to
- * mimic the behavior of the athstats tool distributed wih the madwifi
- * driver. In particular, the reproduced behavior is that obtained
- * when executing athstats without parameters: a report written in
- * text format is produced every fixed interval, based on the events
- * observed by the wifi device.
- *
- * Differences with the "real" athstats:
- *
- * - AthstatsWifiTraceSink is expected to write its output to a file
- * (not to stdout).
- *
- * - only a subset of the metrics supported by athstats is supported
- * by AthstatsWifiTraceSink
- *
- * - AthstatsWifiTraceSink does never produce a cumulative report.
- */
-class AthstatsWifiTraceSink : public Object
-{
-public:
- static TypeId GetTypeId (void);
- AthstatsWifiTraceSink ();
- virtual ~AthstatsWifiTraceSink ();
-
-
- /**
- * function to be called when the net device transmits a packet
- *
- * @param context
- * @param p the packet being transmitted
- */
- void DevTxTrace (std::string context, Ptr<const Packet> p);
-
- /**
- * function to be called when the net device receives a packet
- *
- * @param context
- * @param p the packet being received
- */
- void DevRxTrace (std::string context, Ptr<const Packet> p);
-
- /**
- * Function to be called when a RTS frame transmission by the considered
- * device has failed
- *
- * @param context
- * @param address the MAC address of the remote station
- */
- void TxRtsFailedTrace (std::string context, Mac48Address address);
-
- /**
- * Function to be called when a data frame transmission by the considered
- * device has failed
- *
- * @param context
- * @param address the MAC address of the remote station
- */
- void TxDataFailedTrace (std::string context, Mac48Address address);
-
- /**
- * Function to be called when the transmission of a RTS frame has
- * exceeded the retry limit
- *
- * @param context
- * @param address the MAC address of the remote station
- */
- void TxFinalRtsFailedTrace (std::string context, Mac48Address address);
-
- /**
- * Function to be called when the transmission of a data frame has
- * exceeded the retry limit
- *
- * @param context
- * @param address the MAC address of the remote station
- */
- void TxFinalDataFailedTrace (std::string context, Mac48Address address);
-
- /**
- * Function to be called when the PHY layer of the considered
- * device receives a frame
- *
- * @param context
- * @param packet
- * @param snr
- * @param mode
- * @param preamble
- */
- void PhyRxOkTrace (std::string context, Ptr<const Packet> packet, double snr, WifiMode mode, enum WifiPreamble preamble);
-
- /**
- * Function to be called when a frame reception by the PHY
- * layer of the considered device resulted in an error due to a failure in the CRC check of
- * the frame
- *
- * @param context
- * @param packet
- * @param snr
- */
- void PhyRxErrorTrace (std::string context, Ptr<const Packet> packet, double snr);
-
- /**
- * Function to be called when a frame is being transmitted by the
- * PHY layer of the considered device
- *
- * @param context
- * @param packet
- * @param mode
- * @param preamble
- * @param txPower
- */
- void PhyTxTrace (std::string context, Ptr<const Packet> packet, WifiMode mode, WifiPreamble preamble, uint8_t txPower);
-
- /**
- * Function to be called when the PHY layer of the considered device
- * changes state
- *
- * @param context
- * @param start
- * @param duration
- * @param state
- */
- void PhyStateTrace (std::string context, Time start, Time duration, enum WifiPhy::State state);
-
- /**
- * Open a file for output
- *
- * @param name the name of the file to be opened.
- */
- void Open (std::string const& name);
-
-private:
-
- /**
- * @internal
- */
- void WriteStats ();
-
- /**
- * @internal
- */
- void ResetCounters ();
-
- uint32_t m_txCount;
- uint32_t m_rxCount;
- uint32_t m_shortRetryCount;
- uint32_t m_longRetryCount;
- uint32_t m_exceededRetryCount;
- uint32_t m_phyRxOkCount;
- uint32_t m_phyRxErrorCount;
- uint32_t m_phyTxCount;
-
- std::ofstream *m_writer;
-
- Time m_interval;
-
-}; // class AthstatsWifiTraceSink
-
-
-
-
-} // namespace ns3
-
-
-
-
-#endif /* ATHSTATS_HELPER_H */
--- a/src/helper/waf Sat Mar 05 10:51:26 2011 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-exec "`dirname "$0"`"/../../waf "$@"
\ No newline at end of file
--- a/src/helper/wscript Sat Mar 05 10:51:26 2011 -0800
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-## -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
-
-def build(bld):
- helper = bld.create_ns3_module('helper', ['mobility', 'network', 'internet', 'wifi', 'point-to-point', 'spectrum'])
- helper.source = [
- 'athstats-helper.cc',
- ]
-
- headers = bld.new_task_gen('ns3header')
- headers.module = 'helper'
- headers.source = [
- 'athstats-helper.h',
- ]
-
- env = bld.env_of_name('default')
--- a/src/lte/examples/lte-amc.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/lte/examples/lte-amc.cc Sat Mar 05 11:47:37 2011 -0800
@@ -30,7 +30,6 @@
#include <string>
#include <ns3/mobility-module.h>
#include <ns3/spectrum-helper.h>
-#include <ns3/helper-module.h>
#include <ns3/lte-helper.h>
#include <ns3/enb-phy.h>
#include <ns3/ue-phy.h>
--- a/src/lte/examples/lte-channel-model.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/lte/examples/lte-channel-model.cc Sat Mar 05 11:47:37 2011 -0800
@@ -30,7 +30,6 @@
#include <string>
#include <ns3/mobility-module.h>
#include <ns3/spectrum-helper.h>
-#include <ns3/helper-module.h>
#include <ns3/lte-helper.h>
#include <ns3/enb-phy.h>
#include <ns3/ue-phy.h>
--- a/src/lte/examples/lte-device.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/lte/examples/lte-device.cc Sat Mar 05 11:47:37 2011 -0800
@@ -12,7 +12,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/contrib-module.h"
--- a/src/lte/examples/lte-multiple-flows.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/lte/examples/lte-multiple-flows.cc Sat Mar 05 11:47:37 2011 -0800
@@ -12,7 +12,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/contrib-module.h"
--- a/src/lte/examples/lte-phy-downlink.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/lte/examples/lte-phy-downlink.cc Sat Mar 05 11:47:37 2011 -0800
@@ -54,7 +54,6 @@
#include <ns3/mobility-module.h>
#include <ns3/spectrum-helper.h>
#include <ns3/internet-module.h>
-#include <ns3/helper-module.h>
#include <ns3/lte-helper.h>
#include <ns3/enb-phy.h>
#include <ns3/ue-phy.h>
--- a/src/lte/examples/lte-phy-uplink.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/lte/examples/lte-phy-uplink.cc Sat Mar 05 11:47:37 2011 -0800
@@ -56,7 +56,6 @@
#include <string>
#include <ns3/mobility-module.h>
#include <ns3/spectrum-helper.h>
-#include <ns3/helper-module.h>
#include <ns3/internet-module.h>
#include <ns3/lte-helper.h>
#include <ns3/enb-phy.h>
--- a/src/mesh/examples/mesh.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/mesh/examples/mesh.cc Sat Mar 05 11:47:37 2011 -0800
@@ -47,7 +47,6 @@
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/wifi-module.h"
#include "ns3/mesh-module.h"
--- a/src/nix-vector-routing/doc/nix-vector-routing.h Sat Mar 05 10:51:26 2011 -0800
+++ b/src/nix-vector-routing/doc/nix-vector-routing.h Sat Mar 05 11:47:37 2011 -0800
@@ -37,8 +37,6 @@
*
* \section api API and Usage
*
- * Nix-vector routing has been rolled into a helper class. In order to
- * utilize these helper functions, users must include ns3/helper-module.h.
* The Nix-vector routing protocol must be added to a list of routing
* protocols. It is important that list routing is utilized.
*
--- a/src/nix-vector-routing/examples/nix-simple.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/nix-vector-routing/examples/nix-simple.cc Sat Mar 05 11:47:37 2011 -0800
@@ -16,7 +16,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"
--- a/src/nix-vector-routing/examples/nms-p2p-nix.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/nix-vector-routing/examples/nms-p2p-nix.cc Sat Mar 05 11:47:37 2011 -0800
@@ -39,7 +39,6 @@
#include "ns3/core-module.h"
#include "ns3/internet-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"
#include "ns3/onoff-application.h"
--- a/src/olsr/examples/olsr-hna.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/olsr/examples/olsr-hna.cc Sat Mar 05 11:47:37 2011 -0800
@@ -52,7 +52,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/mobility-module.h"
#include "ns3/contrib-module.h"
#include "ns3/wifi-module.h"
--- a/src/olsr/examples/simple-point-to-point-olsr.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/olsr/examples/simple-point-to-point-olsr.cc Sat Mar 05 11:47:37 2011 -0800
@@ -43,7 +43,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/internet-module.h"
-#include "ns3/helper-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"
#include "ns3/olsr-helper.h"
--- a/src/tap-bridge/examples/tap-csma-virtual-machine.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/tap-bridge/examples/tap-csma-virtual-machine.cc Sat Mar 05 11:47:37 2011 -0800
@@ -63,7 +63,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/tap-bridge-module.h"
--- a/src/tap-bridge/examples/tap-csma.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/tap-bridge/examples/tap-csma.cc Sat Mar 05 11:47:37 2011 -0800
@@ -60,7 +60,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
#include "ns3/wifi-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/internet-module.h"
#include "ns3/ipv4-global-routing-helper.h"
--- a/src/tap-bridge/examples/tap-wifi-dumbbell.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/tap-bridge/examples/tap-wifi-dumbbell.cc Sat Mar 05 11:47:37 2011 -0800
@@ -105,7 +105,6 @@
#include "ns3/point-to-point-module.h"
#include "ns3/wifi-module.h"
#include "ns3/internet-module.h"
-#include "ns3/helper-module.h"
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
#include "ns3/ipv4-global-routing-helper.h"
--- a/src/tap-bridge/examples/tap-wifi-virtual-machine.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/tap-bridge/examples/tap-wifi-virtual-machine.cc Sat Mar 05 11:47:37 2011 -0800
@@ -73,7 +73,6 @@
#include "ns3/network-module.h"
#include "ns3/mobility-module.h"
#include "ns3/wifi-module.h"
-#include "ns3/helper-module.h"
#include "ns3/tap-bridge-module.h"
using namespace ns3;
--- a/src/test/perf/perf-io.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/test/perf/perf-io.cc Sat Mar 05 11:47:37 2011 -0800
@@ -25,7 +25,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/abort.h"
using namespace ns3;
--- a/src/topology-read/examples/topology-example-sim.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/topology-read/examples/topology-example-sim.cc Sat Mar 05 11:47:37 2011 -0800
@@ -28,7 +28,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"
--- a/src/uan/examples/uan-cw-example.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/uan/examples/uan-cw-example.cc Sat Mar 05 11:47:37 2011 -0800
@@ -41,7 +41,6 @@
#include "ns3/network-module.h"
#include "ns3/mobility-module.h"
#include "ns3/contrib-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include <fstream>
--- a/src/uan/examples/uan-cw-example.h Sat Mar 05 10:51:26 2011 -0800
+++ b/src/uan/examples/uan-cw-example.h Sat Mar 05 11:47:37 2011 -0800
@@ -24,7 +24,6 @@
#include "ns3/network-module.h"
#include "ns3/contrib-module.h"
#include "ns3/uan-module.h"
-#include "ns3/helper-module.h"
using namespace ns3;
--- a/src/uan/examples/uan-rc-example.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/uan/examples/uan-rc-example.cc Sat Mar 05 11:47:37 2011 -0800
@@ -54,7 +54,6 @@
#include "uan-rc-example.h"
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/log.h"
--- a/src/uan/examples/uan-rc-example.h Sat Mar 05 10:51:26 2011 -0800
+++ b/src/uan/examples/uan-rc-example.h Sat Mar 05 11:47:37 2011 -0800
@@ -23,7 +23,6 @@
#include "ns3/network-module.h"
#include "ns3/contrib-module.h"
-#include "ns3/helper-module.h"
#include "ns3/uan-module.h"
using namespace ns3;
--- a/src/virtual-net-device/examples/virtual-net-device.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/virtual-net-device/examples/virtual-net-device.cc Sat Mar 05 11:47:37 2011 -0800
@@ -53,7 +53,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/internet-module.h"
#include "ns3/point-to-point-module.h"
#include "ns3/applications-module.h"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/wifi/helper/athstats-helper.cc Sat Mar 05 11:47:37 2011 -0800
@@ -0,0 +1,309 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 CTTC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Nicola Baldo <nbaldo@cttc.es>
+ */
+
+#include "ns3/log.h"
+#include "ns3/assert.h"
+#include "ns3/abort.h"
+#include "ns3/simulator.h"
+#include "ns3/nstime.h"
+#include "ns3/config.h"
+#include "athstats-helper.h"
+#include <iomanip>
+#include <iostream>
+#include <fstream>
+
+
+NS_LOG_COMPONENT_DEFINE("Athstats");
+
+namespace ns3 {
+
+
+AthstatsHelper::AthstatsHelper ()
+ : m_interval (Seconds (1.0))
+{
+}
+
+void
+AthstatsHelper::EnableAthstats (std::string filename, uint32_t nodeid, uint32_t deviceid)
+{
+ Ptr<AthstatsWifiTraceSink> athstats = CreateObject<AthstatsWifiTraceSink> ();
+ std::ostringstream oss;
+ oss << filename
+ << "_" << std::setfill ('0') << std::setw (3) << std::right << nodeid
+ << "_" << std::setfill ('0') << std::setw (3) << std::right << deviceid;
+ athstats->Open (oss.str ());
+
+ oss.str ("");
+ oss << "/NodeList/" << nodeid << "/DeviceList/" << deviceid;
+ std::string devicepath = oss.str ();
+
+ Config::Connect (devicepath + "/Mac/MacTx", MakeCallback (&AthstatsWifiTraceSink::DevTxTrace, athstats));
+ Config::Connect (devicepath + "/Mac/MacRx", MakeCallback (&AthstatsWifiTraceSink::DevRxTrace, athstats));
+
+ Config::Connect (devicepath + "/RemoteStationManager/TxRtsFailed", MakeCallback (&AthstatsWifiTraceSink::TxRtsFailedTrace, athstats));
+ Config::Connect (devicepath + "/RemoteStationManager/MacTxDataFailed", MakeCallback (&AthstatsWifiTraceSink::TxDataFailedTrace, athstats));
+ Config::Connect (devicepath + "/RemoteStationManager/MacTxFinalRtsFailed", MakeCallback (&AthstatsWifiTraceSink::TxFinalRtsFailedTrace, athstats));
+ Config::Connect (devicepath + "/RemoteStationManager/MacTxFinalDataFailed", MakeCallback (&AthstatsWifiTraceSink::TxFinalDataFailedTrace, athstats));
+
+ Config::Connect (devicepath + "/Phy/State/RxOk", MakeCallback (&AthstatsWifiTraceSink::PhyRxOkTrace, athstats));
+ Config::Connect (devicepath + "/Phy/State/RxError", MakeCallback (&AthstatsWifiTraceSink::PhyRxErrorTrace, athstats));
+ Config::Connect (devicepath + "/Phy/State/Tx", MakeCallback (&AthstatsWifiTraceSink::PhyTxTrace, athstats));
+ Config::Connect (devicepath + "/Phy/State/State", MakeCallback (&AthstatsWifiTraceSink::PhyStateTrace, athstats));
+}
+
+void
+AthstatsHelper::EnableAthstats (std::string filename, Ptr<NetDevice> nd)
+{
+ EnableAthstats (filename, nd->GetNode ()->GetId (), nd->GetIfIndex ());
+}
+
+
+void
+AthstatsHelper::EnableAthstats (std::string filename, NetDeviceContainer d)
+{
+ for (NetDeviceContainer::Iterator i = d.Begin (); i != d.End (); ++i)
+ {
+ Ptr<NetDevice> dev = *i;
+ EnableAthstats (filename, dev->GetNode ()->GetId (), dev->GetIfIndex ());
+ }
+}
+
+
+void
+AthstatsHelper::EnableAthstats (std::string filename, NodeContainer n)
+{
+ NetDeviceContainer devs;
+ for (NodeContainer::Iterator i = n.Begin (); i != n.End (); ++i)
+ {
+ Ptr<Node> node = *i;
+ for (uint32_t j = 0; j < node->GetNDevices (); ++j)
+ {
+ devs.Add (node->GetDevice (j));
+ }
+ }
+ EnableAthstats (filename, devs);
+}
+
+
+
+
+
+NS_OBJECT_ENSURE_REGISTERED (AthstatsWifiTraceSink);
+
+TypeId
+AthstatsWifiTraceSink::GetTypeId (void)
+{
+ static TypeId tid = TypeId ("ns3::AthstatsWifiTraceSink")
+ .SetParent<Object> ()
+ .AddConstructor<AthstatsWifiTraceSink> ()
+ .AddAttribute ("Interval",
+ "Time interval between reports",
+ TimeValue (Seconds(1.0)),
+ MakeTimeAccessor (&AthstatsWifiTraceSink::m_interval),
+ MakeTimeChecker ())
+ ;
+ return tid;
+}
+
+AthstatsWifiTraceSink::AthstatsWifiTraceSink ()
+ : m_txCount (0),
+ m_rxCount (0),
+ m_shortRetryCount (0),
+ m_longRetryCount (0),
+ m_exceededRetryCount (0),
+ m_phyRxOkCount (0),
+ m_phyRxErrorCount (0),
+ m_phyTxCount (0),
+ m_writer (0)
+{
+ Simulator::ScheduleNow (&AthstatsWifiTraceSink::WriteStats, this);
+}
+
+AthstatsWifiTraceSink::~AthstatsWifiTraceSink ()
+{
+ NS_LOG_FUNCTION (this);
+
+ if (m_writer != 0)
+ {
+ NS_LOG_LOGIC ("m_writer nonzero " << m_writer);
+ if (m_writer->is_open ())
+ {
+ NS_LOG_LOGIC ("m_writer open. Closing " << m_writer);
+ m_writer->close ();
+ }
+
+ NS_LOG_LOGIC ("Deleting writer " << m_writer);
+ delete m_writer;
+
+ NS_LOG_LOGIC ("m_writer = 0");
+ m_writer = 0;
+ }
+ else
+ {
+ NS_LOG_LOGIC ("m_writer == 0");
+ }
+}
+
+void
+AthstatsWifiTraceSink::ResetCounters ()
+{
+ m_txCount = 0;
+ m_rxCount = 0;
+ m_shortRetryCount = 0;
+ m_longRetryCount = 0;
+ m_exceededRetryCount = 0;
+ m_phyRxOkCount = 0;
+ m_phyRxErrorCount = 0;
+ m_phyTxCount = 0;
+}
+
+void
+AthstatsWifiTraceSink::DevTxTrace (std::string context, Ptr<const Packet> p)
+{
+ NS_LOG_FUNCTION (this << context <<p);
+ ++m_txCount;
+}
+
+void
+AthstatsWifiTraceSink::DevRxTrace (std::string context, Ptr<const Packet> p)
+{
+ NS_LOG_FUNCTION (this << context <<p);
+ ++m_rxCount;
+}
+
+
+void
+AthstatsWifiTraceSink::TxRtsFailedTrace (std::string context, Mac48Address address)
+{
+ NS_LOG_FUNCTION (this << context << address);
+ ++m_shortRetryCount;
+}
+
+void
+AthstatsWifiTraceSink::TxDataFailedTrace (std::string context, Mac48Address address)
+{
+ NS_LOG_FUNCTION (this << context << address);
+ ++m_longRetryCount;
+}
+
+void
+AthstatsWifiTraceSink::TxFinalRtsFailedTrace (std::string context, Mac48Address address)
+{
+ NS_LOG_FUNCTION (this << context << address);
+ ++m_exceededRetryCount;
+}
+
+void
+AthstatsWifiTraceSink::TxFinalDataFailedTrace (std::string context, Mac48Address address)
+{
+ NS_LOG_FUNCTION (this << context << address);
+ ++m_exceededRetryCount;
+}
+
+
+
+void
+AthstatsWifiTraceSink::PhyRxOkTrace (std::string context, Ptr<const Packet> packet, double snr, WifiMode mode, enum WifiPreamble preamble)
+{
+ NS_LOG_FUNCTION (this << context <<packet<< " mode=" << mode << " snr=" << snr );
+ ++m_phyRxOkCount;
+}
+
+void
+AthstatsWifiTraceSink::PhyRxErrorTrace (std::string context, Ptr<const Packet> packet, double snr)
+{
+ NS_LOG_FUNCTION (this << context <<packet <<" snr=" << snr );
+ ++m_phyRxErrorCount;
+}
+
+void
+AthstatsWifiTraceSink::PhyTxTrace (std::string context, Ptr<const Packet> packet, WifiMode mode, WifiPreamble preamble, uint8_t txPower)
+{
+ NS_LOG_FUNCTION (this << context << packet << "PHYTX mode=" << mode );
+ ++m_phyTxCount;
+}
+
+
+void
+AthstatsWifiTraceSink::PhyStateTrace (std::string context, Time start, Time duration, enum WifiPhy::State state)
+{
+ NS_LOG_FUNCTION (this << context << start << duration << state);
+
+}
+
+
+
+void
+AthstatsWifiTraceSink::Open (std::string const &name)
+{
+ NS_LOG_FUNCTION (this << name);
+ NS_ABORT_MSG_UNLESS (m_writer == 0, "AthstatsWifiTraceSink::Open (): m_writer already allocated (std::ofstream leak detected)");
+
+ m_writer = new std::ofstream ();
+ NS_ABORT_MSG_UNLESS (m_writer, "AthstatsWifiTraceSink::Open (): Cannot allocate m_writer");
+
+ NS_LOG_LOGIC ("Created writer " << m_writer);
+
+ m_writer->open (name.c_str (), std::ios_base::binary | std::ios_base::out);
+ NS_ABORT_MSG_IF (m_writer->fail (), "AthstatsWifiTraceSink::Open (): m_writer->open (" << name.c_str () << ") failed");
+
+ NS_ASSERT_MSG (m_writer->is_open (), "AthstatsWifiTraceSink::Open (): m_writer not open");
+
+ NS_LOG_LOGIC ("Writer opened successfully");
+}
+
+
+void
+AthstatsWifiTraceSink::WriteStats ()
+{
+ NS_ABORT_MSG_UNLESS (this, "function called with null this pointer, now=" << Now () );
+ // the comments below refer to how each value maps to madwifi's athstats
+ // I know C strings are ugly but that's the quickest way to use exactly the same format as in madwifi
+ char str[200];
+ snprintf (str, 200, "%8u %8u %7u %7u %7u %6u %6u %6u %7u %4u %3uM\n",
+ (unsigned int) m_txCount, // /proc/net/dev transmitted packets to which we should subract mgmt frames
+ (unsigned int) m_rxCount, // /proc/net/dev received packets but subracts mgmt frames from it
+ (unsigned int) 0, // ast_tx_altrate,
+ (unsigned int) m_shortRetryCount, // ast_tx_shortretry,
+ (unsigned int) m_longRetryCount, // ast_tx_longretry,
+ (unsigned int) m_exceededRetryCount, // ast_tx_xretries,
+ (unsigned int) m_phyRxErrorCount, // ast_rx_crcerr,
+ (unsigned int) 0, // ast_rx_badcrypt,
+ (unsigned int) 0, // ast_rx_phyerr,
+ (unsigned int) 0, // ast_rx_rssi,
+ (unsigned int) 0 // rate
+ );
+
+ if (m_writer)
+ {
+
+ *m_writer << str;
+
+ ResetCounters ();
+ Simulator::Schedule (m_interval, &AthstatsWifiTraceSink::WriteStats, this);
+ }
+}
+
+
+
+
+} // namespace ns3
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/wifi/helper/athstats-helper.h Sat Mar 05 11:47:37 2011 -0800
@@ -0,0 +1,230 @@
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
+/*
+ * Copyright (c) 2009 CTTC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation;
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * Author: Nicola Baldo <nbaldo@cttc.es>
+ */
+
+#ifndef ATHSTATS_HELPER_H
+#define ATHSTATS_HELPER_H
+
+#include<string>
+#include "ns3/object.h"
+#include "ns3/attribute.h"
+#include "ns3/object-factory.h"
+#include "ns3/node-container.h"
+#include "ns3/net-device-container.h"
+#include "ns3/nstime.h"
+#include "ns3/wifi-phy.h"
+#include "ns3/double.h"
+#include "ns3/mac48-address.h"
+
+namespace ns3 {
+
+
+class NetDevice;
+
+/**
+ * @brief create AthstatsWifiTraceSink instances and connect them to wifi devices
+ *
+ *
+ */
+class AthstatsHelper
+{
+public:
+ AthstatsHelper ();
+ void EnableAthstats (std::string filename, uint32_t nodeid, uint32_t deviceid);
+ void EnableAthstats (std::string filename, Ptr<NetDevice> nd);
+ void EnableAthstats (std::string filename, NetDeviceContainer d);
+ void EnableAthstats (std::string filename, NodeContainer n);
+
+private:
+ Time m_interval;
+};
+
+
+
+
+/**
+ * @brief trace sink for wifi device that mimics madwifi's athstats tool.
+ *
+ * The AthstatsWifiTraceSink class is a trace sink to be connected to several of the traces
+ * available within a wifi device. The purpose of AthstatsWifiTraceSink is to
+ * mimic the behavior of the athstats tool distributed wih the madwifi
+ * driver. In particular, the reproduced behavior is that obtained
+ * when executing athstats without parameters: a report written in
+ * text format is produced every fixed interval, based on the events
+ * observed by the wifi device.
+ *
+ * Differences with the "real" athstats:
+ *
+ * - AthstatsWifiTraceSink is expected to write its output to a file
+ * (not to stdout).
+ *
+ * - only a subset of the metrics supported by athstats is supported
+ * by AthstatsWifiTraceSink
+ *
+ * - AthstatsWifiTraceSink does never produce a cumulative report.
+ */
+class AthstatsWifiTraceSink : public Object
+{
+public:
+ static TypeId GetTypeId (void);
+ AthstatsWifiTraceSink ();
+ virtual ~AthstatsWifiTraceSink ();
+
+
+ /**
+ * function to be called when the net device transmits a packet
+ *
+ * @param context
+ * @param p the packet being transmitted
+ */
+ void DevTxTrace (std::string context, Ptr<const Packet> p);
+
+ /**
+ * function to be called when the net device receives a packet
+ *
+ * @param context
+ * @param p the packet being received
+ */
+ void DevRxTrace (std::string context, Ptr<const Packet> p);
+
+ /**
+ * Function to be called when a RTS frame transmission by the considered
+ * device has failed
+ *
+ * @param context
+ * @param address the MAC address of the remote station
+ */
+ void TxRtsFailedTrace (std::string context, Mac48Address address);
+
+ /**
+ * Function to be called when a data frame transmission by the considered
+ * device has failed
+ *
+ * @param context
+ * @param address the MAC address of the remote station
+ */
+ void TxDataFailedTrace (std::string context, Mac48Address address);
+
+ /**
+ * Function to be called when the transmission of a RTS frame has
+ * exceeded the retry limit
+ *
+ * @param context
+ * @param address the MAC address of the remote station
+ */
+ void TxFinalRtsFailedTrace (std::string context, Mac48Address address);
+
+ /**
+ * Function to be called when the transmission of a data frame has
+ * exceeded the retry limit
+ *
+ * @param context
+ * @param address the MAC address of the remote station
+ */
+ void TxFinalDataFailedTrace (std::string context, Mac48Address address);
+
+ /**
+ * Function to be called when the PHY layer of the considered
+ * device receives a frame
+ *
+ * @param context
+ * @param packet
+ * @param snr
+ * @param mode
+ * @param preamble
+ */
+ void PhyRxOkTrace (std::string context, Ptr<const Packet> packet, double snr, WifiMode mode, enum WifiPreamble preamble);
+
+ /**
+ * Function to be called when a frame reception by the PHY
+ * layer of the considered device resulted in an error due to a failure in the CRC check of
+ * the frame
+ *
+ * @param context
+ * @param packet
+ * @param snr
+ */
+ void PhyRxErrorTrace (std::string context, Ptr<const Packet> packet, double snr);
+
+ /**
+ * Function to be called when a frame is being transmitted by the
+ * PHY layer of the considered device
+ *
+ * @param context
+ * @param packet
+ * @param mode
+ * @param preamble
+ * @param txPower
+ */
+ void PhyTxTrace (std::string context, Ptr<const Packet> packet, WifiMode mode, WifiPreamble preamble, uint8_t txPower);
+
+ /**
+ * Function to be called when the PHY layer of the considered device
+ * changes state
+ *
+ * @param context
+ * @param start
+ * @param duration
+ * @param state
+ */
+ void PhyStateTrace (std::string context, Time start, Time duration, enum WifiPhy::State state);
+
+ /**
+ * Open a file for output
+ *
+ * @param name the name of the file to be opened.
+ */
+ void Open (std::string const& name);
+
+private:
+
+ /**
+ * @internal
+ */
+ void WriteStats ();
+
+ /**
+ * @internal
+ */
+ void ResetCounters ();
+
+ uint32_t m_txCount;
+ uint32_t m_rxCount;
+ uint32_t m_shortRetryCount;
+ uint32_t m_longRetryCount;
+ uint32_t m_exceededRetryCount;
+ uint32_t m_phyRxOkCount;
+ uint32_t m_phyRxErrorCount;
+ uint32_t m_phyTxCount;
+
+ std::ofstream *m_writer;
+
+ Time m_interval;
+
+}; // class AthstatsWifiTraceSink
+
+
+
+
+} // namespace ns3
+
+
+
+
+#endif /* ATHSTATS_HELPER_H */
--- a/src/wifi/wscript Sat Mar 05 10:51:26 2011 -0800
+++ b/src/wifi/wscript Sat Mar 05 11:47:37 2011 -0800
@@ -63,6 +63,7 @@
'model/block-ack-manager.cc',
'model/block-ack-test-suite.cc',
'model/block-ack-cache.cc',
+ 'helper/athstats-helper.cc',
'helper/wifi-helper.cc',
'helper/yans-wifi-helper.cc',
'helper/nqos-wifi-mac-helper.cc',
@@ -125,6 +126,7 @@
'model/block-ack-agreement.h',
'model/block-ack-manager.h',
'model/block-ack-cache.h',
+ 'helper/athstats-helper.h',
'helper/wifi-helper.h',
'helper/yans-wifi-helper.h',
'helper/nqos-wifi-mac-helper.h',
--- a/src/wimax/examples/wimax-ipv4.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/wimax/examples/wimax-ipv4.cc Sat Mar 05 11:47:37 2011 -0800
@@ -52,7 +52,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/contrib-module.h"
--- a/src/wimax/examples/wimax-multicast.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/wimax/examples/wimax-multicast.cc Sat Mar 05 11:47:37 2011 -0800
@@ -52,7 +52,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/contrib-module.h"
--- a/src/wimax/examples/wimax-simple.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/src/wimax/examples/wimax-simple.cc Sat Mar 05 11:47:37 2011 -0800
@@ -44,7 +44,6 @@
#include "ns3/core-module.h"
#include "ns3/network-module.h"
-#include "ns3/helper-module.h"
#include "ns3/applications-module.h"
#include "ns3/mobility-module.h"
#include "ns3/contrib-module.h"
--- a/src/wscript Sat Mar 05 10:51:26 2011 -0800
+++ b/src/wscript Sat Mar 05 11:47:37 2011 -0800
@@ -37,7 +37,6 @@
'click',
'mobility',
'wifi',
- 'helper',
'netanim',
'stats',
'uan',
--- a/utils/print-introspected-doxygen.cc Sat Mar 05 10:51:26 2011 -0800
+++ b/utils/print-introspected-doxygen.cc Sat Mar 05 11:47:37 2011 -0800
@@ -7,7 +7,6 @@
#include "ns3/log.h"
#include "ns3/global-value.h"
#include "ns3/string.h"
-#include "ns3/helper-module.h"
using namespace ns3;