author | mmiozzo |
Tue, 09 Oct 2012 14:19:32 +0200 | |
changeset 9352 | 0b43d0a862dc |
parent 9337 | ae7126b266ce |
child 9430 | e8b87593ee5b |
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 |
* Nicola Baldo <nbaldo@cttc.es> |
6705 | 20 |
*/ |
21 |
||
7887 | 22 |
#ifndef LTE_UE_NET_DEVICE_H |
23 |
#define LTE_UE_NET_DEVICE_H |
|
6705 | 24 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
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" |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
30 |
#include "ns3/lte-phy.h" |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
31 |
#include "ns3/eps-bearer.h" |
6705 | 32 |
|
33 |
||
34 |
namespace ns3 { |
|
35 |
||
36 |
class Packet; |
|
37 |
class PacketBurst; |
|
38 |
class Node; |
|
39 |
class LtePhy; |
|
7887 | 40 |
class LteUePhy; |
41 |
class LteEnbNetDevice; |
|
7886 | 42 |
class LteUeMac; |
43 |
class LteUeRrc; |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
44 |
class EpcUeNas; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
45 |
class EpcTft; |
6705 | 46 |
|
47 |
/** |
|
7238
85a7e87bb4cc
Make some more modules show up on doxygen modules page
Mitch Watrous <watrous@u.washington.edu>
parents:
6852
diff
changeset
|
48 |
* \ingroup lte |
7887 | 49 |
* The LteUeNetDevice class implements the UE net device |
6705 | 50 |
*/ |
7887 | 51 |
class LteUeNetDevice : public LteNetDevice |
6705 | 52 |
{ |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
53 |
|
6705 | 54 |
public: |
55 |
static TypeId GetTypeId (void); |
|
56 |
||
7887 | 57 |
LteUeNetDevice (void); |
6705 | 58 |
/** |
59 |
* \brief Create an UE net device |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
60 |
* \param node the node to which the device belongs |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
61 |
* \param phy the PHY entity |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
62 |
* \param mac the MAC entity |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
63 |
* \param rrc the RRC entity |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
64 |
* \param nas the NAS entity |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
65 |
* |
6705 | 66 |
*/ |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
67 |
LteUeNetDevice (Ptr<Node> node, Ptr<LteUePhy> phy, Ptr<LteUeMac> mac, Ptr<LteUeRrc> rrc, Ptr<EpcUeNas> nas); |
6705 | 68 |
|
7887 | 69 |
virtual ~LteUeNetDevice (void); |
6710
3cd651349cb6
lte examples now passing valgrind tests
Nicola Baldo <nbaldo@cttc.es>
parents:
6705
diff
changeset
|
70 |
virtual void DoDispose (); |
6705 | 71 |
|
7886 | 72 |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
73 |
// inherited from NetDevice |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
74 |
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
|
75 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
76 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
77 |
Ptr<LteUeMac> GetMac (void) const; |
6705 | 78 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
79 |
Ptr<LteUeRrc> GetRrc () const ; |
7886 | 80 |
|
7887 | 81 |
Ptr<LteUePhy> GetPhy (void) const; |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
82 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
83 |
Ptr<EpcUeNas> GetNas (void) const; |
6705 | 84 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
85 |
uint64_t GetImsi () const; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
86 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
87 |
|
6705 | 88 |
/** |
89 |
* \brief Set the targer eNB where the UE is registered |
|
90 |
* \param enb |
|
91 |
*/ |
|
7887 | 92 |
void SetTargetEnb (Ptr<LteEnbNetDevice> enb); |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
93 |
|
6705 | 94 |
/** |
95 |
* \brief Get the targer eNB where the UE is registered |
|
96 |
* \return the pointer to the enb |
|
97 |
*/ |
|
7887 | 98 |
Ptr<LteEnbNetDevice> GetTargetEnb (void); |
6705 | 99 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
100 |
/** |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
101 |
* Activate a dedicated EPS bearer |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
102 |
* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
103 |
* \param bearer the bearer paramaters |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
104 |
* \param tft the TFT identifying the traffic that will go over the bearer |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
105 |
*/ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
106 |
void ActivateDedicatedEpsBearer (EpsBearer bearer, Ptr<EpcTft> tft); |
6705 | 107 |
|
7976
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7945
diff
changeset
|
108 |
protected: |
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7945
diff
changeset
|
109 |
// inherited from Object |
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7945
diff
changeset
|
110 |
virtual void DoStart (void); |
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7945
diff
changeset
|
111 |
|
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7945
diff
changeset
|
112 |
|
6705 | 113 |
private: |
114 |
||
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
115 |
/** |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
116 |
* Some attributes are exported as |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
117 |
* attributes of the LteUeNetDevice from a user perspective, but |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
118 |
* are actually used also in other modules as well (the RRC, the |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
119 |
* PHY...). This methods takes care of updating the |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
120 |
* configuration of all modules so that their copy of the attribute |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
121 |
* values is in sync with the one in the LteUeNetDevice. |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
122 |
*/ |
7945
dbab335f9eea
connection of SAPs moved from UeNetDevice to LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
7906
diff
changeset
|
123 |
void UpdateConfig (void); |
dbab335f9eea
connection of SAPs moved from UeNetDevice to LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
7906
diff
changeset
|
124 |
|
7887 | 125 |
Ptr<LteEnbNetDevice> m_targetEnb; |
6705 | 126 |
|
7886 | 127 |
Ptr<LteUeMac> m_mac; |
7887 | 128 |
Ptr<LteUePhy> m_phy; |
7886 | 129 |
Ptr<LteUeRrc> m_rrc; |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
130 |
Ptr<EpcUeNas> m_nas; |
7893 | 131 |
|
7989
96f3da01306a
Added IMSI field to LteUeNetDevice as unique UE identifier.
jnin
parents:
7976
diff
changeset
|
132 |
uint64_t m_imsi; |
96f3da01306a
Added IMSI field to LteUeNetDevice as unique UE identifier.
jnin
parents:
7976
diff
changeset
|
133 |
static uint64_t m_imsiCounter; |
96f3da01306a
Added IMSI field to LteUeNetDevice as unique UE identifier.
jnin
parents:
7976
diff
changeset
|
134 |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
135 |
|
6705 | 136 |
}; |
137 |
||
138 |
} // namespace ns3 |
|
139 |
||
7887 | 140 |
#endif /* LTE_UE_NET_DEVICE_H */ |