1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ 2 3 #ifndef LENA_TEST_DEACTIVATE_BEARER_H 4 #define LENA_TEST_DEACTIVATE_BEARER_H 5 6 #include "ns3/simulator.h" 7 #include "ns3/test.h" 8 9 10 namespace ns3 { 11 12 /** 13 * \ingroup lte-test 14 * \ingroup tests 15 * 16 * \brief Test case that for testing the deactivation of the bearer 17 * functionality. The test consist in deactivating the bearer and checking 18 * if some traffic will appear afterwards on the given bearer. If some traffic 19 * is detected the test will fail. Firs the de-activation is performed by 20 * using Simulator::Schedule() method which will initiate bearer de-activation 21 * after deActivateTime that is specified as the test parameter. Additionally, 22 * test instantiate de-activation in sequence. 23 */ 24 25 class LenaDeactivateBearerTestCase : public TestCase 26 { 27 public: 28 /** 29 * Constructor 30 * 31 * \param dist distance between the nodes 32 * \param estThrPssDl estimated throughput PSS DL 33 * \param packetSize packet size in bytes 34 * \param interval interval time in ms 35 * \param errorModelEnabled whether the error model is enabled 36 * \param useIdealRrc whether to use ideal RRC 37 */ 38 LenaDeactivateBearerTestCase (std::vector<uint16_t> dist, std::vector<uint32_t> estThrPssDl, std::vector<uint16_t> packetSize, uint16_t interval, bool errorModelEnabled, bool useIdealRrc); 39 virtual ~LenaDeactivateBearerTestCase (); 40 41 private: 42 /** 43 * Build name string function 44 * 45 * \param nUser number of UE nodes 46 * \param dist distance between nodes 47 * \returns name string 48 */ 49 static std::string BuildNameString (uint16_t nUser, std::vector<uint16_t> dist); 50 virtual void DoRun (void); 51 uint16_t m_nUser; ///< number of UE nodes 52 std::vector<uint16_t> m_dist; ///< distance between the nodes 53 std::vector<uint16_t> m_packetSize; ///< packet size in bytes 54 uint16_t m_interval; ///< interval time in ms 55 std::vector<uint32_t> m_estThrPssDl; ///< estimated threshold PSS DL 56 bool m_errorModelEnabled; ///< error mode enabled? 57 }; 58 59 60 /** 61 * \ingroup lte-test 62 * \ingroup tests 63 * 64 * \brief The test suite class for the LenaDeactivateBearerTestCase. 65 */ 66 67 class LenaTestBearerDeactivateSuite : public TestSuite 68 { 69 public: 70 LenaTestBearerDeactivateSuite (); 71 }; 72 73 } // namespace ns3 74 75 #endif 76