/usr/include/ns3.27/ns3/lte-ue-ccm-rrc-sap.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 | /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2015 Danilo Abrignani
*
* 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
*
* Author: Danilo Abrignani <danilo.abrignani@unibo.it>
*
*/
#ifndef LTE_UE_CCM_RRC_SAP_H
#define LTE_UE_CCM_RRC_SAP_H
#include <ns3/lte-rrc-sap.h>
#include <ns3/eps-bearer.h>
#include <ns3/lte-ue-cmac-sap.h>
#include <ns3/lte-mac-sap.h>
#include <map>
namespace ns3 {
class LteUeCmacSapProvider;
class LteMacSapUser;
/**
* \brief Service Access Point (SAP) offered by the UE component carrier manager
* to the UE RRC.
*
* This is the *Component Carrier Management SAP Provider*, i.e., the part of the SAP
* that contains the component carrier manager methods called by the Ue RRC
* instance.
*/
class LteUeCcmRrcSapProvider
{
/// allow LteMacSapUser class friend access
friend class LteMacSapUser;
public:
virtual ~LteUeCcmRrcSapProvider ();
/// LcsConfig structure
struct LcsConfig
{
uint8_t componentCarrierId; ///< component carrier ID
LteUeCmacSapProvider::LogicalChannelConfig *lcConfig; ///< logical channel config
LteMacSapUser *msu; ///< MSU
};
/**
* add a new Logical Channel (LC)
*
* \param lcId is the Logical Channel Id
* \param lcConfig is a single structure contains logical Channel Id, Logical Channel config and Component Carrier Id
* \param msu is the pointer to LteMacSapUser related to the Rlc instance
* \return vector of LcsConfig contains the lc configuration for each Mac
* the size of the vector is equal to the number of component
* carrier enabled.
*
* The Logical Channel configurations for each component carrier depend on the
* algorithm used to split the traffic between the component carriers themself.
*/
virtual std::vector<LteUeCcmRrcSapProvider::LcsConfig> AddLc (uint8_t lcId, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser* msu) = 0;
/**
* \brief Remove an existing Logical Channel for a Ue in the LteUeComponentCarrierManager
* \param lcid the Logical Channel Id
* \return vector of integer the componentCarrierId of the componentCarrier
* where the bearer is enabled
*/
virtual std::vector<uint16_t> RemoveLc (uint8_t lcid) = 0;
/// Notify reconfiguration msg function
virtual void NotifyConnectionReconfigurationMsg () = 0;
/**
* \brief Add the Signal Bearer for a specif Ue in LteUeComponenCarrierManager
* \param lcid the Logical Channel Id
* \param lcConfig this structure it is hard-coded in the LteEnbRrc
* \param msu it is the MacSapUser of the Rlc istance
* \return the LteMacSapUser of the ComponentCarrierManager
*
*/
virtual LteMacSapUser* ConfigureSignalBearer (uint8_t lcid, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser* msu) = 0;
}; // end of class LteUeCcmRrcSapProvider
/// MemberLteUeCcmRrcSapProvider class
template <class C>
class MemberLteUeCcmRrcSapProvider : public LteUeCcmRrcSapProvider
{
public:
/**
* Constructor
*
* \param owner the owner class
*/
MemberLteUeCcmRrcSapProvider (C* owner);
// inherited from LteUeCcmRrcSapProvider
virtual std::vector<uint16_t> RemoveLc (uint8_t lcid);
virtual std::vector<LteUeCcmRrcSapProvider::LcsConfig> AddLc (uint8_t lcId, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser* msu);
virtual void NotifyConnectionReconfigurationMsg ();
virtual LteMacSapUser* ConfigureSignalBearer (uint8_t lcid, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser* msu);
private:
C* m_owner; ///< the owner class
};
template <class C>
MemberLteUeCcmRrcSapProvider<C>::MemberLteUeCcmRrcSapProvider (C* owner)
: m_owner (owner)
{
}
template <class C>
std::vector<uint16_t> MemberLteUeCcmRrcSapProvider<C>::RemoveLc (uint8_t lcid)
{
return m_owner->DoRemoveLc (lcid);
}
template <class C>
std::vector<LteUeCcmRrcSapProvider::LcsConfig> MemberLteUeCcmRrcSapProvider<C>::AddLc (uint8_t lcId, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser* msu)
{
return m_owner->DoAddLc (lcId, lcConfig, msu);
}
template <class C>
void MemberLteUeCcmRrcSapProvider<C>::NotifyConnectionReconfigurationMsg ()
{
m_owner->DoNotifyConnectionReconfigurationMsg ();
}
template <class C>
LteMacSapUser* MemberLteUeCcmRrcSapProvider<C>::ConfigureSignalBearer (uint8_t lcid, LteUeCmacSapProvider::LogicalChannelConfig lcConfig, LteMacSapUser* msu)
{
return m_owner->DoConfigureSignalBearer (lcid, lcConfig, msu);
}
/**
* \brief Service Access Point (SAP) offered by the UE RRC to the UE CCM.
*
* This is the *Component Carrier Management SAP User*, i.e., the part of the SAP
* that contains the UE RRC methods called by the UE CCM instance.
*/
class LteUeCcmRrcSapUser
{
public:
virtual ~LteUeCcmRrcSapUser ();
/**
* this function will be used after the RRC notify to ComponentCarrierManager
* that a reconfiguration message with Secondary component carrier (SCc) arrived or not
* the method it is called only if the SCc wasn't set up
* \param componentCarrierList component carrier list
*/
virtual void ComponentCarrierEnabling (std::vector<uint8_t> componentCarrierList) = 0;
}; // end of class LteUeCcmRrcSapUser
/// MemberLteUeCcmRrcSapUser class
template <class C>
class MemberLteUeCcmRrcSapUser : public LteUeCcmRrcSapUser
{
public:
/**
* Constructor
*
* \param owner the owner class
*/
MemberLteUeCcmRrcSapUser (C* owner);
//inherited from LteUeCcmRrcSapUser
virtual void ComponentCarrierEnabling (std::vector<uint8_t> componentCarrierList);
private:
C* m_owner; ///< the owner class
};
template <class C>
MemberLteUeCcmRrcSapUser<C>::MemberLteUeCcmRrcSapUser (C* owner)
: m_owner (owner)
{
}
template <class C>
void MemberLteUeCcmRrcSapUser<C>::ComponentCarrierEnabling (std::vector<uint8_t> componentCarrierList)
{
m_owner->DoComponentCarrierEnabling (componentCarrierList);
}
} // end of namespace ns3
#endif /* LTE_UE_CCM_RRC_SAP_H */
|