diff --git a/src/applications/model/bulk-send-application.h b/src/applications/model/bulk-send-application.h index 4d8aa5c96..f8fedef31 100644 --- a/src/applications/model/bulk-send-application.h +++ b/src/applications/model/bulk-send-application.h @@ -151,8 +151,13 @@ private: void ConnectionFailed (Ptr socket); /** * \brief Send more data as soon as some has been transmitted. + * + * Used in socket's SetSendCallback - params are forced by it. + * + * \param socket socket to use + * \param unused actually unused */ - void DataSend (Ptr, uint32_t); // for socket's SetSendCallback + void DataSend (Ptr socket, uint32_t unused); }; } // namespace ns3 diff --git a/src/applications/test/bulk-send-application-test-suite.cc b/src/applications/test/bulk-send-application-test-suite.cc index 2b969b0d6..928b9eaae 100644 --- a/src/applications/test/bulk-send-application-test-suite.cc +++ b/src/applications/test/bulk-send-application-test-suite.cc @@ -39,6 +39,12 @@ using namespace ns3; +/** + * \ingroup applications-test + * \ingroup tests + * + * Basic test, checks that the right quantity of packets are sent and received. + */ class BulkSendBasicTestCase : public TestCase { public: @@ -47,10 +53,19 @@ public: private: virtual void DoRun (void); + /** + * Record a packet successfully sent + * \param p the packet + */ void SendTx (Ptr p); + /** + * Record a packet successfully received + * \param p the packet + * \param addr the sender's address + */ void ReceiveRx (Ptr p, const Address& addr); - uint64_t m_sent {0}; - uint64_t m_received {0}; + uint64_t m_sent {0}; //!< number of bytes sent + uint64_t m_received {0}; //!< number of bytes received }; BulkSendBasicTestCase::BulkSendBasicTestCase () @@ -118,9 +133,14 @@ BulkSendBasicTestCase::DoRun (void) NS_TEST_ASSERT_MSG_EQ (m_received, 300000, "Received the full 300000 bytes"); } -// This test checks that the sequence number is sent and received in sequence -// despite the sending application having to pause and restart its sending -// due to a temporarily full transmit buffer. +/** + * \ingroup applications-test + * \ingroup tests + * + * This test checks that the sequence number is sent and received in sequence + * despite the sending application having to pause and restart its sending + * due to a temporarily full transmit buffer. + */ class BulkSendSeqTsSizeTestCase : public TestCase { public: @@ -129,14 +149,28 @@ public: private: virtual void DoRun (void); + /** + * Record a packet successfully sent + * \param p the packet + * \param from source address + * \param to destination address + * \param header the SeqTsSizeHeader + */ void SendTx (Ptr p, const Address &from, const Address & to, const SeqTsSizeHeader &header); + /** + * Record a packet successfully received + * \param p the packet + * \param from source address + * \param to destination address + * \param header the SeqTsSizeHeader + */ void ReceiveRx (Ptr p, const Address &from, const Address & to, const SeqTsSizeHeader &header); - uint64_t m_sent {0}; - uint64_t m_received {0}; - uint64_t m_seqTxCounter {0}; - uint64_t m_seqRxCounter {0}; - Time m_lastTxTs {Seconds (0)}; - Time m_lastRxTs {Seconds (0)}; + uint64_t m_sent {0}; //!< number of bytes sent + uint64_t m_received {0}; //!< number of bytes received + uint64_t m_seqTxCounter {0}; //!< Counter for Sequences on Tx + uint64_t m_seqRxCounter {0}; //!< Counter for Sequences on Rx + Time m_lastTxTs {Seconds (0)}; //!< Last recored timestamp on Tx + Time m_lastRxTs {Seconds (0)}; //!< Last recored timestamp on Rx }; BulkSendSeqTsSizeTestCase::BulkSendSeqTsSizeTestCase () @@ -216,6 +250,12 @@ BulkSendSeqTsSizeTestCase::DoRun (void) NS_TEST_ASSERT_MSG_EQ (m_received, 300000, "Received the full 300000 bytes"); } +/** + * \ingroup applications-test + * \ingroup tests + * + * \brief BulkSend TestSuite + */ class BulkSendTestSuite : public TestSuite { public: @@ -229,5 +269,5 @@ BulkSendTestSuite::BulkSendTestSuite () AddTestCase (new BulkSendSeqTsSizeTestCase, TestCase::QUICK); } -static BulkSendTestSuite g_bulkSendTestSuite; +static BulkSendTestSuite g_bulkSendTestSuite; //!< Static variable for test initialization diff --git a/src/applications/test/three-gpp-http-client-server-test.cc b/src/applications/test/three-gpp-http-client-server-test.cc index 75c80a86d..ba1f459b8 100644 --- a/src/applications/test/three-gpp-http-client-server-test.cc +++ b/src/applications/test/three-gpp-http-client-server-test.cc @@ -57,6 +57,8 @@ using namespace ns3; /** * \ingroup http + * \ingroup applications-test + * \ingroup tests * A test class which verifies that each HTTP object sent is also received the * same size. * @@ -785,6 +787,8 @@ ThreeGppHttpObjectTestCase::DeviceDropCallback (Ptr packet) /** * \ingroup http + * \ingroup applications-test + * \ingroup tests * A test class for running several system tests which validate the web * browsing traffic model. *