From 28e764173c9abc0be887ac6330e4c2938b3c1d6d Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Thu, 28 Mar 2024 14:41:20 -0700 Subject: [PATCH] network: Remove logging of ns3::Node getters --- src/network/model/node.cc | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/network/model/node.cc b/src/network/model/node.cc index 886a175fe..dcf14110d 100644 --- a/src/network/model/node.cc +++ b/src/network/model/node.cc @@ -116,21 +116,18 @@ Node::~Node() uint32_t Node::GetId() const { - NS_LOG_FUNCTION(this); return m_id; } Time Node::GetLocalTime() const { - NS_LOG_FUNCTION(this); return Simulator::Now(); } uint32_t Node::GetSystemId() const { - NS_LOG_FUNCTION(this); return m_sid; } @@ -151,7 +148,6 @@ Node::AddDevice(Ptr device) Ptr Node::GetDevice(uint32_t index) const { - NS_LOG_FUNCTION(this << index); NS_ASSERT_MSG(index < m_devices.size(), "Device index " << index << " is out of range (only have " << m_devices.size() << " devices)."); @@ -161,7 +157,6 @@ Node::GetDevice(uint32_t index) const uint32_t Node::GetNDevices() const { - NS_LOG_FUNCTION(this); return m_devices.size(); } @@ -179,7 +174,6 @@ Node::AddApplication(Ptr application) Ptr Node::GetApplication(uint32_t index) const { - NS_LOG_FUNCTION(this << index); NS_ASSERT_MSG(index < m_applications.size(), "Application index " << index << " is out of range (only have " << m_applications.size() << " applications)."); @@ -189,7 +183,6 @@ Node::GetApplication(uint32_t index) const uint32_t Node::GetNApplications() const { - NS_LOG_FUNCTION(this); return m_applications.size(); } @@ -284,7 +277,6 @@ Node::UnregisterProtocolHandler(ProtocolHandler handler) bool Node::ChecksumEnabled() { - NS_LOG_FUNCTION_NOARGS(); BooleanValue val; g_checksumEnabled.GetValue(val); return val.Get(); @@ -333,9 +325,6 @@ Node::ReceiveFromDevice(Ptr device, "Received packet with erroneous context ; " << "make sure the channels in use are correctly updating events context " << "when transferring events from one node to another."); - NS_LOG_DEBUG("Node " << GetId() << " ReceiveFromDevice: dev " << device->GetIfIndex() - << " (type=" << device->GetInstanceTypeId().GetName() << ") Packet UID " - << packet->GetUid()); bool found = false; for (auto i = m_handlers.begin(); i != m_handlers.end(); i++) @@ -352,6 +341,9 @@ Node::ReceiveFromDevice(Ptr device, } } } + NS_LOG_DEBUG("Node " << GetId() << " ReceiveFromDevice: dev " << device->GetIfIndex() + << " (type=" << device->GetInstanceTypeId().GetName() << ") Packet UID " + << packet->GetUid() << " handler found: " << found); return found; }