author | Manuel Requena <manuel.requena@cttc.es> |
Tue, 26 Mar 2013 10:41:49 +0100 | |
changeset 10019 | 6efd95740e39 |
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 |
* 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 |
9439
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9430
diff
changeset
|
65 |
* \param imsi the unique UE identifier |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
66 |
* |
6705 | 67 |
*/ |
9439
5107601b7a75
added S1 path switch + S11 modify bearer for X2 handover
Nicola Baldo <nbaldo@cttc.es>
parents:
9430
diff
changeset
|
68 |
LteUeNetDevice (Ptr<Node> node, Ptr<LteUePhy> phy, Ptr<LteUeMac> mac, Ptr<LteUeRrc> rrc, Ptr<EpcUeNas> nas, uint64_t imsi); |
6705 | 69 |
|
7887 | 70 |
virtual ~LteUeNetDevice (void); |
6710
3cd651349cb6
lte examples now passing valgrind tests
Nicola Baldo <nbaldo@cttc.es>
parents:
6705
diff
changeset
|
71 |
virtual void DoDispose (); |
6705 | 72 |
|
7886 | 73 |
|
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
74 |
// inherited from NetDevice |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
75 |
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
|
76 |
|
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
77 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
78 |
Ptr<LteUeMac> GetMac (void) const; |
6705 | 79 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
80 |
Ptr<LteUeRrc> GetRrc () const ; |
7886 | 81 |
|
7887 | 82 |
Ptr<LteUePhy> GetPhy (void) const; |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
83 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
84 |
Ptr<EpcUeNas> GetNas (void) const; |
6705 | 85 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
86 |
uint64_t GetImsi () const; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
87 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
88 |
|
6705 | 89 |
/** |
90 |
* \brief Set the targer eNB where the UE is registered |
|
91 |
* \param enb |
|
92 |
*/ |
|
7887 | 93 |
void SetTargetEnb (Ptr<LteEnbNetDevice> enb); |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
94 |
|
6705 | 95 |
/** |
96 |
* \brief Get the targer eNB where the UE is registered |
|
97 |
* \return the pointer to the enb |
|
98 |
*/ |
|
7887 | 99 |
Ptr<LteEnbNetDevice> GetTargetEnb (void); |
6705 | 100 |
|
101 |
||
7976
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7945
diff
changeset
|
102 |
protected: |
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7945
diff
changeset
|
103 |
// inherited from Object |
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7945
diff
changeset
|
104 |
virtual void DoStart (void); |
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7945
diff
changeset
|
105 |
|
541eee38ac12
fixed LENA-78 m_dlBandwidth not initialized
Nicola Baldo <nbaldo@cttc.es>
parents:
7945
diff
changeset
|
106 |
|
6705 | 107 |
private: |
108 |
||
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
109 |
/** |
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
110 |
* 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
|
111 |
* 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
|
112 |
* 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
|
113 |
* 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
|
114 |
* 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
|
115 |
* 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
|
116 |
*/ |
7945
dbab335f9eea
connection of SAPs moved from UeNetDevice to LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
7906
diff
changeset
|
117 |
void UpdateConfig (void); |
dbab335f9eea
connection of SAPs moved from UeNetDevice to LenaHelper
Nicola Baldo <nbaldo@cttc.es>
parents:
7906
diff
changeset
|
118 |
|
7887 | 119 |
Ptr<LteEnbNetDevice> m_targetEnb; |
6705 | 120 |
|
7886 | 121 |
Ptr<LteUeMac> m_mac; |
7887 | 122 |
Ptr<LteUePhy> m_phy; |
7886 | 123 |
Ptr<LteUeRrc> m_rrc; |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
8390
diff
changeset
|
124 |
Ptr<EpcUeNas> m_nas; |
7893 | 125 |
|
7989
96f3da01306a
Added IMSI field to LteUeNetDevice as unique UE identifier.
jnin
parents:
7976
diff
changeset
|
126 |
uint64_t m_imsi; |
8389
cb215987eb77
LTE-EPC end-to-end data plane imlemented and partially working
Nicola Baldo <nbaldo@cttc.es>
parents:
8148
diff
changeset
|
127 |
|
6705 | 128 |
}; |
129 |
||
130 |
} // namespace ns3 |
|
131 |
||
7887 | 132 |
#endif /* LTE_UE_NET_DEVICE_H */ |