make trailing ';' mandatory with NS_DEBUG macros. fix all invalid uses.
This commit is contained in:
@@ -30,18 +30,18 @@ namespace ns3 {
|
||||
|
||||
Channel::Channel ()
|
||||
{
|
||||
NS_DEBUG("Channel::Channel ()")
|
||||
NS_DEBUG("Channel::Channel ()");
|
||||
}
|
||||
|
||||
Channel::~Channel ()
|
||||
{
|
||||
NS_DEBUG("Channel::~Channel ()")
|
||||
NS_DEBUG("Channel::~Channel ()");
|
||||
}
|
||||
|
||||
bool
|
||||
Channel::DoConnectToUpper (LayerConnectorUpper &upper)
|
||||
{
|
||||
NS_DEBUG("Channel::DoConnectToUpper (" << &upper << ")")
|
||||
NS_DEBUG("Channel::DoConnectToUpper (" << &upper << ")");
|
||||
m_connectorList.push_back(&upper);
|
||||
|
||||
return true;
|
||||
@@ -50,15 +50,15 @@ Channel::DoConnectToUpper (LayerConnectorUpper &upper)
|
||||
bool
|
||||
Channel::LowerDoNotify (LayerConnectorUpper *upper)
|
||||
{
|
||||
NS_DEBUG("Channel::LowerDoNotify ()")
|
||||
NS_DEBUG("Channel::LowerDoNotify ()");
|
||||
|
||||
Packet p;
|
||||
|
||||
NS_DEBUG("Channel::LowerDoNotify (): Starting pull")
|
||||
NS_DEBUG("Channel::LowerDoNotify (): Starting pull");
|
||||
|
||||
upper->UpperPull(p);
|
||||
|
||||
NS_DEBUG("Channel::LowerDoNotify (): Got bits, Propagate()")
|
||||
NS_DEBUG("Channel::LowerDoNotify (): Got bits, Propagate()");
|
||||
|
||||
return Propagate(p);
|
||||
}
|
||||
@@ -66,7 +66,7 @@ Channel::LowerDoNotify (LayerConnectorUpper *upper)
|
||||
bool
|
||||
Channel::Propagate (Packet &p)
|
||||
{
|
||||
NS_DEBUG("Channel::Propagate (" << &p << ")")
|
||||
NS_DEBUG("Channel::Propagate (" << &p << ")");
|
||||
|
||||
for (ConnectorList::const_iterator i = m_connectorList.begin ();
|
||||
i != m_connectorList.end ();
|
||||
|
||||
@@ -91,14 +91,14 @@ DropTailQueue::DoDeque (Packet& p)
|
||||
|
||||
if (m_packets.empty())
|
||||
{
|
||||
NS_DEBUG("DropTailQueue::DoDeque (): Queue empty")
|
||||
NS_DEBUG("DropTailQueue::DoDeque (): Queue empty");
|
||||
return false;
|
||||
}
|
||||
|
||||
p = m_packets.front ();
|
||||
m_packets.pop ();
|
||||
|
||||
NS_DEBUG("DropTailQueue::DoDeque (): Popped " << &p << " <= true")
|
||||
NS_DEBUG("DropTailQueue::DoDeque (): Popped " << &p << " <= true");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -31,18 +31,18 @@ namespace ns3 {
|
||||
|
||||
LayerConnectorUpper::LayerConnectorUpper ()
|
||||
{
|
||||
NS_DEBUG("LayerConnectorUpper::LayerConnectorUpper ()")
|
||||
NS_DEBUG("LayerConnectorUpper::LayerConnectorUpper ()");
|
||||
}
|
||||
|
||||
LayerConnectorUpper::~LayerConnectorUpper ()
|
||||
{
|
||||
NS_DEBUG("LayerConnectorUpper::~LayerConnectorUpper ()")
|
||||
NS_DEBUG("LayerConnectorUpper::~LayerConnectorUpper ()");
|
||||
}
|
||||
|
||||
bool
|
||||
LayerConnectorUpper::ConnectToLower (LayerConnectorLower &partner)
|
||||
{
|
||||
NS_DEBUG("LayerConnectorUpper::ConnectToLower (" << &partner << ")")
|
||||
NS_DEBUG("LayerConnectorUpper::ConnectToLower (" << &partner << ")");
|
||||
|
||||
return DoConnectToLower(partner);
|
||||
}
|
||||
@@ -50,7 +50,7 @@ LayerConnectorUpper::ConnectToLower (LayerConnectorLower &partner)
|
||||
bool
|
||||
LayerConnectorUpper::DoConnectToLower (LayerConnectorLower &partner)
|
||||
{
|
||||
NS_DEBUG("LayerConnectorUpper::DoConnectToLower (" << &partner << ")")
|
||||
NS_DEBUG("LayerConnectorUpper::DoConnectToLower (" << &partner << ")");
|
||||
|
||||
m_lowerPartner = &partner;
|
||||
NS_ASSERT (m_lowerPartner);
|
||||
@@ -60,7 +60,7 @@ LayerConnectorUpper::DoConnectToLower (LayerConnectorLower &partner)
|
||||
bool
|
||||
LayerConnectorUpper::UpperSendUp (Packet &p)
|
||||
{
|
||||
NS_DEBUG("LayerConnectorUpper::UpperSendUp (" << &p << ")")
|
||||
NS_DEBUG("LayerConnectorUpper::UpperSendUp (" << &p << ")");
|
||||
|
||||
return UpperDoSendUp(p);
|
||||
}
|
||||
@@ -68,7 +68,7 @@ LayerConnectorUpper::UpperSendUp (Packet &p)
|
||||
bool
|
||||
LayerConnectorUpper::UpperPull (Packet &p)
|
||||
{
|
||||
NS_DEBUG("LayerConnectorUpper::UpperPull (" << &p << ")")
|
||||
NS_DEBUG("LayerConnectorUpper::UpperPull (" << &p << ")");
|
||||
|
||||
return UpperDoPull(p);
|
||||
}
|
||||
@@ -76,7 +76,7 @@ LayerConnectorUpper::UpperPull (Packet &p)
|
||||
bool
|
||||
LayerConnectorUpper::UpperNotify ()
|
||||
{
|
||||
NS_DEBUG("LayerConnectorUpper::UpperNotify ()")
|
||||
NS_DEBUG("LayerConnectorUpper::UpperNotify ()");
|
||||
|
||||
NS_ASSERT (m_lowerPartner);
|
||||
return m_lowerPartner->LowerNotify(this);
|
||||
@@ -84,18 +84,18 @@ LayerConnectorUpper::UpperNotify ()
|
||||
|
||||
LayerConnectorLower::LayerConnectorLower ()
|
||||
{
|
||||
NS_DEBUG("LayerConnectorLower::LayerConnectorLower ()")
|
||||
NS_DEBUG("LayerConnectorLower::LayerConnectorLower ()");
|
||||
}
|
||||
|
||||
LayerConnectorLower::~LayerConnectorLower ()
|
||||
{
|
||||
NS_DEBUG("LayerConnectorLower::~LayerConnectorLower ()")
|
||||
NS_DEBUG("LayerConnectorLower::~LayerConnectorLower ()");
|
||||
}
|
||||
|
||||
bool
|
||||
LayerConnectorLower::ConnectToUpper (LayerConnectorUpper &partner)
|
||||
{
|
||||
NS_DEBUG("LayerConnectorLower::ConnectToUpper (" << &partner << ")")
|
||||
NS_DEBUG("LayerConnectorLower::ConnectToUpper (" << &partner << ")");
|
||||
|
||||
return DoConnectToUpper(partner);
|
||||
}
|
||||
@@ -103,7 +103,7 @@ LayerConnectorLower::ConnectToUpper (LayerConnectorUpper &partner)
|
||||
bool
|
||||
LayerConnectorLower::DoConnectToUpper (LayerConnectorUpper &partner)
|
||||
{
|
||||
NS_DEBUG("LayerConnectorLower::DoConnectToUpper (" << &partner << ")")
|
||||
NS_DEBUG("LayerConnectorLower::DoConnectToUpper (" << &partner << ")");
|
||||
|
||||
m_upperPartner = &partner;
|
||||
NS_ASSERT (m_upperPartner);
|
||||
@@ -113,7 +113,7 @@ LayerConnectorLower::DoConnectToUpper (LayerConnectorUpper &partner)
|
||||
bool
|
||||
LayerConnectorLower::LowerSendUp (Packet &p)
|
||||
{
|
||||
NS_DEBUG("LayerConnectorLower::LowerSendUp (" << &p << ")")
|
||||
NS_DEBUG("LayerConnectorLower::LowerSendUp (" << &p << ")");
|
||||
|
||||
NS_ASSERT (m_upperPartner);
|
||||
return m_upperPartner->UpperSendUp(p);
|
||||
@@ -122,7 +122,7 @@ LayerConnectorLower::LowerSendUp (Packet &p)
|
||||
bool
|
||||
LayerConnectorLower::LowerPull (Packet &p)
|
||||
{
|
||||
NS_DEBUG("LayerConnectorLower::LowerPull (" << &p << ")")
|
||||
NS_DEBUG("LayerConnectorLower::LowerPull (" << &p << ")");
|
||||
|
||||
NS_ASSERT (m_upperPartner);
|
||||
return m_upperPartner->UpperPull(p);
|
||||
@@ -131,7 +131,7 @@ LayerConnectorLower::LowerPull (Packet &p)
|
||||
bool
|
||||
LayerConnectorLower::LowerNotify (LayerConnectorUpper *upper)
|
||||
{
|
||||
NS_DEBUG("LayerConnectorLower::LowerNotify ()")
|
||||
NS_DEBUG("LayerConnectorLower::LowerNotify ()");
|
||||
return LowerDoNotify(upper);
|
||||
}
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ Queue::GetTotalDroppedPackets (void)
|
||||
void
|
||||
Queue::ResetStatistics (void)
|
||||
{
|
||||
NS_DEBUG("Queue::ResetStatistics ()")
|
||||
NS_DEBUG("Queue::ResetStatistics ()");
|
||||
|
||||
m_nTotalReceivedBytes = 0;
|
||||
m_nTotalReceivedPackets = 0;
|
||||
|
||||
@@ -37,8 +37,7 @@ namespace ns3 {
|
||||
SerialNetDevice::SerialNetDevice(Node* node, const MacAddress& addr) :
|
||||
NetDevice(node, addr)
|
||||
{
|
||||
NS_DEBUG (
|
||||
"SerialNetDevice::SerialNetDevice (" << node << ", " << &addr << ")")
|
||||
NS_DEBUG ("SerialNetDevice::SerialNetDevice (" << node << ", " << &addr << ")");
|
||||
|
||||
// BUGBUG FIXME
|
||||
//
|
||||
@@ -53,16 +52,14 @@ SerialNetDevice::SerialNetDevice(Node* node, const MacAddress& addr) :
|
||||
|
||||
SerialNetDevice::~SerialNetDevice()
|
||||
{
|
||||
NS_DEBUG (
|
||||
"SerialNetDevice::~SerialNetDevice ()")
|
||||
NS_DEBUG ("SerialNetDevice::~SerialNetDevice ()");
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SerialNetDevice::SendTo (Packet& p, const MacAddress& dest)
|
||||
{
|
||||
NS_DEBUG (
|
||||
"SerialNetDevice::SendTo (" << &p << ", " << &dest << ")")
|
||||
NS_DEBUG ("SerialNetDevice::SendTo (" << &p << ", " << &dest << ")");
|
||||
|
||||
assert (IsLinkUp ());
|
||||
|
||||
@@ -82,8 +79,7 @@ SerialNetDevice::SendTo (Packet& p, const MacAddress& dest)
|
||||
bool
|
||||
SerialNetDevice::Attach (SerialChannel* ch)
|
||||
{
|
||||
NS_DEBUG (
|
||||
"SerialNetDevice::Attach (" << &ch << ")")
|
||||
NS_DEBUG ("SerialNetDevice::Attach (" << &ch << ")");
|
||||
|
||||
m_channel = ch;
|
||||
/*
|
||||
@@ -101,8 +97,7 @@ SerialNetDevice::Attach (SerialChannel* ch)
|
||||
void
|
||||
SerialNetDevice::AddQueue (Queue* q)
|
||||
{
|
||||
NS_DEBUG (
|
||||
"SerialNetDevice::AddQueue (" << q << ")")
|
||||
NS_DEBUG ("SerialNetDevice::AddQueue (" << q << ")");
|
||||
|
||||
m_queue = q;
|
||||
}
|
||||
@@ -111,8 +106,7 @@ void
|
||||
SerialNetDevice::Receive (Packet& p)
|
||||
{
|
||||
// ignore return value for now.
|
||||
NS_DEBUG (
|
||||
"SerialNetDevice::Receive (" << &p << ")")
|
||||
NS_DEBUG ("SerialNetDevice::Receive (" << &p << ")");
|
||||
|
||||
// Dispatch this to SerialPhy::Receive
|
||||
m_phy->Receive (p);
|
||||
@@ -121,8 +115,7 @@ SerialNetDevice::Receive (Packet& p)
|
||||
void
|
||||
SerialNetDevice::NotifyDataAvailable(void)
|
||||
{
|
||||
NS_DEBUG (
|
||||
"SerialNetDevice::NotifyDataAvailable ()")
|
||||
NS_DEBUG ("SerialNetDevice::NotifyDataAvailable ()");
|
||||
|
||||
Packet p;
|
||||
bool found = GetQueue ()->Deque (p);
|
||||
@@ -133,8 +126,7 @@ SerialNetDevice::NotifyDataAvailable(void)
|
||||
p.PeekTag (tag);
|
||||
// send packet to address tag.address
|
||||
#endif
|
||||
NS_DEBUG (
|
||||
"SerialNetDevice::NotifyDataAvailable (): Dequeued")
|
||||
NS_DEBUG ("SerialNetDevice::NotifyDataAvailable (): Dequeued");
|
||||
m_channel->Send(p, this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,21 +32,18 @@ namespace ns3 {
|
||||
SerialPhy::SerialPhy(Node* node, SerialNetDevice* netdevice) :
|
||||
m_node(node), m_netdevice(netdevice)
|
||||
{
|
||||
NS_DEBUG (
|
||||
"SerialPhy::SerialPhy (" << node << ", " << netdevice << ")")
|
||||
NS_DEBUG ("SerialPhy::SerialPhy (" << node << ", " << netdevice << ")");
|
||||
}
|
||||
|
||||
SerialPhy::~SerialPhy()
|
||||
{
|
||||
NS_DEBUG (
|
||||
"SerialPhy::~SerialPhy ()")
|
||||
NS_DEBUG ("SerialPhy::~SerialPhy ()");
|
||||
}
|
||||
|
||||
void
|
||||
SerialPhy::NotifyDataAvailable(void)
|
||||
{
|
||||
NS_DEBUG (
|
||||
"SerialPhy::NotifyDataAvailable ()")
|
||||
NS_DEBUG ("SerialPhy::NotifyDataAvailable ()");
|
||||
|
||||
Packet p;
|
||||
bool found = m_netdevice->GetQueue ()->Deque (p);
|
||||
@@ -57,8 +54,7 @@ SerialPhy::NotifyDataAvailable(void)
|
||||
p.PeekTag (tag);
|
||||
// send packet to address tag.address
|
||||
#endif
|
||||
NS_DEBUG (
|
||||
"SerialPhy::NotifyDataAvailable (): Dequeued")
|
||||
NS_DEBUG ("SerialPhy::NotifyDataAvailable (): Dequeued");
|
||||
m_netdevice->GetChannel()->Send(p, m_netdevice);
|
||||
}
|
||||
}
|
||||
@@ -66,8 +62,7 @@ SerialPhy::NotifyDataAvailable(void)
|
||||
void
|
||||
SerialPhy::Receive (Packet& p)
|
||||
{
|
||||
NS_DEBUG (
|
||||
"SerialPhy::Receive (" << &p << ")")
|
||||
NS_DEBUG ("SerialPhy::Receive (" << &p << ")");
|
||||
|
||||
m_netdevice->ForwardUp (p);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user