author | Nicola Baldo <nbaldo@cttc.es> |
Thu, 31 Mar 2011 15:37:08 +0200 | |
changeset 7931 | 9c385d236a0b |
parent 7928 | b736f63e9bdf |
child 7934 | 0f09fc707a8c |
permissions | -rw-r--r-- |
7886 | 1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
3 |
* Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) |
|
4 |
* |
|
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 |
|
7 |
* published by the Free Software Foundation; |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 |
* |
|
18 |
* Author: Manuel Requena <manuel.requena@cttc.es> |
|
19 |
*/ |
|
20 |
||
21 |
||
22 |
#include "ns3/core-module.h" |
|
23 |
#include "ns3/network-module.h" |
|
24 |
#include "ns3/mobility-module.h" |
|
25 |
#include "ns3/lte-module.h" |
|
7909
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7908
diff
changeset
|
26 |
//#include "ns3/gtk-config-store.h" |
7886 | 27 |
using namespace ns3; |
28 |
||
29 |
int main (int argc, char *argv[]) |
|
30 |
{ |
|
31 |
LenaHelper lena; |
|
32 |
||
7928
b736f63e9bdf
removed LtePhy::Get{Up,Down}linkSpectrumPhy methods which are evil
Nicola Baldo <nbaldo@cttc.es>
parents:
7909
diff
changeset
|
33 |
//lena.EnableLogComponents (); |
7886 | 34 |
|
35 |
// Create Nodes: eNodeB and UE |
|
36 |
NodeContainer enbNodes; |
|
37 |
NodeContainer ueNodes; |
|
38 |
enbNodes.Create (1); |
|
7931
9c385d236a0b
minor changes in example programs
Nicola Baldo <nbaldo@cttc.es>
parents:
7928
diff
changeset
|
39 |
ueNodes.Create (4); |
7886 | 40 |
|
41 |
// Install Mobility Model |
|
42 |
MobilityHelper mobility; |
|
43 |
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); |
|
44 |
mobility.Install (enbNodes); |
|
45 |
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel"); |
|
46 |
mobility.Install (ueNodes); |
|
47 |
||
48 |
// Create Devices and install them in the Nodes (eNB and UE) |
|
49 |
NetDeviceContainer enbDevs; |
|
50 |
NetDeviceContainer ueDevs; |
|
7908
b7497687ab48
LENA 56: Scheduler type configurable by the user
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7906
diff
changeset
|
51 |
//lena.SetScheduler ("RrFfMacScheduler"); |
b7497687ab48
LENA 56: Scheduler type configurable by the user
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7906
diff
changeset
|
52 |
lena.SetScheduler ("PfFfMacScheduler"); |
7886 | 53 |
enbDevs = lena.InstallEnbDevice (enbNodes); |
54 |
ueDevs = lena.InstallUeDevice (ueNodes); |
|
55 |
||
56 |
// Attach a UE to a eNB |
|
57 |
lena.Attach (ueDevs, enbDevs.Get (0)); |
|
58 |
||
59 |
// Activate an EPS bearer |
|
60 |
enum EpsBearer::Qci q = EpsBearer::GBR_CONV_VOICE; |
|
61 |
EpsBearer bearer (q); |
|
62 |
lena.ActivateEpsBearer (ueDevs, bearer); |
|
63 |
||
64 |
||
7895
f20bb71f9b71
Aperiodic high layer configured subband CQI (A30 type) implemented
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7886
diff
changeset
|
65 |
Simulator::Stop (Seconds (0.005)); |
7886 | 66 |
|
7928
b736f63e9bdf
removed LtePhy::Get{Up,Down}linkSpectrumPhy methods which are evil
Nicola Baldo <nbaldo@cttc.es>
parents:
7909
diff
changeset
|
67 |
//Simulator::Run (); |
7903
eed953cd94a0
Fix some typos and bugs on the attribute to map implementation
jnin
parents:
7895
diff
changeset
|
68 |
|
7909
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7908
diff
changeset
|
69 |
//GtkConfigStore config; |
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7908
diff
changeset
|
70 |
//config.ConfigureAttributes (); |
7903
eed953cd94a0
Fix some typos and bugs on the attribute to map implementation
jnin
parents:
7895
diff
changeset
|
71 |
|
7886 | 72 |
Simulator::Destroy (); |
73 |
return 0; |
|
74 |
} |