wifi: Cleanup copy-pasted macros for logging
This commit is contained in:
committed by
Sébastien Deronne
parent
24e5bbe67d
commit
3f5d421fe7
@@ -31,7 +31,7 @@
|
||||
#include "ns3/wifi-net-device.h"
|
||||
|
||||
#undef NS_LOG_APPEND_CONTEXT
|
||||
#define NS_LOG_APPEND_CONTEXT std::clog << "[link=" << +m_linkId << "][mac=" << m_self << "] "
|
||||
#define NS_LOG_APPEND_CONTEXT WIFI_FEM_NS_LOG_APPEND_CONTEXT
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include "ns3/log.h"
|
||||
|
||||
#undef NS_LOG_APPEND_CONTEXT
|
||||
#define NS_LOG_APPEND_CONTEXT std::clog << "[link=" << +m_linkId << "][mac=" << m_self << "] "
|
||||
#define NS_LOG_APPEND_CONTEXT WIFI_FEM_NS_LOG_APPEND_CONTEXT
|
||||
|
||||
// Time (in nanoseconds) to be added to the PSDU duration to yield the duration
|
||||
// of the timer that is started when the PHY indicates the start of the reception
|
||||
|
||||
@@ -37,6 +37,9 @@
|
||||
|
||||
#include "ns3/object.h"
|
||||
|
||||
#define WIFI_FEM_NS_LOG_APPEND_CONTEXT \
|
||||
std::clog << "[link=" << +m_linkId << "][mac=" << m_self << "] "
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <functional>
|
||||
|
||||
#undef NS_LOG_APPEND_CONTEXT
|
||||
#define NS_LOG_APPEND_CONTEXT std::clog << "[link=" << +m_linkId << "][mac=" << m_self << "] "
|
||||
#define NS_LOG_APPEND_CONTEXT WIFI_FEM_NS_LOG_APPEND_CONTEXT
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <optional>
|
||||
|
||||
#undef NS_LOG_APPEND_CONTEXT
|
||||
#define NS_LOG_APPEND_CONTEXT std::clog << "[link=" << +m_linkId << "][mac=" << m_self << "] "
|
||||
#define NS_LOG_APPEND_CONTEXT WIFI_FEM_NS_LOG_APPEND_CONTEXT
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include "ns3/log.h"
|
||||
|
||||
#undef NS_LOG_APPEND_CONTEXT
|
||||
#define NS_LOG_APPEND_CONTEXT std::clog << "[link=" << +m_linkId << "][mac=" << m_self << "] "
|
||||
#define NS_LOG_APPEND_CONTEXT WIFI_FEM_NS_LOG_APPEND_CONTEXT
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
|
||||
@@ -42,11 +42,7 @@
|
||||
#include "ns3/simulator.h"
|
||||
|
||||
#undef NS_LOG_APPEND_CONTEXT
|
||||
#define NS_LOG_APPEND_CONTEXT \
|
||||
if (m_mac) \
|
||||
{ \
|
||||
std::clog << "[mac=" << m_mac->GetAddress() << "] "; \
|
||||
}
|
||||
#define NS_LOG_APPEND_CONTEXT WIFI_TXOP_NS_LOG_APPEND_CONTEXT
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
|
||||
@@ -34,11 +34,7 @@
|
||||
#include "ns3/socket.h"
|
||||
|
||||
#undef NS_LOG_APPEND_CONTEXT
|
||||
#define NS_LOG_APPEND_CONTEXT \
|
||||
if (m_mac) \
|
||||
{ \
|
||||
std::clog << "[mac=" << m_mac->GetAddress() << "] "; \
|
||||
}
|
||||
#define NS_LOG_APPEND_CONTEXT WIFI_TXOP_NS_LOG_APPEND_CONTEXT
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
|
||||
@@ -30,6 +30,12 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#define WIFI_TXOP_NS_LOG_APPEND_CONTEXT \
|
||||
if (m_mac) \
|
||||
{ \
|
||||
std::clog << "[mac=" << m_mac->GetAddress() << "] "; \
|
||||
}
|
||||
|
||||
class EmlsrUlTxopTest;
|
||||
|
||||
namespace ns3
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "ns3/log.h"
|
||||
|
||||
#undef NS_LOG_APPEND_CONTEXT
|
||||
#define NS_LOG_APPEND_CONTEXT std::clog << "[link=" << +m_linkId << "][mac=" << m_self << "] "
|
||||
#define NS_LOG_APPEND_CONTEXT WIFI_FEM_NS_LOG_APPEND_CONTEXT
|
||||
|
||||
namespace ns3
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user