uan: Doxygen updates for uan tests

This commit is contained in:
Robert Ammon
2017-02-16 21:58:38 -08:00
parent 95ca1a4381
commit 260da767b6
2 changed files with 98 additions and 18 deletions

View File

@@ -40,23 +40,47 @@ using namespace ns3;
NS_LOG_COMPONENT_DEFINE ("UanEnergyModelTestSuite");
/**
* \ingroup uan-test
* \defgroup uan-test uan module tests
*/
/**
* \ingroup uan-test
* \ingroup tests
*
* \brief Acoustic Modem Energy Test Case
*/
class AcousticModemEnergyTestCase : public TestCase
{
public:
AcousticModemEnergyTestCase ();
~AcousticModemEnergyTestCase ();
/**
* Receive packet function
* \param dev the device
* \param pkt the packet
* \param mode the mode
* \param sender the address of the sender
* \returns true if successful
*/
bool RxPacket (Ptr<NetDevice> dev, Ptr<const Packet> pkt, uint16_t mode, const Address &sender);
/**
* Send one packet function
* \param node the node to send to
*/
void SendOnePacket (Ptr<Node> node);
void DoRun (void);
double m_simTime;
uint32_t m_bytesRx;
uint32_t m_sentPackets;
uint32_t m_packetSize;
Ptr<Node> m_node;
Ptr<Node> m_gateway;
double m_simTime; ///< simulation time
uint32_t m_bytesRx; ///< bytes received
uint32_t m_sentPackets; ///< number of sent packets
uint32_t m_packetSize; ///< packet size
Ptr<Node> m_node; ///< node
Ptr<Node> m_gateway; ///< the gateway
};
AcousticModemEnergyTestCase::AcousticModemEnergyTestCase ()
@@ -189,21 +213,32 @@ AcousticModemEnergyTestCase::DoRun ()
Simulator::Destroy ();
}
/**
* \ingroup uan-test
* \ingroup tests
*
* \brief Acoustic Modem Energy Depletion Test Case
*/
class AcousticModemEnergyDepletionTestCase : public TestCase
{
public:
AcousticModemEnergyDepletionTestCase ();
~AcousticModemEnergyDepletionTestCase ();
/// Depletion handler function
void DepletionHandler (void);
/**
* Send one packet function
* \param node the node to send to
*/
void SendOnePacket (Ptr<Node> node);
void DoRun (void);
double m_simTime;
uint32_t m_callbackCount;
uint32_t m_packetSize;
Ptr<Node> m_node;
double m_simTime; ///< Simulation time
uint32_t m_callbackCount; ///< callback count
uint32_t m_packetSize; ///< packet size
Ptr<Node> m_node; ///< the node
};
AcousticModemEnergyDepletionTestCase::AcousticModemEnergyDepletionTestCase ()
@@ -291,7 +326,10 @@ AcousticModemEnergyDepletionTestCase::DoRun (void)
// -------------------------------------------------------------------------- //
/**
* Unit test suite for underwater energy model. Include test on acoustic modem,
* \ingroup uan-test
* \ingroup tests
*
* \brief Unit test suite for underwater energy model. Include test on acoustic modem,
* acoustic modem energy depletion.
*/
class UanEnergyModelTestSuite : public TestSuite

View File

@@ -34,6 +34,12 @@
using namespace ns3;
/**
* \ingroup uan-test
* \ingroup tests
*
* \brief Uan Test
*/
class UanTest : public TestCase
{
public:
@@ -41,13 +47,47 @@ public:
virtual void DoRun (void);
private:
/**
* Create node function
* \param pos the position of the device
* \param chan the communication channel
* \returns the UAN device
*/
Ptr<UanNetDevice> CreateNode (Vector pos, Ptr<UanChannel> chan);
/**
* Phy test function
* \returns true if successful
*/
bool DoPhyTests ();
/**
* Do one Phy test function
* \param t1 the time to send first packet
* \param t2 the time to send the second packet
* \param r1 first distance constant
* \param r2 second distance constant
* \param prop the propagation model
* \param mode1 the send mode for device 1
* \param mode2 the send mode for device 2
* \returns number of bytes received
*/
uint32_t DoOnePhyTest (Time t1, Time t2, uint32_t r1, uint32_t r2, Ptr<UanPropModel> prop, uint32_t mode1 = 0, uint32_t mode2 = 0);
/**
* Receive packet function
* \param dev the device
* \param pkt the packet
* \param mode the receive mode
* \param sender the address of the sender
* \returns true if successful
*/
bool RxPacket (Ptr<NetDevice> dev, Ptr<const Packet> pkt, uint16_t mode, const Address &sender);
/**
* Send one packet function
* \param dev the device
* \param mode the transmit mode
*/
void SendOnePacket (Ptr<UanNetDevice> dev, uint32_t mode);
ObjectFactory m_phyFac;
uint32_t m_bytesRx;
ObjectFactory m_phyFac; ///< Phy
uint32_t m_bytesRx; ///< byes received
};
@@ -240,7 +280,12 @@ UanTest::DoRun (void)
DoPhyTests ();
}
/**
* \ingroup uan-test
* \ingroup tests
*
* \brief Uan Test Suite
*/
class UanTestSuite : public TestSuite
{
public:
@@ -253,8 +298,5 @@ UanTestSuite::UanTestSuite ()
AddTestCase (new UanTest, TestCase::QUICK);
}
static UanTestSuite g_uanTestSuite;
static UanTestSuite g_uanTestSuite; ///< the test suite