[Bug 1551] Redux: NS_LOG_COMPONENT_DEFINE inside or outside of ns3 namespace?
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -41,7 +41,6 @@ using namespace ns3;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("FragmentationIpv6Example");
|
||||
|
||||
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
bool verbose = false;
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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[])
|
||||
{
|
||||
|
||||
@@ -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 " <<
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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[])
|
||||
{
|
||||
|
||||
@@ -64,10 +64,10 @@
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("multirate");
|
||||
|
||||
using namespace ns3;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("multirate");
|
||||
|
||||
class Experiment
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("Main");
|
||||
|
||||
using namespace ns3;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("Main");
|
||||
|
||||
class Experiment
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("Main");
|
||||
|
||||
using namespace ns3;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("Main");
|
||||
|
||||
class Experiment
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -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 ())
|
||||
|
||||
@@ -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 ())
|
||||
|
||||
@@ -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 ())
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user