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 |
| 22 #include "rrc-entity.h" |
| 23 #include <ns3/log.h> |
| 24 #include <ns3/pointer.h> |
| 25 #include <ns3/packet.h> |
| 26 #include "radio-bearer-instance.h" |
| 27 |
| 28 NS_LOG_COMPONENT_DEFINE ("RrcEntity"); |
| 29 |
| 30 namespace ns3 { |
| 31 |
| 32 |
| 33 NS_OBJECT_ENSURE_REGISTERED (RrcEntity); |
| 34 |
| 35 TypeId RrcEntity::GetTypeId (void) |
| 36 { |
| 37 static TypeId tid = TypeId ("ns3::RrcEntity") |
| 38 .SetParent<Object> () |
| 39 ; |
| 40 return tid; |
| 41 } |
| 42 |
| 43 |
| 44 RrcEntity::RrcEntity () |
| 45 { |
| 46 CreateBearersContainer (); |
| 47 } |
| 48 |
| 49 |
| 50 RrcEntity::~RrcEntity () |
| 51 { |
| 52 delete m_downlinkGbrBearersContainer; |
| 53 delete m_downlinkNgbrBearersContainer; |
| 54 delete m_uplinkGbrBearersContainer; |
| 55 delete m_uplinkNgbrBearersContainer; |
| 56 } |
| 57 |
| 58 void |
| 59 RrcEntity::CreateBearersContainer () |
| 60 { |
| 61 m_downlinkGbrBearersContainer = new BearersContainer (); |
| 62 m_downlinkNgbrBearersContainer = new BearersContainer (); |
| 63 m_uplinkGbrBearersContainer = new BearersContainer (); |
| 64 m_uplinkNgbrBearersContainer = new BearersContainer (); |
| 65 |
| 66 m_defaultBearer = CreateObject<RadioBearerInstance> (); |
| 67 } |
| 68 |
| 69 |
| 70 RrcEntity::BearersContainer* |
| 71 RrcEntity::GetDownlinkGbrBearers (void) const |
| 72 { |
| 73 return m_downlinkGbrBearersContainer; |
| 74 } |
| 75 |
| 76 |
| 77 RrcEntity::BearersContainer* |
| 78 RrcEntity::GetDownlinkNgbrBearers (void) const |
| 79 { |
| 80 return m_downlinkNgbrBearersContainer; |
| 81 } |
| 82 |
| 83 |
| 84 RrcEntity::BearersContainer* |
| 85 RrcEntity::GetUplinkGbrBearers (void) const |
| 86 { |
| 87 return m_uplinkGbrBearersContainer; |
| 88 } |
| 89 |
| 90 |
| 91 RrcEntity::BearersContainer* |
| 92 RrcEntity::GetUplinkNgbrBearers (void) const |
| 93 { |
| 94 return m_uplinkNgbrBearersContainer; |
| 95 } |
| 96 |
| 97 |
| 98 void |
| 99 RrcEntity::AddBearer (Ptr<RadioBearerInstance> bearer) |
| 100 { |
| 101 |
| 102 } |
| 103 |
| 104 |
| 105 Ptr<RadioBearerInstance> |
| 106 RrcEntity::GetBearer (Ptr<IpClassifierRecord> ipc) const |
| 107 { |
| 108 return 0; |
| 109 } |
| 110 |
| 111 |
| 112 Ptr<RadioBearerInstance> |
| 113 RrcEntity::GetDefaultBearer (void) |
| 114 { |
| 115 return m_defaultBearer; |
| 116 } |
| 117 |
| 118 |
| 119 } // namespace ns3 |
OLD | NEW |