/usr/include/ns3.27/ns3/lte-rrc-protocol-real.h is in libns3-dev 3.27+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Authors: Nicola Baldo <nbaldo@cttc.es>
* Lluis Parcerisa <lparcerisa@cttc.cat>
*/
#ifndef LTE_RRC_PROTOCOL_REAL_H
#define LTE_RRC_PROTOCOL_REAL_H
#include <stdint.h>
#include <map>
#include <ns3/ptr.h>
#include <ns3/object.h>
#include <ns3/lte-rrc-sap.h>
#include <ns3/lte-pdcp-sap.h>
#include <ns3/lte-rlc-sap.h>
#include <ns3/lte-rrc-header.h>
namespace ns3 {
class LteUeRrcSapProvider;
class LteUeRrcSapUser;
class LteEnbRrcSapProvider;
class LteUeRrc;
/**
* \ingroup lte
*
* Models the transmission of RRC messages from the UE to the eNB in
* a real fashion, by creating real RRC PDUs and transmitting them
* over Signaling Radio Bearers using radio resources allocated by the
* LTE MAC scheduler.
*
*/
class LteUeRrcProtocolReal : public Object
{
/// allow MemberLteUeRrcSapUser<LteUeRrcProtocolReal> class friend access
friend class MemberLteUeRrcSapUser<LteUeRrcProtocolReal>;
/// allow LteRlcSpecificLteRlcSapUser<LteUeRrcProtocolReal> class friend access
friend class LteRlcSpecificLteRlcSapUser<LteUeRrcProtocolReal>;
/// allow LtePdcpSpecificLtePdcpSapUser<LteUeRrcProtocolReal> class friend access
friend class LtePdcpSpecificLtePdcpSapUser<LteUeRrcProtocolReal>;
public:
LteUeRrcProtocolReal ();
virtual ~LteUeRrcProtocolReal ();
// inherited from Object
virtual void DoDispose (void);
/**
* \brief Get the type ID.
* \return the object TypeId
*/
static TypeId GetTypeId (void);
/**
* Set LTE UE RRC SAP provider function
*
* \param p the LTE UE RRC SAP provider
*/
void SetLteUeRrcSapProvider (LteUeRrcSapProvider* p);
/**
* Get LTE UE RRC SAP user function
*
* \returns LTE UE RRC SAP user
*/
LteUeRrcSapUser* GetLteUeRrcSapUser ();
/**
* Set UE RRC function
*
* \param rrc the LTE UE RRC
*/
void SetUeRrc (Ptr<LteUeRrc> rrc);
private:
// methods forwarded from LteUeRrcSapUser
/**
* Setup function
*
* \param params LteUeRrcSapUser::SetupParameters
*/
void DoSetup (LteUeRrcSapUser::SetupParameters params);
/**
* Send RRC connection request function
*
* \param msg LteRrcSap::RrcConnectionRequest
*/
void DoSendRrcConnectionRequest (LteRrcSap::RrcConnectionRequest msg);
/**
* Send RRC connection setup completed function
*
* \param msg LteRrcSap::RrcConnectionSetupCompleted
*/
void DoSendRrcConnectionSetupCompleted (LteRrcSap::RrcConnectionSetupCompleted msg);
/**
* Send RRC connection reconfiguration setup completed function
*
* \param msg LteRrcSap::RrcConnectionReconfigurationCompleted
*/
void DoSendRrcConnectionReconfigurationCompleted (LteRrcSap::RrcConnectionReconfigurationCompleted msg);
/**
* Send RRC connection reestablishment request function
*
* \param msg LteRrcSap::RrcConnectionReestablishmentRequest
*/
void DoSendRrcConnectionReestablishmentRequest (LteRrcSap::RrcConnectionReestablishmentRequest msg);
/**
* Send RRC connection reestablishment complete function
*
* \param msg LteRrcSap::RrcConnectionReestablishmentComplete
*/
void DoSendRrcConnectionReestablishmentComplete (LteRrcSap::RrcConnectionReestablishmentComplete msg);
/**
* Send measurement report function
*
* \param msg LteRrcSap::MeasurementReport
*/
void DoSendMeasurementReport (LteRrcSap::MeasurementReport msg);
/// Set ENB RRC SAP provider
void SetEnbRrcSapProvider ();
/**
* Receive PDCP PDU function
*
* \param p the packet
*/
void DoReceivePdcpPdu (Ptr<Packet> p);
/**
* Receive PDCP SDU function
*
* \param params LtePdcpSapUser::ReceivePdcpSduParameters
*/
void DoReceivePdcpSdu (LtePdcpSapUser::ReceivePdcpSduParameters params);
Ptr<LteUeRrc> m_rrc; ///< the RRC
uint16_t m_rnti; ///< the RNTI
LteUeRrcSapProvider* m_ueRrcSapProvider; ///< UE RRC SAP provider
LteUeRrcSapUser* m_ueRrcSapUser; ///< UE RRC SAP user
LteEnbRrcSapProvider* m_enbRrcSapProvider; ///< ENB RRC SAP provider
LteUeRrcSapUser::SetupParameters m_setupParameters; ///< setup parameters
LteUeRrcSapProvider::CompleteSetupParameters m_completeSetupParameters; ///< complete setup parameters
};
/**
* Models the transmission of RRC messages from the UE to the eNB in
* a real fashion, by creating real RRC PDUs and transmitting them
* over Signaling Radio Bearers using radio resources allocated by the
* LTE MAC scheduler.
*
*/
class LteEnbRrcProtocolReal : public Object
{
/// allow MemberLteEnbRrcSapUser<LteEnbRrcProtocolReal> class friend access
friend class MemberLteEnbRrcSapUser<LteEnbRrcProtocolReal>;
/// allow LtePdcpSpecificLtePdcpSapUser<LteEnbRrcProtocolReal> class friend access
friend class LtePdcpSpecificLtePdcpSapUser<LteEnbRrcProtocolReal>;
/// allow LteRlcSpecificLteRlcSapUser<LteEnbRrcProtocolReal> class friend access
friend class LteRlcSpecificLteRlcSapUser<LteEnbRrcProtocolReal>;
/// allow RealProtocolRlcSapUser class friend access
friend class RealProtocolRlcSapUser;
public:
LteEnbRrcProtocolReal ();
virtual ~LteEnbRrcProtocolReal ();
// inherited from Object
virtual void DoDispose (void);
/**
* \brief Get the type ID.
* \return the object TypeId
*/
static TypeId GetTypeId (void);
/**
* Set LTE ENB RRC SAP provider function
*
* \param p LteEnbRrcSapProvider *
*/
void SetLteEnbRrcSapProvider (LteEnbRrcSapProvider* p);
/**
* Get LTE ENB RRC SAP user function
*
* \returns LteEnbRrcSapUser *
*/
LteEnbRrcSapUser* GetLteEnbRrcSapUser ();
/**
* Set cell ID function
*
* \param cellId the cell ID
*/
void SetCellId (uint16_t cellId);
/**
* Get UE RRC SAP provider function
*
* \param rnti the RNTI
* \returns LteUeRrcSapProvider *
*/
LteUeRrcSapProvider* GetUeRrcSapProvider (uint16_t rnti);
/**
* Set UE RRC SAP provider function
*
* \param rnti the RNTI
* \param p LteUeRrcSapProvider *
*/
void SetUeRrcSapProvider (uint16_t rnti, LteUeRrcSapProvider* p);
private:
// methods forwarded from LteEnbRrcSapUser
/**
* Setup UE function
*
* \param rnti the RNTI
* \param params LteEnbRrcSapUser::SetupUeParameters
*/
void DoSetupUe (uint16_t rnti, LteEnbRrcSapUser::SetupUeParameters params);
/**
* Remove UE function
*
* \param rnti the RNTI
*/
void DoRemoveUe (uint16_t rnti);
/**
* Send system information function
*
* \param cellId cell ID
* \param msg LteRrcSap::SystemInformation
*/
void DoSendSystemInformation (uint16_t cellId, LteRrcSap::SystemInformation msg);
/**
* Send system information function
*
* \param cellId cell ID
* \param msg LteRrcSap::SystemInformation
*/
void SendSystemInformation (uint16_t cellId, LteRrcSap::SystemInformation msg);
/**
* Send RRC connection setup function
*
* \param rnti the RNTI
* \param msg LteRrcSap::RrcConnectionSetup
*/
void DoSendRrcConnectionSetup (uint16_t rnti, LteRrcSap::RrcConnectionSetup msg);
/**
* Send RRC connection reconfiguration function
*
* \param rnti the RNTI
* \param msg LteRrcSap::RrcConnectionReconfiguration
*/
void DoSendRrcConnectionReconfiguration (uint16_t rnti, LteRrcSap::RrcConnectionReconfiguration msg);
/**
* Send RRC connection reestabishment function
*
* \param rnti the RNTI
* \param msg LteRrcSap::RrcConnectionReestablishment
*/
void DoSendRrcConnectionReestablishment (uint16_t rnti, LteRrcSap::RrcConnectionReestablishment msg);
/**
* Send RRC connection reestabishment reject function
*
* \param rnti the RNTI
* \param msg LteRrcSap::RrcConnectionReestablishmentReject
*/
void DoSendRrcConnectionReestablishmentReject (uint16_t rnti, LteRrcSap::RrcConnectionReestablishmentReject msg);
/**
* Send RRC connection release function
*
* \param rnti the RNTI
* \param msg LteRrcSap::RrcConnectionRelease
*/
void DoSendRrcConnectionRelease (uint16_t rnti, LteRrcSap::RrcConnectionRelease msg);
/**
* Send RRC connection reject function
*
* \param rnti the RNTI
* \param msg LteRrcSap::RrcConnectionReject
*/
void DoSendRrcConnectionReject (uint16_t rnti, LteRrcSap::RrcConnectionReject msg);
/**
* Encode handover preparation information function
*
* \param msg LteRrcSap::HandoverPreparationInfo
* \returns the packet
*/
Ptr<Packet> DoEncodeHandoverPreparationInformation (LteRrcSap::HandoverPreparationInfo msg);
/**
* Decode handover preparation information function
*
* \param p the packet
* \returns LteRrcSap::HandoverPreparationInfo
*/
LteRrcSap::HandoverPreparationInfo DoDecodeHandoverPreparationInformation (Ptr<Packet> p);
/**
* Encode handover command function
*
* \param msg LteRrcSap::RrcConnectionReconfiguration
* \returns the packet
*/
Ptr<Packet> DoEncodeHandoverCommand (LteRrcSap::RrcConnectionReconfiguration msg);
/**
* Decode handover command function
*
* \param p the packet
* \returns LteRrcSap::RrcConnectionReconfiguration
*/
LteRrcSap::RrcConnectionReconfiguration DoDecodeHandoverCommand (Ptr<Packet> p);
/**
* Receive PDCP SDU function
*
* \param params LtePdcpSapUser::ReceivePdcpSduParameters
*/
void DoReceivePdcpSdu (LtePdcpSapUser::ReceivePdcpSduParameters params);
/**
* Receive PDCP PDU function
*
* \param rnti the RNTI
* \param p the packet
*/
void DoReceivePdcpPdu (uint16_t rnti, Ptr<Packet> p);
uint16_t m_rnti; ///< the RNTI
uint16_t m_cellId; ///< the cell ID
LteEnbRrcSapProvider* m_enbRrcSapProvider; ///< ENB RRC SAP provider
LteEnbRrcSapUser* m_enbRrcSapUser; ///< ENB RRC SAP user
std::map<uint16_t, LteUeRrcSapProvider*> m_enbRrcSapProviderMap; ///< ENB RRC SAP provider map
std::map<uint16_t, LteEnbRrcSapUser::SetupUeParameters> m_setupUeParametersMap; ///< setup UE parameters map
std::map<uint16_t, LteEnbRrcSapProvider::CompleteSetupUeParameters> m_completeSetupUeParametersMap; ///< complete setup UE parameters map
};
/// RealProtocolRlcSapUser class
class RealProtocolRlcSapUser : public LteRlcSapUser
{
public:
/**
* Real protocol RC SAP user
*
* \param pdcp LteEnbRrcProtocolReal *
* \param rnti the RNTI
*/
RealProtocolRlcSapUser (LteEnbRrcProtocolReal* pdcp, uint16_t rnti);
// Interface implemented from LteRlcSapUser
virtual void ReceivePdcpPdu (Ptr<Packet> p);
private:
RealProtocolRlcSapUser ();
LteEnbRrcProtocolReal* m_pdcp; ///< PDCP
uint16_t m_rnti; ///< RNTI
};
}
#endif // LTE_RRC_PROTOCOL_REAL_H
|