OLD | NEW |
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) | 3 * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 28 matching lines...) Expand all Loading... |
39 #include "ns3/uinteger.h" | 39 #include "ns3/uinteger.h" |
40 #include "ns3/config.h" | 40 #include "ns3/config.h" |
41 #include "ns3/eps-bearer.h" | 41 #include "ns3/eps-bearer.h" |
42 #include "lte-test-entities.h" | 42 #include "lte-test-entities.h" |
43 | 43 |
44 using namespace ns3; | 44 using namespace ns3; |
45 | 45 |
46 NS_LOG_COMPONENT_DEFINE ("EpcTestS1uDownlink"); | 46 NS_LOG_COMPONENT_DEFINE ("EpcTestS1uDownlink"); |
47 | 47 |
48 | 48 |
| 49 /** |
| 50 * \ingroup lte-test |
| 51 * \ingroup tests |
| 52 * |
| 53 * \brief UeDlTestData structure |
| 54 */ |
49 struct UeDlTestData | 55 struct UeDlTestData |
50 { | 56 { |
| 57 /** |
| 58 * Constructor |
| 59 * |
| 60 * \param n number of packets |
| 61 * \param s packet size |
| 62 */ |
51 UeDlTestData (uint32_t n, uint32_t s); | 63 UeDlTestData (uint32_t n, uint32_t s); |
52 | 64 |
53 uint32_t numPkts; | 65 uint32_t numPkts; ///< number of packets |
54 uint32_t pktSize; | 66 uint32_t pktSize; ///< packet size |
55 · | 67 · |
56 Ptr<PacketSink> serverApp; | 68 Ptr<PacketSink> serverApp; ///< Server application |
57 Ptr<Application> clientApp; | 69 Ptr<Application> clientApp; ///< Client application |
58 }; | 70 }; |
59 | 71 |
60 UeDlTestData::UeDlTestData (uint32_t n, uint32_t s) | 72 UeDlTestData::UeDlTestData (uint32_t n, uint32_t s) |
61 : numPkts (n), | 73 : numPkts (n), |
62 pktSize (s) | 74 pktSize (s) |
63 { | 75 { |
64 } | 76 } |
65 | 77 |
| 78 /** |
| 79 * \ingroup lte-test |
| 80 * \ingroup tests |
| 81 * |
| 82 * \brief EnbDlTestData structure |
| 83 */ |
66 struct EnbDlTestData | 84 struct EnbDlTestData |
67 { | 85 { |
68 std::vector<UeDlTestData> ues; | 86 std::vector<UeDlTestData> ues; ///< list of UEs |
69 }; | 87 }; |
70 | 88 |
71 | 89 |
72 | 90 |
| 91 /** |
| 92 * \ingroup lte-test |
| 93 * \ingroup tests |
| 94 * |
| 95 * \brief EpcS1uDlTestCase class |
| 96 */ |
73 class EpcS1uDlTestCase : public TestCase | 97 class EpcS1uDlTestCase : public TestCase |
74 { | 98 { |
75 public: | 99 public: |
| 100 /** |
| 101 * Constructor |
| 102 * |
| 103 * \param name the reference name |
| 104 * \param v list of UE lists |
| 105 */ |
76 EpcS1uDlTestCase (std::string name, std::vector<EnbDlTestData> v); | 106 EpcS1uDlTestCase (std::string name, std::vector<EnbDlTestData> v); |
77 virtual ~EpcS1uDlTestCase (); | 107 virtual ~EpcS1uDlTestCase (); |
78 | 108 |
79 private: | 109 private: |
80 virtual void DoRun (void); | 110 virtual void DoRun (void); |
81 std::vector<EnbDlTestData> m_enbDlTestData; | 111 std::vector<EnbDlTestData> m_enbDlTestData; ///< ENB DL test data |
82 }; | 112 }; |
83 | 113 |
84 | 114 |
85 EpcS1uDlTestCase::EpcS1uDlTestCase (std::string name, std::vector<EnbDlTestData>
v) | 115 EpcS1uDlTestCase::EpcS1uDlTestCase (std::string name, std::vector<EnbDlTestData>
v) |
86 : TestCase (name), | 116 : TestCase (name), |
87 m_enbDlTestData (v) | 117 m_enbDlTestData (v) |
88 { | 118 { |
89 } | 119 } |
90 | 120 |
91 EpcS1uDlTestCase::~EpcS1uDlTestCase () | 121 EpcS1uDlTestCase::~EpcS1uDlTestCase () |
92 { | 122 { |
93 } | 123 } |
94 | |
95 void· | 124 void· |
96 EpcS1uDlTestCase::DoRun () | 125 EpcS1uDlTestCase::DoRun () |
97 { | 126 { |
98 Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper> (); | 127 Ptr<PointToPointEpcHelper> epcHelper = CreateObject<PointToPointEpcHelper> (); |
99 Ptr<Node> pgw = epcHelper->GetPgwNode (); | 128 Ptr<Node> pgw = epcHelper->GetPgwNode (); |
100 | 129 |
101 // allow jumbo packets | 130 // allow jumbo packets |
102 Config::SetDefault ("ns3::CsmaNetDevice::Mtu", UintegerValue (30000)); | 131 Config::SetDefault ("ns3::CsmaNetDevice::Mtu", UintegerValue (30000)); |
103 Config::SetDefault ("ns3::PointToPointNetDevice::Mtu", UintegerValue (30000)); | 132 Config::SetDefault ("ns3::PointToPointNetDevice::Mtu", UintegerValue (30000)); |
104 epcHelper->SetAttribute ("S1uLinkMtu", UintegerValue (30000)); | 133 epcHelper->SetAttribute ("S1uLinkMtu", UintegerValue (30000)); |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 v7.push_back (e7); | 330 v7.push_back (e7); |
302 AddTestCase (new EpcS1uDlTestCase ("1 eNB, 10 pkts 15000 bytes each", v7), Tes
tCase::QUICK); | 331 AddTestCase (new EpcS1uDlTestCase ("1 eNB, 10 pkts 15000 bytes each", v7), Tes
tCase::QUICK); |
303 | 332 |
304 std::vector<EnbDlTestData> v8;·· | 333 std::vector<EnbDlTestData> v8;·· |
305 EnbDlTestData e8; | 334 EnbDlTestData e8; |
306 UeDlTestData f8 (100, 15000); | 335 UeDlTestData f8 (100, 15000); |
307 e8.ues.push_back (f8); | 336 e8.ues.push_back (f8); |
308 v8.push_back (e8); | 337 v8.push_back (e8); |
309 AddTestCase (new EpcS1uDlTestCase ("1 eNB, 100 pkts 15000 bytes each", v8), Te
stCase::QUICK); | 338 AddTestCase (new EpcS1uDlTestCase ("1 eNB, 100 pkts 15000 bytes each", v8), Te
stCase::QUICK); |
310 } | 339 } |
| 340 |
OLD | NEW |