author | Budiarto Herman <budiarto.herman@magister.fi> |
Mon, 06 Oct 2014 16:05:46 -0700 | |
changeset 10983 | 087597a150da |
parent 10374 | bad9fbe96995 |
child 11086 | 65914b1ed5b3 |
permissions | -rw-r--r-- |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
2 |
/* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
3 |
* Copyright (c) 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC) |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
4 |
* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
5 |
* This program is free software; you can redistribute it and/or modify |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
6 |
* it under the terms of the GNU General Public License version 2 as |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
8 |
* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
9 |
* This program is distributed in the hope that it will be useful, |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
12 |
* GNU General Public License for more details. |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
13 |
* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
14 |
* You should have received a copy of the GNU General Public License |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
15 |
* along with this program; if not, write to the Free Software |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
16 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
17 |
* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
18 |
* Author: Nicola Baldo <nbaldo@cttc.es> |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
19 |
*/ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
20 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
21 |
#ifndef EPC_UE_NAS_H |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
22 |
#define EPC_UE_NAS_H |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
23 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
24 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
25 |
#include <ns3/object.h> |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
26 |
#include <ns3/lte-as-sap.h> |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
27 |
#include <ns3/epc-tft-classifier.h> |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
28 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
29 |
namespace ns3 { |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
30 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
31 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
32 |
class EpcHelper; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
33 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
34 |
class EpcUeNas : public Object |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
35 |
{ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
36 |
friend class MemberLteAsSapUser<EpcUeNas>; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
37 |
public: |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
38 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
39 |
/** |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
40 |
* Constructor |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
41 |
*/ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
42 |
EpcUeNas (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
43 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
44 |
/** |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
45 |
* Destructor |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
46 |
*/ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
47 |
virtual ~EpcUeNas (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
48 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
49 |
// inherited from Object |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
50 |
virtual void DoDispose (void); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
51 |
static TypeId GetTypeId (void); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
52 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
53 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
54 |
/** |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
55 |
* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
56 |
* \param dev the UE NetDevice |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
57 |
*/ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
58 |
void SetDevice (Ptr<NetDevice> dev); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
59 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
60 |
/** |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
61 |
* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
62 |
* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
63 |
* \param imsi the unique UE identifier |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
64 |
*/ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
65 |
void SetImsi (uint64_t imsi); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
66 |
|
10300
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
67 |
/** |
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
68 |
* |
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
69 |
* \param csgId Closed Subscriber Group identity |
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
70 |
*/ |
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
71 |
void SetCsgId (uint32_t csgId); |
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
72 |
|
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
73 |
/** |
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
74 |
* |
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
75 |
* \return csgId Closed Subscriber Group identity |
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
76 |
*/ |
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
77 |
uint32_t GetCsgId () const; |
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
78 |
|
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
79 |
/** |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
80 |
* Set the AS SAP provider to interact with the NAS entity |
10300
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
81 |
* |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
82 |
* \param s the AS SAP provider |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
83 |
*/ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
84 |
void SetAsSapProvider (LteAsSapProvider* s); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
85 |
|
10300
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
86 |
/** |
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
87 |
* |
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
88 |
* |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
89 |
* \return the AS SAP user exported by this RRC |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
90 |
*/ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
91 |
LteAsSapUser* GetAsSapUser (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
92 |
|
10300
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
93 |
/** |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
94 |
* set the callback used to forward data packets up the stack |
10300
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
95 |
* |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
96 |
* \param cb the callback |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
97 |
*/ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
98 |
void SetForwardUpCallback (Callback <void, Ptr<Packet> > cb); |
10300
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
99 |
|
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
100 |
/** |
10312
d37b9d88c6f1
Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
101 |
* \brief Causes NAS to tell AS to find a suitable cell and camp to it. |
d37b9d88c6f1
Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
102 |
* |
d37b9d88c6f1
Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
103 |
* \param dlEarfcn the DL frequency of the eNB |
d37b9d88c6f1
Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
104 |
*/ |
d37b9d88c6f1
Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
105 |
void StartCellSelection (uint16_t dlEarfcn); |
d37b9d88c6f1
Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
106 |
|
d37b9d88c6f1
Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
107 |
/** |
d37b9d88c6f1
Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
108 |
* \brief Causes NAS to tell AS to go to ACTIVE state. |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
109 |
* |
10296
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9430
diff
changeset
|
110 |
* The end result is equivalent with EMM Registered + ECM Connected states. |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9430
diff
changeset
|
111 |
*/ |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9430
diff
changeset
|
112 |
void Connect (); |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9430
diff
changeset
|
113 |
|
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9430
diff
changeset
|
114 |
/** |
10312
d37b9d88c6f1
Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
115 |
* \brief Causes NAS to tell AS to camp to a specific cell and go to ACTIVE |
d37b9d88c6f1
Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
116 |
* state. |
9430
e8b87593ee5b
added MME with simulated S1AP and S11 interfaces
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
117 |
* \param cellId the id of the eNB to camp on |
10312
d37b9d88c6f1
Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
118 |
* \param dlEarfcn the DL frequency of the eNB |
10296
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9430
diff
changeset
|
119 |
* |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9430
diff
changeset
|
120 |
* The end result is equivalent with EMM Registered + ECM Connected states. |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9430
diff
changeset
|
121 |
* Since RRC Idle Mode cell selection is not supported yet, we force the UE |
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9430
diff
changeset
|
122 |
* RRC to be camped on a specific eNB. |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
123 |
*/ |
10312
d37b9d88c6f1
Restructured the initiation of cell selection, so that UeNetDevice does not directly interact with PHY
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10301
diff
changeset
|
124 |
void Connect (uint16_t cellId, uint16_t dlEarfcn); |
9406 | 125 |
|
126 |
/** |
|
127 |
* instruct the NAS to disconnect |
|
128 |
* |
|
129 |
*/ |
|
130 |
void Disconnect (); |
|
131 |
||
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
132 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
133 |
/** |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
134 |
* Activate an EPS bearer |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
135 |
* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
136 |
* \param bearer the characteristics of the bearer to be created |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
137 |
* \param tft the TFT identifying the traffic that will go on this bearer |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
138 |
*/ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
139 |
void ActivateEpsBearer (EpsBearer bearer, Ptr<EpcTft> tft); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
140 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
141 |
/** |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
142 |
* Enqueue an IP packet on the proper bearer for uplink transmission |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
143 |
* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
144 |
* \param p the packet |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
145 |
* |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
146 |
* \return true if successful, false if an error occurred |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
147 |
*/ |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
148 |
bool Send (Ptr<Packet> p); |
9406 | 149 |
|
150 |
||
151 |
/** |
|
152 |
* Definition of NAS states as per "LTE - From theory to practice", |
|
153 |
* Section 3.2.3.2 "Connection Establishment and Release" |
|
154 |
* |
|
155 |
*/ |
|
156 |
enum State |
|
10301
d527fc67106d
Removed PLMN from LTE cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10300
diff
changeset
|
157 |
{ |
d527fc67106d
Removed PLMN from LTE cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10300
diff
changeset
|
158 |
OFF = 0, |
d527fc67106d
Removed PLMN from LTE cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10300
diff
changeset
|
159 |
ATTACHING, |
d527fc67106d
Removed PLMN from LTE cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10300
diff
changeset
|
160 |
IDLE_REGISTERED, |
d527fc67106d
Removed PLMN from LTE cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10300
diff
changeset
|
161 |
CONNECTING_TO_EPC, |
d527fc67106d
Removed PLMN from LTE cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10300
diff
changeset
|
162 |
ACTIVE, |
d527fc67106d
Removed PLMN from LTE cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10300
diff
changeset
|
163 |
NUM_STATES |
d527fc67106d
Removed PLMN from LTE cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10300
diff
changeset
|
164 |
}; |
9406 | 165 |
|
10374
bad9fbe96995
Added const to some Get functions in LTE module
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
166 |
/** |
bad9fbe96995
Added const to some Get functions in LTE module
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
167 |
* \return The current state |
bad9fbe96995
Added const to some Get functions in LTE module
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
168 |
*/ |
bad9fbe96995
Added const to some Get functions in LTE module
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
169 |
State GetState () const; |
bad9fbe96995
Added const to some Get functions in LTE module
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10312
diff
changeset
|
170 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
171 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
172 |
private: |
10296
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9430
diff
changeset
|
173 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
174 |
// LTE AS SAP methods |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
175 |
void DoNotifyConnectionSuccessful (); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
176 |
void DoNotifyConnectionFailed (); |
9406 | 177 |
void DoNotifyConnectionReleased (); |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
178 |
void DoRecvData (Ptr<Packet> packet); |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
179 |
|
9406 | 180 |
// internal methods |
181 |
void DoActivateEpsBearer (EpsBearer bearer, Ptr<EpcTft> tft); |
|
10983
087597a150da
LTE doxygen additions
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10374
diff
changeset
|
182 |
/** |
087597a150da
LTE doxygen additions
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10374
diff
changeset
|
183 |
* Switch the UE RRC to the given state. |
087597a150da
LTE doxygen additions
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10374
diff
changeset
|
184 |
* \param s the destination state |
087597a150da
LTE doxygen additions
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10374
diff
changeset
|
185 |
*/ |
9406 | 186 |
void SwitchToState (State s); |
187 |
||
10983
087597a150da
LTE doxygen additions
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10374
diff
changeset
|
188 |
/// The current UE NAS state. |
9406 | 189 |
State m_state; |
190 |
||
10983
087597a150da
LTE doxygen additions
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10374
diff
changeset
|
191 |
/** |
087597a150da
LTE doxygen additions
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10374
diff
changeset
|
192 |
* The `StateTransition` trace source. Fired upon every UE NAS state |
087597a150da
LTE doxygen additions
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10374
diff
changeset
|
193 |
* transition. Exporting old state and new state. |
087597a150da
LTE doxygen additions
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10374
diff
changeset
|
194 |
*/ |
9406 | 195 |
TracedCallback<State, State> m_stateTransitionCallback; |
196 |
||
10983
087597a150da
LTE doxygen additions
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10374
diff
changeset
|
197 |
/// The UE NetDevice. |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
198 |
Ptr<NetDevice> m_device; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
199 |
|
10983
087597a150da
LTE doxygen additions
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10374
diff
changeset
|
200 |
/// The unique UE identifier. |
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
201 |
uint64_t m_imsi; |
10296
13ff285523bf
Generic (not eNodeB-specific) helper functions Attach and Connect
Budiarto Herman <budiarto.herman@magister.fi>
parents:
9430
diff
changeset
|
202 |
|
10983
087597a150da
LTE doxygen additions
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10374
diff
changeset
|
203 |
/// Closed Subscriber Group identity. |
10300
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
204 |
uint32_t m_csgId; |
792cecb6cf2d
Evaluation of cell selection criteria
Budiarto Herman <budiarto.herman@magister.fi>
parents:
10296
diff
changeset
|
205 |
|
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
206 |
LteAsSapProvider* m_asSapProvider; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
207 |
LteAsSapUser* m_asSapUser; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
208 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
209 |
uint8_t m_bidCounter; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
210 |
EpcTftClassifier m_tftClassifier; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
211 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
212 |
Callback <void, Ptr<Packet> > m_forwardUpCallback; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
213 |
|
9406 | 214 |
struct BearerToBeActivated |
215 |
{ |
|
216 |
EpsBearer bearer; |
|
217 |
Ptr<EpcTft> tft; |
|
218 |
}; |
|
219 |
||
220 |
std::list<BearerToBeActivated> m_bearersToBeActivatedList; |
|
221 |
||
9337
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
222 |
}; |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
223 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
224 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
225 |
} // namespace ns3 |
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
226 |
|
ae7126b266ce
revised LTE protocol stack for new RRC model
Nicola Baldo <nbaldo@cttc.es>
parents:
diff
changeset
|
227 |
#endif // EPC_UE_NAS_H |