author | Manuel Requena <manuel.requena@cttc.es> |
Tue, 26 Mar 2013 10:41:49 +0100 | |
changeset 10019 | 6efd95740e39 |
parent 9413 | 20f1c6678ee2 |
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: Nicola Baldo <nbaldo@cttc.es> |
|
19 |
*/ |
|
20 |
||
21 |
#ifndef LTE_UE_CMAC_SAP_H |
|
22 |
#define LTE_UE_CMAC_SAP_H |
|
23 |
||
24 |
#include <ns3/packet.h> |
|
25 |
#include <ns3/ff-mac-common.h> |
|
26 |
#include <ns3/eps-bearer.h> |
|
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7909
diff
changeset
|
27 |
#include <ns3/lte-common.h> |
7886 | 28 |
|
29 |
namespace ns3 { |
|
30 |
||
31 |
||
32 |
||
33 |
class LteMacSapUser; |
|
34 |
||
35 |
/** |
|
36 |
* Service Access Point (SAP) offered by the UE MAC to the UE RRC |
|
37 |
* |
|
38 |
* This is the MAC SAP Provider, i.e., the part of the SAP that contains the MAC methods called by the RRC |
|
39 |
*/ |
|
40 |
class LteUeCmacSapProvider |
|
41 |
{ |
|
42 |
public: |
|
7909
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7886
diff
changeset
|
43 |
virtual ~LteUeCmacSapProvider (); |
9406 | 44 |
|
9413
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
45 |
struct RachConfig |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
46 |
{ |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
47 |
uint8_t numberOfRaPreambles; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
48 |
uint8_t preambleTransMax; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
49 |
uint8_t raResponseWindowSize; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
50 |
}; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
51 |
|
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
52 |
virtual void ConfigureRach (RachConfig rc) = 0; |
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
53 |
|
9406 | 54 |
/** |
55 |
* tell the MAC to start a contention-based random access procedure, |
|
56 |
* e.g., to perform RRC connection establishment |
|
57 |
* |
|
58 |
*/ |
|
59 |
virtual void StartContentionBasedRandomAccessProcedure () = 0; |
|
60 |
||
61 |
/** |
|
62 |
* tell the MAC to start a non-contention-based random access |
|
63 |
* procedure, e.g., as a consequence of handover |
|
64 |
* |
|
7886 | 65 |
* \param rnti |
9413
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
66 |
* \param rapId Random Access Preamble Identifier |
9406 | 67 |
* \param prachMask |
7886 | 68 |
*/ |
9413
20f1c6678ee2
improved LTE Random Access model
Nicola Baldo <nbaldo@cttc.es>
parents:
9406
diff
changeset
|
69 |
virtual void StartNonContentionBasedRandomAccessProcedure (uint16_t rnti, uint8_t rapId, uint8_t prachMask) = 0; |
9406 | 70 |
|
7886 | 71 |
|
9406 | 72 |
struct LogicalChannelConfig |
73 |
{ |
|
74 |
uint8_t priority; |
|
75 |
uint16_t prioritizedBitRateKbps; |
|
76 |
uint16_t bucketSizeDurationMs; |
|
77 |
uint8_t logicalChannelGroup; |
|
78 |
}; |
|
79 |
||
80 |
/** |
|
81 |
* add a new Logical Channel (LC) |
|
82 |
* |
|
83 |
* \param lcId the ID of the LC |
|
84 |
* \param lcConfig the LC configuration provided by the RRC |
|
85 |
* \param msu the corresponding LteMacSapUser |
|
86 |
*/ |
|
87 |
virtual void AddLc (uint8_t lcId, LogicalChannelConfig lcConfig, LteMacSapUser* msu) = 0; |
|
7886 | 88 |
|
9406 | 89 |
/** |
90 |
* remove an existing LC |
|
91 |
* |
|
92 |
* \param lcId |
|
93 |
*/ |
|
7886 | 94 |
virtual void RemoveLc (uint8_t lcId) = 0; |
9406 | 95 |
|
96 |
/** |
|
97 |
* reset the MAC |
|
98 |
* |
|
99 |
*/ |
|
100 |
virtual void Reset () = 0; |
|
8714
398bbcbb3f42
Add MIMO model, test and documentation
Marco Miozzo <marco.miozzo@cttc.es>
parents:
7909
diff
changeset
|
101 |
|
7886 | 102 |
}; |
103 |
||
104 |
||
105 |
||
106 |
/** |
|
107 |
* Service Access Point (SAP) offered by the UE MAC to the UE RRC |
|
108 |
* |
|
109 |
* This is the MAC SAP User, i.e., the part of the SAP that contains the RRC methods called by the MAC |
|
110 |
*/ |
|
111 |
class LteUeCmacSapUser |
|
112 |
{ |
|
113 |
public: |
|
9406 | 114 |
|
7909
82b1281ea0a3
Updates for MACOS compilation (virtual destructors and variable types)
mmiozzo
parents:
7886
diff
changeset
|
115 |
virtual ~LteUeCmacSapUser (); |
9406 | 116 |
|
117 |
/** |
|
118 |
* |
|
119 |
* |
|
120 |
* \param rnti the T-C-RNTI, which will eventually become the C-RNTI after contention resolution |
|
121 |
*/ |
|
122 |
virtual void SetTemporaryCellRnti (uint16_t rnti) = 0; |
|
123 |
||
124 |
/** |
|
125 |
* Notify the RRC that the MAC Random Access procedure completed successfully |
|
126 |
* |
|
127 |
*/ |
|
128 |
virtual void NotifyRandomAccessSuccessful () = 0; |
|
129 |
||
130 |
/** |
|
131 |
* Notify the RRC that the MAC Random Access procedure failed |
|
132 |
* |
|
133 |
*/ |
|
134 |
virtual void NotifyRandomAccessFailed () = 0; |
|
7886 | 135 |
}; |
136 |
||
137 |
||
138 |
||
139 |
||
140 |
} // namespace ns3 |
|
141 |
||
142 |
||
143 |
#endif // LTE_UE_CMAC_SAP_H |