OLD | NEW |
(Empty) | |
| 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
| 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> |
| 19 */ |
| 20 |
| 21 #ifndef BEARER_QOS_PARAMETERS_H_ |
| 22 #define BEARER_QOS_PARAMETERS_H_ |
| 23 |
| 24 #include "ns3/object.h" |
| 25 |
| 26 namespace ns3 { |
| 27 |
| 28 |
| 29 /** |
| 30 * \brief the BearerQoSParameters class implements a set of QoS |
| 31 * parameters associated to the bearer. |
| 32 * |
| 33 * Bearer Level QoS (TS 23.401, Clause 4.7.3) |
| 34 * |
| 35 * A bearer uniquely identifies traffic flows that receive a |
| 36 * common QoS treatment. |
| 37 * |
| 38 * Each bearer (GBR and Non-GBR) is associated with |
| 39 * the following bearer level QoS parameters: |
| 40 * |
| 41 * ** QoS Class Identifier (QCI) |
| 42 * A QCI is a scalar that is used as a reference to access node-specific |
| 43 * parameters that control bearer level packet forwarding treatment |
| 44 * (e.g. scheduling weights, admission thresholds, queue management |
| 45 * thresholds, link layer protocol configuration, etc.), and that have been |
| 46 * pre-configured by the operator owning the access node (e.g. eNodeB). |
| 47 * A one-to-one mapping of standardized QCI values to standardized |
| 48 * characteristics is captured TS 23.203 [6]. |
| 49 * |
| 50 * ** Allocation and Retention Priority (ARP), |
| 51 * The ARP shall contain information about the priority |
| 52 * level (scalar), the pre-emption capability (flag) and the |
| 53 * pre-emption vulnerability (flag). |
| 54 * |
| 55 * ** Guaranteed Bit Rate (GBR) for UP and DW link |
| 56 * ** Maximum Bit Rate (MBR) for UP and DW link |
| 57 * The GBR denotes the bit rate that can be expected to |
| 58 * be provided by a GBR bearer. The MBR limits the bit rate that |
| 59 * can be expected to be provided by a GBR bearer |
| 60 * (e.g. excess traffic may get discarded by a rate shaping function). |
| 61 * See clause 4.7.4 for further details on GBR and MBR |
| 62 */ |
| 63 |
| 64 class BearerQoSParameters : public Object |
| 65 { |
| 66 public: |
| 67 BearerQoSParameters (void); |
| 68 |
| 69 /** |
| 70 * \brief Create a QoS Parameters Set |
| 71 * |
| 72 * \param qci the QoS Class Identifier |
| 73 * \param gbr the maximum bit rate to guarantee |
| 74 * \param mbr the minimum bit rate to guarantee |
| 75 */ |
| 76 BearerQoSParameters (int qci, |
| 77 double gbr, |
| 78 double mbr); |
| 79 |
| 80 /** |
| 81 * \brief Create a QoS Parameters Set |
| 82 * |
| 83 * \param qci the QoS Class Identifier |
| 84 * \param apec the Allocation and Retention Priority of pre-emption capability |
| 85 * \param apev the Allocation and Retention Priority of pre-emption vulnerabil
ity |
| 86 * \param gbr the maximum bit rate to guarantee |
| 87 * \param mbr the minimum bit rate to guarantee |
| 88 */ |
| 89 BearerQoSParameters (int qci, |
| 90 bool apec, |
| 91 bool apev, |
| 92 double gbr, |
| 93 double mbr); |
| 94 |
| 95 virtual ~BearerQoSParameters (void); |
| 96 |
| 97 enum BearerQoSType |
| 98 { |
| 99 BEARER_TYPE_GBR, BEARER_TYPE_NGBR |
| 100 }; |
| 101 |
| 102 /** |
| 103 * \brief Set the QoS type of the bearer |
| 104 * \param bearerQoSType the QoS type |
| 105 */ |
| 106 void SetBearerQoSType (BearerQoSType qosType); |
| 107 |
| 108 /** |
| 109 * \brief Get the QoS type of the bearer |
| 110 * \return the QoS tyope of the bearer |
| 111 */ |
| 112 BearerQoSType GetBearerQoSType (void) const; |
| 113 |
| 114 |
| 115 /** |
| 116 * \param qci the QoS Class Identifier |
| 117 */ |
| 118 void SetQCI (int qci); |
| 119 /** |
| 120 * \return the QCI value |
| 121 */ |
| 122 int GetQCI (void) const; |
| 123 |
| 124 /** |
| 125 * \param apec the Allocation and Retention Priority of pre-emption capability |
| 126 */ |
| 127 void SetArpPreEmptionCapability (bool apec); |
| 128 /** |
| 129 * \return the ArpPreEmptionCapability value |
| 130 */ |
| 131 bool GetArpPreEmptionCapability (void) const; |
| 132 |
| 133 /** |
| 134 * \param apev the Allocation and Retention Priority of pre-emption vulnerabil
ity |
| 135 */ |
| 136 void SetArpPreEmptionVulnerability (bool apev); |
| 137 /** |
| 138 * \return the ArpPreEmptionVulnerability value |
| 139 */ |
| 140 bool GetArpPreEmptionVulnerability (void) const; |
| 141 |
| 142 /** |
| 143 * \param gbr the maximum bit rate to guarantee |
| 144 */ |
| 145 void SetGBR (double gbr); |
| 146 /** |
| 147 * \return the maximum bit rate |
| 148 */ |
| 149 double GetGBR (void) const; |
| 150 |
| 151 /** |
| 152 * \param mbr the minimum bit rate to guarantee |
| 153 */ |
| 154 void SetMBR (double mbr); |
| 155 /** |
| 156 * \return the minimum bit rate |
| 157 */ |
| 158 double GetMBR (void) const; |
| 159 |
| 160 /** |
| 161 * \param targetDelay the target delay |
| 162 */ |
| 163 void SetMaxDelay (double targetDelay); |
| 164 /** |
| 165 * \return the targetDelay value |
| 166 */ |
| 167 double GetMaxDelay (void) const; |
| 168 |
| 169 private: |
| 170 BearerQoSType m_bearerQoSType; |
| 171 |
| 172 int m_qci; |
| 173 bool m_arpPreEmptionCapability; |
| 174 bool m_arpPreEmptionVulnerability; |
| 175 double m_gbr; |
| 176 double m_mbr; |
| 177 double m_maxDelay; |
| 178 }; |
| 179 |
| 180 |
| 181 } |
| 182 #endif /* BEARER_QOS_PARAMETERS_H_ */ |
OLD | NEW |