author | Nicola Baldo <nbaldo@cttc.es> |
Mon, 04 Feb 2013 18:47:25 +0100 | |
changeset 9653 | 382d27da8905 |
parent 9439 | 5107601b7a75 |
child 9703 | 681f35b212ff |
permissions | -rw-r--r-- |
7385
10beb0e53130
standardize emacs c++ mode comments
Vedran Mileti? <rivanvx@gmail.com>
parents:
7238
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
6705 | 2 |
/* |
3 |
* Copyright (c) 2010 TELEMATICS LAB, DEE - Politecnico di Bari |
|
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: Giuseppe Piro <g.piro@poliba.it> |
|
7886 | 19 |
* Author: Marco Miozzo <marco.miozzo@cttc.es> : Update to FF API Architecture |
6705 | 20 |
*/ |
21 |
||
7887 | 22 |
#ifndef LTE_ENB_NET_DEVICE_H |
23 |
#define LTE_ENB_NET_DEVICE_H |
|
6705 | 24 |
|
8255
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
25 |
#include "ns3/lte-net-device.h" |
6705 | 26 |
#include "ns3/event-id.h" |
27 |
#include "ns3/mac48-address.h" |
|
28 |
#include "ns3/traced-callback.h" |
|
29 |
#include "ns3/nstime.h" |
|
8255
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
30 |
#include "ns3/lte-phy.h" |
6705 | 31 |
#include <vector> |
32 |
||
33 |
namespace ns3 { |
|
34 |
||
35 |
class Packet; |
|
36 |
class PacketBurst; |
|
37 |
class Node; |
|
38 |
class LtePhy; |
|
7887 | 39 |
class LteEnbPhy; |
7886 | 40 |
class LteEnbMac; |
41 |
class LteEnbRrc; |
|
7897 | 42 |
class FfMacScheduler; |
6705 | 43 |
|
44 |
||
45 |
/** |
|
7238
85a7e87bb4cc
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
6852
diff
changeset
|
46 |
* \ingroup lte |
85a7e87bb4cc
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
6852
diff
changeset
|
47 |
* |
6705 | 48 |
* The eNodeB device implementation |
49 |
*/ |
|
7887 | 50 |
class LteEnbNetDevice : public LteNetDevice |
6705 | 51 |
{ |
52 |
public: |
|
53 |
static TypeId GetTypeId (void); |
|
54 |
||
8255
bd60df311c7b
revised interaction between LenaHelper and propagation models
Nicola Baldo <nbaldo@cttc.es>
parents:
8253
diff
changeset
|
55 |
LteEnbNetDevice (); |
6705 | 56 |
|
7887 | 57 |
virtual ~LteEnbNetDevice (void); |
6710
3cd651349cb6
lte examples now passing valgrind tests
Nicola Baldo <nbaldo@cttc.es>
parents:
6705
diff
changeset
|
58 |
virtual void DoDispose (void); |
6705 | 59 |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
60 |
// inherited from NetDevice |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
61 |
virtual bool Send (Ptr<Packet> packet, const Address& dest, uint16_t protocolNumber); |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
62 |
|
6705 | 63 |
/** |
7886 | 64 |
* \return a pointer to the MAC |
6705 | 65 |
*/ |
7952
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
66 |
Ptr<LteEnbMac> GetMac (void) const; |
6705 | 67 |
|
68 |
/** |
|
7886 | 69 |
* \return a pointer to the physical layer. |
6705 | 70 |
*/ |
7887 | 71 |
Ptr<LteEnbPhy> GetPhy (void) const; |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
72 |
|
7952
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
73 |
/** |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
74 |
* \return a pointer to the Radio Resource Control instance of the eNB |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
75 |
*/ |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
76 |
Ptr<LteEnbRrc> GetRrc () const; |
6705 | 77 |
|
7952
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
78 |
/** |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
79 |
* \return the Cell Identifier of this eNB |
6705 | 80 |
*/ |
7952
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
81 |
uint16_t GetCellId () const; |
6705 | 82 |
|
7886 | 83 |
/** |
7952
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
84 |
* \return the uplink bandwidth in RBs |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
85 |
*/ |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
86 |
uint8_t GetUlBandwidth () const; |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
87 |
|
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
88 |
/** |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
89 |
* \param bw the uplink bandwidth in RBs |
7886 | 90 |
*/ |
7952
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
91 |
void SetUlBandwidth (uint8_t bw); |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
92 |
|
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
93 |
/** |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
94 |
* \return the downlink bandwidth in RBs |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
95 |
*/ |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
96 |
uint8_t GetDlBandwidth () const; |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
97 |
|
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
98 |
/** |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
99 |
* \param bw the downlink bandwidth in RBs |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
100 |
*/ |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
101 |
void SetDlBandwidth (uint8_t bw); |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
102 |
|
8015 | 103 |
/** |
104 |
* \return the downlink carrier frequency (EARFCN) |
|
105 |
*/ |
|
106 |
uint16_t GetDlEarfcn () const; |
|
107 |
||
108 |
/** |
|
109 |
* \param bw the downlink carrier frequency (EARFCN) |
|
110 |
*/ |
|
111 |
void SetDlEarfcn (uint16_t earfcn); |
|
112 |
||
113 |
/** |
|
114 |
* \return the uplink carrier frequency (EARFCN) |
|
115 |
*/ |
|
116 |
uint16_t GetUlEarfcn () const; |
|
117 |
||
118 |
/** |
|
119 |
* \param bw the uplink carrier frequency (EARFCN) |
|
120 |
*/ |
|
121 |
void SetUlEarfcn (uint16_t earfcn); |
|
122 |
||
6705 | 123 |
|
7976
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7952
diff
changeset
|
124 |
protected: |
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7952
diff
changeset
|
125 |
// inherited from Object |
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7952
diff
changeset
|
126 |
virtual void DoStart (void); |
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7952
diff
changeset
|
127 |
|
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7952
diff
changeset
|
128 |
|
6705 | 129 |
private: |
130 |
||
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
131 |
/** |
7952
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
132 |
* Several attributes (e.g., the bandwidth) are exported as |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
133 |
* attributes of the LteEnbNetDevice from a user perspective, but |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
134 |
* are actually used also in other modules as well (the RRC, the |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
135 |
* PHY, the scheduler...). This methods takes care of updating the |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
136 |
* configuration of all modules so that their copy of the attribute |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
137 |
* values is in sync with the one in the LteEnbNetDevice. |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
138 |
*/ |
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
139 |
void UpdateConfig (void); |
7886 | 140 |
|
141 |
Ptr<LteEnbMac> m_mac; |
|
142 |
||
7887 | 143 |
Ptr<LteEnbPhy> m_phy; |
6705 | 144 |
|
7886 | 145 |
Ptr<LteEnbRrc> m_rrc; |
146 |
||
7897 | 147 |
Ptr<FfMacScheduler> m_scheduler; |
7886 | 148 |
|
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
149 |
uint16_t m_cellId; /**< Cell Identifer. Part of the CGI, see TS 29.274, section 8.21.1 */ |
7886 | 150 |
|
7952
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
151 |
uint8_t m_dlBandwidth; /**< downlink bandwidth in RBs */ |
a15a8def979c
attributes for ul & dl bandwidth at the eNB
Nicola Baldo <nbaldo@cttc.es>
parents:
7944
diff
changeset
|
152 |
uint8_t m_ulBandwidth; /**< uplink bandwidth in RBs */ |
8015 | 153 |
|
8148
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
154 |
uint16_t m_dlEarfcn; /**< downlink carrier frequency */ |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
155 |
uint16_t m_ulEarfcn; /**< uplink carrier frequency */ |
09e2d03022a2
run check-style on src/lte/model
Nicola Baldo <nbaldo@cttc.es>
parents:
8098
diff
changeset
|
156 |
|
6705 | 157 |
}; |
158 |
||
159 |
} // namespace ns3 |
|
160 |
||
7887 | 161 |
#endif /* LTE_ENB_NET_DEVICE_H */ |