[Bug 1551] Redux: NS_LOG_COMPONENT_DEFINE inside or outside of ns3 namespace?

This commit is contained in:
Peter D. Barnes, Jr.
2014-09-26 15:51:00 -07:00
parent 3611bd11a5
commit bfdb6ef10a
675 changed files with 1328 additions and 1354 deletions

View File

@@ -31,10 +31,10 @@
#include <vector>
#include <string>
NS_LOG_COMPONENT_DEFINE ("EnergyExample");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("EnergyExample");
static inline std::string
PrintReceivedPacket (Address& from)
{

View File

@@ -60,10 +60,10 @@
#include <vector>
#include <string>
NS_LOG_COMPONENT_DEFINE ("EnergyWithHarvestingExample");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("EnergyWithHarvestingExample");
static inline std::string
PrintReceivedPacket (Address& from)
{

View File

@@ -41,7 +41,6 @@ using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("FragmentationIpv6Example");
int main (int argc, char** argv)
{
bool verbose = false;

View File

@@ -44,6 +44,7 @@
#include "ns3/csma-module.h"
#include "ns3/applications-module.h"
#include "ns3/ipv6-header.h"
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("LooseRoutingIpv6Example");

View File

@@ -24,10 +24,10 @@
#include "ns3/node.h"
#include "ns3/mac48-address.h"
NS_LOG_COMPONENT_DEFINE ("TestIpv6");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("TestIpv6");
int
main (int argc, char *argv[])
{

View File

@@ -49,9 +49,6 @@ using namespace std;
NS_LOG_COMPONENT_DEFINE ("WiFiDistanceExperiment");
void TxCallback (Ptr<CounterCalculator<uint32_t> > datac,
std::string path, Ptr<const Packet> packet) {
NS_LOG_INFO ("Sent frame counted in " <<

View File

@@ -44,7 +44,6 @@ using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("TcpLargeTransfer");
// The number of bytes to send in this simulation.
static const uint32_t totalTxBytes = 2000000;
static uint32_t currentTxBytes = 0;

View File

@@ -16,10 +16,10 @@
#include "ns3/core-module.h"
NS_LOG_COMPONENT_DEFINE ("HelloSimulator");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("HelloSimulator");
int
main (int argc, char *argv[])
{

View File

@@ -64,10 +64,10 @@
#include <iostream>
#include <fstream>
NS_LOG_COMPONENT_DEFINE ("multirate");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("multirate");
class Experiment
{
public:

View File

@@ -27,10 +27,10 @@
#include <iostream>
NS_LOG_COMPONENT_DEFINE ("Main");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("Main");
class Experiment
{
public:

View File

@@ -30,10 +30,10 @@
#include <vector>
#include <string>
NS_LOG_COMPONENT_DEFINE ("Main");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("Main");
class Experiment
{
public:

View File

@@ -84,10 +84,10 @@
#include <vector>
#include <string>
NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhocGrid");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhocGrid");
void ReceivePacket (Ptr<Socket> socket)
{
while (socket->Recv ())

View File

@@ -63,10 +63,10 @@
#include <vector>
#include <string>
NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhoc");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("WifiSimpleAdhoc");
void ReceivePacket (Ptr<Socket> socket)
{
while (socket->Recv ())

View File

@@ -64,10 +64,10 @@
#include <vector>
#include <string>
NS_LOG_COMPONENT_DEFINE ("WifiSimpleInfra");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("WifiSimpleInfra");
void ReceivePacket (Ptr<Socket> socket)
{
while (socket->Recv ())

View File

@@ -92,10 +92,10 @@
#include <vector>
#include <string>
NS_LOG_COMPONENT_DEFINE ("WifiSimpleInterference");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("WifiSimpleInterference");
static inline std::string PrintReceivedPacket (Ptr<Socket> socket)
{
Address addr;

View File

@@ -62,10 +62,10 @@
#include <string>
#include <sstream>
NS_LOG_COMPONENT_DEFINE ("WifiSleep");
using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("WifiSleep");
template <int node>
void RemainingEnergyTrace (double oldValue, double newValue)
{