LEFT | RIGHT |
1 // +-----+ +-----+ +-----+ | 1 // +-----+ +-----+ +-----+ |
2 // | UE0 | | UE1 | | UE2 | | 2 // | UE0 | | UE1 | | UE2 | |
3 // +-----+ +-----+ +-----+ | 3 // +-----+ +-----+ +-----+ |
4 // 10.1.1.1 10.1.1.2 10.1.1.3 | 4 // 10.1.1.1 10.1.1.2 10.1.1.3 |
5 // -------- -------- ------- | 5 // -------- -------- ------- |
6 // ((*)) ((*)) ((*)) | 6 // ((*)) ((*)) ((*)) |
7 // | 7 // |
8 // 10.1.1.4 | 8 // 10.1.1.4 |
9 // +------------+ | 9 // +------------+ |
10 // |eNB | ==((*)) | 10 // |eNB | ==((*)) |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "ns3/global-route-manager.h" | 21 #include "ns3/global-route-manager.h" |
22 | 22 |
23 NS_LOG_COMPONENT_DEFINE ("lte-device"); | 23 NS_LOG_COMPONENT_DEFINE ("lte-device"); |
24 | 24 |
25 using namespace ns3; | 25 using namespace ns3; |
26 | 26 |
27 | 27 |
28 int main (int argc, char *argv[]) | 28 int main (int argc, char *argv[]) |
29 { | 29 { |
30 // default values | 30 // default values |
31 int nbUE = 1; | 31 int nbUE = 3; |
32 | 32 |
33 LteHelper lte; | 33 LteHelper lte; |
34 ·· | 34 ·· |
35 //lte.EnableLogComponents (); | 35 lte.EnableLogComponents (); |
36 LogComponentEnable ("UdpClient", LOG_LEVEL_INFO); | 36 LogComponentEnable ("UdpClient", LOG_LEVEL_INFO); |
37 LogComponentEnable ("UdpServer", LOG_LEVEL_INFO); | 37 LogComponentEnable ("UdpServer", LOG_LEVEL_INFO); |
38 | 38 |
39 | 39 |
40 // CREATE NODE CONTAINER AND CREATE LTE NODES | 40 // CREATE NODE CONTAINER AND CREATE LTE NODES |
41 NodeContainer ueNodes; | 41 NodeContainer ueNodes; |
42 NodeContainer enbNodes; | 42 NodeContainer enbNodes; |
43 ueNodes.Create (nbUE); | 43 ueNodes.Create (nbUE); |
44 enbNodes.Create (1); | 44 enbNodes.Create (1); |
45 | 45 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 | 100 |
101 ·· | 101 ·· |
102 //CONFIGURE MOBILITY | 102 //CONFIGURE MOBILITY |
103 Ptr<ConstantPositionMobilityModel> enbMobility = new ConstantPositionMobilityM
odel (); | 103 Ptr<ConstantPositionMobilityModel> enbMobility = new ConstantPositionMobilityM
odel (); |
104 enbMobility->SetPosition (Vector (0.0, 0.0, 0.0)); | 104 enbMobility->SetPosition (Vector (0.0, 0.0, 0.0)); |
105 lte.AddMobility (enb->GetPhy (), enbMobility); | 105 lte.AddMobility (enb->GetPhy (), enbMobility); |
106 | 106 |
107 for (int i = 0; i < nbUE; i++) | 107 for (int i = 0; i < nbUE; i++) |
108 { | 108 { |
109 Ptr<ConstantVelocityMobilityModel> ueMobility = new ConstantVelocityMobili
tyModel (); | 109 Ptr<ConstantVelocityMobilityModel> ueMobility = new ConstantVelocityMobili
tyModel (); |
110 ueMobility->SetPosition (Vector (50.0, 50.0, 0.0)); | 110 ueMobility->SetPosition (Vector (30.0, 0.0, 0.0)); |
111 ueMobility->SetVelocity (Vector (50.0, 50.0, 0.0)); | 111 ueMobility->SetVelocity (Vector (30.0, 0.0, 0.0)); |
112 ······ | 112 ······ |
113 lte.AddMobility (ue[i]->GetPhy (), ueMobility); | 113 lte.AddMobility (ue[i]->GetPhy (), ueMobility); |
114 ······ | 114 ······ |
115 lte.AddDownlinkChannelRealization (enbMobility, ueMobility, ue[i]->GetPhy
()); | 115 lte.AddDownlinkChannelRealization (enbMobility, ueMobility, ue[i]->GetPhy
()); |
116 } | 116 } |
117 ·· | 117 ·· |
118 | 118 |
119 | 119 |
120 | 120 |
121 | 121 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 | 154 |
155 | 155 |
156 Simulator::Run (); | 156 Simulator::Run (); |
157 | 157 |
158 Simulator::Destroy (); | 158 Simulator::Destroy (); |
159 | 159 |
160 std::cout << "Done." << std::endl; | 160 std::cout << "Done." << std::endl; |
161 | 161 |
162 return 0; | 162 return 0; |
163 } | 163 } |
LEFT | RIGHT |