lr-wpan: doxygen updates (thanks to Robert Ammon)
This commit is contained in:
@@ -32,6 +32,8 @@ namespace ns3 {
|
||||
class UniformRandomVariable;
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan
|
||||
*
|
||||
* This method informs the MAC whether the channel is idle or busy.
|
||||
*/
|
||||
typedef Callback<void, LrWpanMacState> LrWpanMacStateCallback;
|
||||
|
||||
@@ -44,6 +44,7 @@ public:
|
||||
|
||||
/**
|
||||
* Create a LrWpanLqiTag with the given LQI value.
|
||||
* \param lqi The LQI.
|
||||
*/
|
||||
LrWpanLqiTag (uint8_t lqi);
|
||||
|
||||
|
||||
@@ -470,7 +470,7 @@ private:
|
||||
{
|
||||
uint32_t m_auxKeyIdKeySrc32; //!< Auxiliary security header - Key Source (4 Octets)
|
||||
uint64_t m_auxKeyIdKeySrc64; //!< Auxiliary security header - Key Source (8 Octets)
|
||||
};
|
||||
}; //!< Auxiliary security header
|
||||
|
||||
uint8_t m_auxKeyIdKeyIndex; //!< Auxiliary security header - Key Index (1 Octet)
|
||||
|
||||
|
||||
@@ -115,10 +115,12 @@ public:
|
||||
virtual Ptr<Channel> GetChannel (void) const;
|
||||
/**
|
||||
* This method indirects to LrWpanMac::SetShortAddress ()
|
||||
* \param address The short address.
|
||||
*/
|
||||
virtual void SetAddress (Address address);
|
||||
/**
|
||||
* This method indirects to LrWpanMac::SetShortAddress ()
|
||||
* \returns The short address.
|
||||
*/
|
||||
virtual Address GetAddress (void) const;
|
||||
virtual bool SetMtu (const uint16_t mtu);
|
||||
|
||||
@@ -595,6 +595,7 @@ private:
|
||||
/**
|
||||
* Calculate the time required for sending the PPDU header, that is the
|
||||
* preamble, SFD and PHR.
|
||||
* \returns The time required for sending the PPDU header.
|
||||
*/
|
||||
Time GetPpduHeaderTxTime (void);
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ struct LrWpanSpectrumSignalParameters : public SpectrumSignalParameters
|
||||
|
||||
/**
|
||||
* copy constructor
|
||||
* \param p the object to copy from.
|
||||
*/
|
||||
LrWpanSpectrumSignalParameters (const LrWpanSpectrumSignalParameters& p);
|
||||
|
||||
|
||||
@@ -34,26 +34,48 @@
|
||||
|
||||
using namespace ns3;
|
||||
|
||||
using namespace ns3;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("lr-wpan-ack-test");
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan
|
||||
* \defgroup lr-wpan-test LrWpan module tests
|
||||
*/
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan-test
|
||||
* \ingroup tests
|
||||
*
|
||||
* \brief LrWpan ACK Test
|
||||
*/
|
||||
class LrWpanAckTestCase : public TestCase
|
||||
{
|
||||
public:
|
||||
LrWpanAckTestCase ();
|
||||
|
||||
/**
|
||||
* \brief Function called when DataIndication is hit.
|
||||
* \param testCase The TestCase.
|
||||
* \param dev The LrWpanNetDevice.
|
||||
* \param params The MCPS params.
|
||||
* \param p the packet.
|
||||
*/
|
||||
static void DataIndication (LrWpanAckTestCase *testCase, Ptr<LrWpanNetDevice> dev, McpsDataIndicationParams params, Ptr<Packet> p);
|
||||
/**
|
||||
* \brief Function called when DataConfirm is hit.
|
||||
* \param testCase The TestCase.
|
||||
* \param dev The LrWpanNetDevice.
|
||||
* \param params The MCPS params.
|
||||
*/
|
||||
static void DataConfirm (LrWpanAckTestCase *testCase, Ptr<LrWpanNetDevice> dev, McpsDataConfirmParams params);
|
||||
|
||||
private:
|
||||
virtual void DoRun (void);
|
||||
|
||||
Time m_requestTime;
|
||||
Time m_requestAckTime;
|
||||
Time m_replyTime;
|
||||
Time m_replyAckTime;
|
||||
Time m_replyArrivalTime;
|
||||
Time m_requestTime; //!< Request time.
|
||||
Time m_requestAckTime; //!< Request ack time.
|
||||
Time m_replyTime; //!< Reply time.
|
||||
Time m_replyAckTime; //!< Reply ack time.
|
||||
Time m_replyArrivalTime; //!< Reply arrival time.
|
||||
};
|
||||
|
||||
LrWpanAckTestCase::LrWpanAckTestCase ()
|
||||
@@ -108,7 +130,7 @@ LrWpanAckTestCase::DoRun (void)
|
||||
// Test setup:
|
||||
// Two nodes well in communication range.
|
||||
// Node 1 sends a request packet to node 2 with ACK request bit set. Node 2
|
||||
// immediately answers with a reply packet on receiption of the request.
|
||||
// immediately answers with a reply packet on reception of the request.
|
||||
// We expect the ACK of the request packet to always arrive at node 1 before
|
||||
// the reply packet sent by node 2.
|
||||
|
||||
@@ -192,6 +214,12 @@ LrWpanAckTestCase::DoRun (void)
|
||||
Simulator::Destroy ();
|
||||
}
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan-test
|
||||
* \ingroup tests
|
||||
*
|
||||
* \brief LrWpan ACK TestSuite
|
||||
*/
|
||||
class LrWpanAckTestSuite : public TestSuite
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -39,22 +39,66 @@ using namespace ns3;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("lr-wpan-clear-channel-assessment-test");
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan-test
|
||||
* \ingroup tests
|
||||
*
|
||||
* \brief LrWpan CCA Test
|
||||
*/
|
||||
class LrWpanCcaTestCase : public TestCase
|
||||
{
|
||||
public:
|
||||
LrWpanCcaTestCase ();
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* \brief Function called when PlmeCcaConfirm is hit.
|
||||
* \param testcase The TestCase.
|
||||
* \param device The LrWpanNetDevice.
|
||||
* \param status The device status.
|
||||
*/
|
||||
static void PlmeCcaConfirm (LrWpanCcaTestCase *testcase, Ptr<LrWpanNetDevice> device, LrWpanPhyEnumeration status);
|
||||
/**
|
||||
* \brief Function called when PhyTxBegin is hit.
|
||||
* \param testcase The TestCase.
|
||||
* \param device The LrWpanNetDevice.
|
||||
* \param packet The packet.
|
||||
*/
|
||||
static void PhyTxBegin (LrWpanCcaTestCase *testcase, Ptr<LrWpanNetDevice> device, Ptr<const Packet> packet);
|
||||
/**
|
||||
* \brief Function called when PhyTxEnd is hit.
|
||||
* \param testcase The TestCase.
|
||||
* \param device The LrWpanNetDevice.
|
||||
* \param packet The packet.
|
||||
*/
|
||||
static void PhyTxEnd (LrWpanCcaTestCase *testcase, Ptr<LrWpanNetDevice> device, Ptr<const Packet> packet);
|
||||
/**
|
||||
* \brief Function called when PhyRxBegin is hit.
|
||||
* \param testcase The TestCase.
|
||||
* \param device The LrWpanNetDevice.
|
||||
* \param packet The packet.
|
||||
*/
|
||||
static void PhyRxBegin (LrWpanCcaTestCase *testcase, Ptr<LrWpanNetDevice> device, Ptr<const Packet> packet);
|
||||
/**
|
||||
* \brief Function called when PhyRxEnd is hit.
|
||||
* \param testcase The TestCase.
|
||||
* \param device The LrWpanNetDevice.
|
||||
* \param packet The packet.
|
||||
* \param sinr The received SINR.
|
||||
*/
|
||||
static void PhyRxEnd (LrWpanCcaTestCase *testcase, Ptr<LrWpanNetDevice> device, Ptr<const Packet> packet, double sinr);
|
||||
/**
|
||||
* \brief Function called when PhyRxDrop is hit.
|
||||
* \param testcase The TestCase.
|
||||
* \param device The LrWpanNetDevice.
|
||||
* \param packet The packet.
|
||||
*/
|
||||
static void PhyRxDrop (LrWpanCcaTestCase *testcase, Ptr<LrWpanNetDevice> device, Ptr<const Packet> packet);
|
||||
|
||||
virtual void DoRun (void);
|
||||
|
||||
LrWpanPhyEnumeration m_status;
|
||||
LrWpanPhyEnumeration m_status; //!< PHY status.
|
||||
|
||||
};
|
||||
|
||||
@@ -250,6 +294,12 @@ LrWpanCcaTestCase::DoRun (void)
|
||||
Simulator::Destroy ();
|
||||
}
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan-test
|
||||
* \ingroup tests
|
||||
*
|
||||
* \brief LrWpan ACK TestSuite
|
||||
*/
|
||||
class LrWpanCcaTestSuite : public TestSuite
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -33,18 +33,28 @@ using namespace ns3;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("lr-wpan-collision-test");
|
||||
|
||||
// This is an example TestCase.
|
||||
/**
|
||||
* \ingroup lr-wpan-test
|
||||
* \ingroup tests
|
||||
*
|
||||
* \brief LrWpan Collision Test
|
||||
*/
|
||||
class LrWpanCollisionTestCase : public TestCase
|
||||
{
|
||||
public:
|
||||
LrWpanCollisionTestCase ();
|
||||
virtual ~LrWpanCollisionTestCase ();
|
||||
|
||||
void DataIndication (McpsDataIndicationParams params, Ptr<Packet> p);
|
||||
/**
|
||||
* \brief Function called when DataIndication is hit.
|
||||
* \param params The MCPS params.
|
||||
* \param p The packet.
|
||||
*/
|
||||
void DataIndication (McpsDataIndicationParams params, Ptr<Packet> p);
|
||||
private:
|
||||
virtual void DoRun (void);
|
||||
|
||||
uint8_t m_rxPackets;
|
||||
uint8_t m_rxPackets; //!< Rx packets counter.
|
||||
};
|
||||
|
||||
LrWpanCollisionTestCase::LrWpanCollisionTestCase ()
|
||||
@@ -214,7 +224,12 @@ LrWpanCollisionTestCase::DoRun (void)
|
||||
Simulator::Destroy ();
|
||||
}
|
||||
|
||||
// ==============================================================================
|
||||
/**
|
||||
* \ingroup lr-wpan-test
|
||||
* \ingroup tests
|
||||
*
|
||||
* \brief LrWpan Collision TestSuite
|
||||
*/
|
||||
class LrWpanCollisionTestSuite : public TestSuite
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -38,6 +38,12 @@ using namespace ns3;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("lr-wpan-energy-detection-test");
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan-test
|
||||
* \ingroup tests
|
||||
*
|
||||
* \brief LrWpan Energy Detection Test
|
||||
*/
|
||||
class LrWpanEdTestCase : public TestCase
|
||||
{
|
||||
public:
|
||||
@@ -46,10 +52,15 @@ public:
|
||||
private:
|
||||
virtual void DoRun (void);
|
||||
|
||||
/**
|
||||
* \brief Function called when PlmeEdConfirm is hit.
|
||||
* \param status The PHY status.
|
||||
* \param level The ED level.
|
||||
*/
|
||||
void PlmeEdConfirm (LrWpanPhyEnumeration status, uint8_t level);
|
||||
|
||||
LrWpanPhyEnumeration m_status;
|
||||
uint8_t m_level;
|
||||
LrWpanPhyEnumeration m_status; //!< PHY status.
|
||||
uint8_t m_level; //!< ED level.
|
||||
};
|
||||
|
||||
LrWpanEdTestCase::LrWpanEdTestCase ()
|
||||
@@ -243,6 +254,12 @@ LrWpanEdTestCase::DoRun (void)
|
||||
Simulator::Destroy ();
|
||||
}
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan-test
|
||||
* \ingroup tests
|
||||
*
|
||||
* \brief LrWpan Energy Detection TestSuite
|
||||
*/
|
||||
class LrWpanEdTestSuite : public TestSuite
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -37,11 +37,22 @@ using namespace ns3;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("lr-wpan-error-model-test");
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan-test
|
||||
* \ingroup tests
|
||||
*
|
||||
* \brief LrWpan Error Vs Distance Test
|
||||
*/
|
||||
class LrWpanErrorDistanceTestCase : public TestCase
|
||||
{
|
||||
public:
|
||||
LrWpanErrorDistanceTestCase ();
|
||||
virtual ~LrWpanErrorDistanceTestCase ();
|
||||
|
||||
/**
|
||||
* \brief Get the number of received packets.
|
||||
* \returns The number of received packets.
|
||||
*/
|
||||
uint32_t GetReceived (void) const
|
||||
{
|
||||
return m_received;
|
||||
@@ -49,10 +60,22 @@ public:
|
||||
|
||||
private:
|
||||
virtual void DoRun (void);
|
||||
|
||||
/**
|
||||
* \brief Function to be called when a packet is received.
|
||||
* \param params MCPS params.
|
||||
* \param p The packet.
|
||||
*/
|
||||
void Callback (McpsDataIndicationParams params, Ptr<Packet> p);
|
||||
uint32_t m_received;
|
||||
uint32_t m_received; //!< The number of received packets.
|
||||
};
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan-test
|
||||
* \ingroup tests
|
||||
*
|
||||
* \brief LrWpan Error model Test
|
||||
*/
|
||||
class LrWpanErrorModelTestCase : public TestCase
|
||||
{
|
||||
public:
|
||||
@@ -175,7 +198,12 @@ LrWpanErrorModelTestCase::DoRun (void)
|
||||
NS_TEST_ASSERT_MSG_EQ_TOL (ber, 0.175, 0.001, "Model fails for SNR = " << snr);
|
||||
}
|
||||
|
||||
// ==============================================================================
|
||||
/**
|
||||
* \ingroup lr-wpan-test
|
||||
* \ingroup tests
|
||||
*
|
||||
* \brief LrWpan Error model TestSuite
|
||||
*/
|
||||
class LrWpanErrorModelTestSuite : public TestSuite
|
||||
{
|
||||
public:
|
||||
@@ -189,4 +217,4 @@ LrWpanErrorModelTestSuite::LrWpanErrorModelTestSuite ()
|
||||
AddTestCase (new LrWpanErrorDistanceTestCase, TestCase::QUICK);
|
||||
}
|
||||
|
||||
static LrWpanErrorModelTestSuite lrWpanErrorModelTestSuite;
|
||||
static LrWpanErrorModelTestSuite g_lrWpanErrorModelTestSuite;
|
||||
|
||||
@@ -30,7 +30,12 @@ using namespace ns3;
|
||||
|
||||
NS_LOG_COMPONENT_DEFINE ("lr-wpan-packet-test");
|
||||
|
||||
// This is an example TestCase.
|
||||
/**
|
||||
* \ingroup lr-wpan-test
|
||||
* \ingroup tests
|
||||
*
|
||||
* \brief LrWpan header and trailer Test
|
||||
*/
|
||||
class LrWpanPacketTestCase : public TestCase
|
||||
{
|
||||
public:
|
||||
@@ -104,7 +109,12 @@ LrWpanPacketTestCase::DoRun (void)
|
||||
|
||||
}
|
||||
|
||||
// ==============================================================================
|
||||
/**
|
||||
* \ingroup lr-wpan-test
|
||||
* \ingroup tests
|
||||
*
|
||||
* \brief LrWpan header and trailer TestSuite
|
||||
*/
|
||||
class LrWpanPacketTestSuite : public TestSuite
|
||||
{
|
||||
public:
|
||||
@@ -117,4 +127,4 @@ LrWpanPacketTestSuite::LrWpanPacketTestSuite ()
|
||||
AddTestCase (new LrWpanPacketTestCase, TestCase::QUICK);
|
||||
}
|
||||
|
||||
static LrWpanPacketTestSuite lrWpanPacketTestSuite;
|
||||
static LrWpanPacketTestSuite g_lrWpanPacketTestSuite;
|
||||
|
||||
@@ -27,7 +27,12 @@
|
||||
|
||||
using namespace ns3;
|
||||
|
||||
// This is an example TestCase.
|
||||
/**
|
||||
* \ingroup lr-wpan-test
|
||||
* \ingroup tests
|
||||
*
|
||||
* \brief LrWpan PLME and PD Interfaces Test
|
||||
*/
|
||||
class LrWpanPlmeAndPdInterfaceTestCase : public TestCase
|
||||
{
|
||||
public:
|
||||
@@ -36,7 +41,14 @@ public:
|
||||
|
||||
private:
|
||||
virtual void DoRun (void);
|
||||
void ReceivePdDataInndication (uint32_t psduLength, Ptr<Packet> p, uint8_t lqi);
|
||||
|
||||
/**
|
||||
* \brief Receives a PdData indication
|
||||
* \param psduLength The PSDU length.
|
||||
* \param p The packet.
|
||||
* \param lqi The LQI.
|
||||
*/
|
||||
void ReceivePdDataIndication (uint32_t psduLength, Ptr<Packet> p, uint8_t lqi);
|
||||
};
|
||||
|
||||
LrWpanPlmeAndPdInterfaceTestCase::LrWpanPlmeAndPdInterfaceTestCase ()
|
||||
@@ -49,7 +61,7 @@ LrWpanPlmeAndPdInterfaceTestCase::~LrWpanPlmeAndPdInterfaceTestCase ()
|
||||
}
|
||||
|
||||
void
|
||||
LrWpanPlmeAndPdInterfaceTestCase::ReceivePdDataInndication (uint32_t psduLength,
|
||||
LrWpanPlmeAndPdInterfaceTestCase::ReceivePdDataIndication (uint32_t psduLength,
|
||||
Ptr<Packet> p,
|
||||
uint8_t lqi)
|
||||
{
|
||||
@@ -72,7 +84,7 @@ LrWpanPlmeAndPdInterfaceTestCase::DoRun (void)
|
||||
receiver->SetChannel (channel);
|
||||
|
||||
receiver->SetPdDataIndicationCallback (MakeCallback (
|
||||
&LrWpanPlmeAndPdInterfaceTestCase::ReceivePdDataInndication,
|
||||
&LrWpanPlmeAndPdInterfaceTestCase::ReceivePdDataIndication,
|
||||
this));
|
||||
|
||||
uint32_t n = 10;
|
||||
@@ -82,7 +94,12 @@ LrWpanPlmeAndPdInterfaceTestCase::DoRun (void)
|
||||
Simulator::Destroy ();
|
||||
}
|
||||
|
||||
// ==============================================================================
|
||||
/**
|
||||
* \ingroup lr-wpan-test
|
||||
* \ingroup tests
|
||||
*
|
||||
* \brief LrWpan PLME and PD Interfaces TestSuite
|
||||
*/
|
||||
class LrWpanPlmeAndPdInterfaceTestSuite : public TestSuite
|
||||
{
|
||||
public:
|
||||
@@ -96,4 +113,4 @@ LrWpanPlmeAndPdInterfaceTestSuite::LrWpanPlmeAndPdInterfaceTestSuite ()
|
||||
}
|
||||
|
||||
// Do not forget to allocate an instance of this TestSuite
|
||||
static LrWpanPlmeAndPdInterfaceTestSuite lrWpanPlmeAndPdInterfaceTestSuite;
|
||||
static LrWpanPlmeAndPdInterfaceTestSuite g_lrWpanPlmeAndPdInterfaceTestSuite;
|
||||
|
||||
@@ -26,6 +26,12 @@
|
||||
|
||||
using namespace ns3;
|
||||
|
||||
/**
|
||||
* \ingroup lr-wpan-test
|
||||
* \ingroup tests
|
||||
*
|
||||
* \brief LrWpan SpectrumValue Helper TestSuite
|
||||
*/
|
||||
class LrWpanSpectrumValueHelperTestCase : public TestCase
|
||||
{
|
||||
public:
|
||||
@@ -64,7 +70,12 @@ LrWpanSpectrumValueHelperTestCase::DoRun (void)
|
||||
}
|
||||
}
|
||||
|
||||
// ==============================================================================
|
||||
/**
|
||||
* \ingroup lr-wpan-test
|
||||
* \ingroup tests
|
||||
*
|
||||
* \brief LrWpan SpectrumValue Helper TestSuite
|
||||
*/
|
||||
class LrWpanSpectrumValueHelperTestSuite : public TestSuite
|
||||
{
|
||||
public:
|
||||
@@ -77,4 +88,4 @@ LrWpanSpectrumValueHelperTestSuite::LrWpanSpectrumValueHelperTestSuite ()
|
||||
AddTestCase (new LrWpanSpectrumValueHelperTestCase, TestCase::QUICK);
|
||||
}
|
||||
|
||||
static LrWpanSpectrumValueHelperTestSuite lrWpanSpectrumValueHelperTestSuite;
|
||||
static LrWpanSpectrumValueHelperTestSuite g_lrWpanSpectrumValueHelperTestSuite;
|
||||
|
||||
Reference in New Issue
Block a user