UAN module code style cleanup

This commit is contained in:
Andrea Sacco
2011-05-04 17:26:02 +02:00
parent f345f9e983
commit 575a1f4b05
8 changed files with 20 additions and 20 deletions

View File

@@ -174,7 +174,7 @@ Experiment::Run (UanHelper &uan)
mobility.Install (sink);
NS_LOG_DEBUG ("Position of sink: "
<< sink.Get (0)->GetObject<MobilityModel> ()->GetPosition ());
<< sink.Get (0)->GetObject<MobilityModel> ()->GetPosition ());
mobility.Install (nc);
PacketSocketAddress socket;
@@ -223,7 +223,7 @@ Experiment::Run (UanHelper &uan)
if (!ascii.is_open ())
{
NS_FATAL_ERROR ("Could not open ascii trace file: "
<< m_asciitracefile);
<< m_asciitracefile);
}
uan.EnableAsciiAll (ascii);
@@ -239,7 +239,7 @@ Experiment::Run (UanHelper &uan)
}
for (uint32_t i=0; i < sink.GetN (); i++)
{
sink.Get (i) = 0;
sink.Get (i) = 0;
}
for (uint32_t i=0; i < devices.GetN (); i++)

View File

@@ -149,7 +149,7 @@ Experiment::Run (uint32_t param)
{
UanHelper uan;
m_bytesTotal=0;
uint32_t nNodes;
@@ -277,7 +277,7 @@ main(int argc, char *argv[])
exp.CreateDualModes (12000);
;
;
Gnuplot2dDataset ds;
for (uint32_t param=exp.m_simMin; param<=exp.m_simMax; param += exp.m_simStep)

View File

@@ -107,7 +107,7 @@ UanChannel::Clear ()
m_noise->Clear ();
m_noise = 0;
}
}
void

View File

@@ -64,7 +64,7 @@ UanMacCw::Clear ()
}
m_sendEvent.Cancel ();
m_txEndEvent.Cancel ();
}
}
void
UanMacCw::DoDispose ()

View File

@@ -372,7 +372,7 @@ UanMacRcGw::StartCycle (void)
}
else
{
m_currentRetryRate = (uint16_t)((thX - m_minRetryRate) / m_retryStep + 0.5) ;
m_currentRetryRate = (uint16_t)((thX - m_minRetryRate) / m_retryStep + 0.5);
}
double actualX = m_currentRetryRate * m_retryStep + m_minRetryRate;

View File

@@ -108,7 +108,7 @@ public:
virtual bool IsMulticast (void) const;
virtual Address GetMulticast (Ipv4Address multicastGroup) const;
virtual Address GetMulticast (Ipv6Address addr) const;
virtual bool IsBridge (void) const ;
virtual bool IsBridge (void) const;
virtual bool IsPointToPoint (void) const;
virtual bool Send (Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber);
virtual bool SendFrom (Ptr<Packet> packet, const Address& source, const Address& dest, uint16_t protocolNumber);

View File

@@ -245,7 +245,7 @@ public:
* Clears all pointer references
*/
virtual void Clear (void);
virtual void DoDispose (void);
};

View File

@@ -150,11 +150,11 @@ UanTest::DoPhyTests ()
// No collision (Get 2 packets)
NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (3.001), 50, 50, prop),
34, "Should have received 34 bytes from 2 disjoint packets");
34, "Should have received 34 bytes from 2 disjoint packets");
// Collision (Lose both packets)
NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (2.99), 50, 50, prop),
0, "Expected collision resulting in loss of both packets");
0, "Expected collision resulting in loss of both packets");
// Phy Gen / FH-FSK SINR check
@@ -172,15 +172,15 @@ UanTest::DoPhyTests ()
// No collision (Get 2 packets)
NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (3.001), 50, 50, prop),
34, "Should have received 34 bytes from 2 disjoint packets");
34, "Should have received 34 bytes from 2 disjoint packets");
// Should correctly receive first arriving packet
NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (1.0126), 50, 50, prop),
17, "Should have recieved 17 bytes from first arriving packet");
17, "Should have recieved 17 bytes from first arriving packet");
// Packets should collide and both be lost
NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (1.0 + 7.01 * (13.0 / 80.0)), 50, 50, prop),
0, "Packets should collide, but received data");
0, "Packets should collide, but received data");
// Phy Dual
UanTxMode mode00 = UanTxModeFactory::CreateMode (UanTxMode::FSK, 80, 80, 10000, 4000, 2, "TestMode00");
@@ -208,19 +208,19 @@ UanTest::DoPhyTests ()
// No collision (Get 2 packets)
NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (3.01), 50, 50, prop),
34, "Expected no collision");
34, "Expected no collision");
NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (2.99), 50, 50, prop, 0, 0),
0, "Expected collision with both packets lost");
0, "Expected collision with both packets lost");
NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (2.99), 50, 50, prop, 0, 2),
17, "Expected collision with only one packets lost");
17, "Expected collision with only one packets lost");
NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (2.99), 50, 50, prop, 0, 5),
34, "Expected no collision");
34, "Expected no collision");
NS_TEST_ASSERT_MSG_EQ_RETURNS_BOOL (DoOnePhyTest (Seconds (1.0), Seconds (2.99), 50, 50, prop, 2, 3),
34, "Expected no collision");
34, "Expected no collision");
return false;
}