diff --git a/src/wifi/model/eht/eht-frame-exchange-manager.cc b/src/wifi/model/eht/eht-frame-exchange-manager.cc index 3e5b6ad96..1c5b5baed 100644 --- a/src/wifi/model/eht/eht-frame-exchange-manager.cc +++ b/src/wifi/model/eht/eht-frame-exchange-manager.cc @@ -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 { diff --git a/src/wifi/model/frame-exchange-manager.cc b/src/wifi/model/frame-exchange-manager.cc index ab924bfab..1e7eedf4c 100644 --- a/src/wifi/model/frame-exchange-manager.cc +++ b/src/wifi/model/frame-exchange-manager.cc @@ -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 diff --git a/src/wifi/model/frame-exchange-manager.h b/src/wifi/model/frame-exchange-manager.h index 69bc995e3..fbd8ec4cb 100644 --- a/src/wifi/model/frame-exchange-manager.h +++ b/src/wifi/model/frame-exchange-manager.h @@ -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 { diff --git a/src/wifi/model/he/he-frame-exchange-manager.cc b/src/wifi/model/he/he-frame-exchange-manager.cc index 04d5e26f7..26578e184 100644 --- a/src/wifi/model/he/he-frame-exchange-manager.cc +++ b/src/wifi/model/he/he-frame-exchange-manager.cc @@ -37,7 +37,7 @@ #include #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 { diff --git a/src/wifi/model/ht/ht-frame-exchange-manager.cc b/src/wifi/model/ht/ht-frame-exchange-manager.cc index fbb22eb7c..bb353186b 100644 --- a/src/wifi/model/ht/ht-frame-exchange-manager.cc +++ b/src/wifi/model/ht/ht-frame-exchange-manager.cc @@ -35,7 +35,7 @@ #include #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 { diff --git a/src/wifi/model/qos-frame-exchange-manager.cc b/src/wifi/model/qos-frame-exchange-manager.cc index 1bc8effbc..6c6f97ed1 100644 --- a/src/wifi/model/qos-frame-exchange-manager.cc +++ b/src/wifi/model/qos-frame-exchange-manager.cc @@ -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 { diff --git a/src/wifi/model/qos-txop.cc b/src/wifi/model/qos-txop.cc index d8428c840..0c135bf7d 100644 --- a/src/wifi/model/qos-txop.cc +++ b/src/wifi/model/qos-txop.cc @@ -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 { diff --git a/src/wifi/model/txop.cc b/src/wifi/model/txop.cc index c88d2c7e6..a56d62fee 100644 --- a/src/wifi/model/txop.cc +++ b/src/wifi/model/txop.cc @@ -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 { diff --git a/src/wifi/model/txop.h b/src/wifi/model/txop.h index 6eb59c7ce..11140f5e9 100644 --- a/src/wifi/model/txop.h +++ b/src/wifi/model/txop.h @@ -30,6 +30,12 @@ #include #include +#define WIFI_TXOP_NS_LOG_APPEND_CONTEXT \ + if (m_mac) \ + { \ + std::clog << "[mac=" << m_mac->GetAddress() << "] "; \ + } + class EmlsrUlTxopTest; namespace ns3 diff --git a/src/wifi/model/vht/vht-frame-exchange-manager.cc b/src/wifi/model/vht/vht-frame-exchange-manager.cc index c422c6ed9..b854cdecd 100644 --- a/src/wifi/model/vht/vht-frame-exchange-manager.cc +++ b/src/wifi/model/vht/vht-frame-exchange-manager.cc @@ -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 {