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 "rlc-entity.h" |
| 23 #include <ns3/log.h> |
| 24 #include <ns3/pointer.h> |
| 25 #include <ns3/packet.h> |
| 26 #include "ue-net-device.h" |
| 27 #include "enb-net-device.h" |
| 28 #include "rrc-entity.h" |
| 29 |
| 30 NS_LOG_COMPONENT_DEFINE ("RlcEntity"); |
| 31 |
| 32 namespace ns3 { |
| 33 |
| 34 |
| 35 NS_OBJECT_ENSURE_REGISTERED (RlcEntity); |
| 36 |
| 37 TypeId RlcEntity::GetTypeId (void) |
| 38 { |
| 39 static TypeId tid = TypeId ("ns3::RlcEntity") |
| 40 .SetParent<Object> (); |
| 41 return tid; |
| 42 } |
| 43 |
| 44 |
| 45 |
| 46 RlcEntity::RlcEntity () |
| 47 : m_device (0) |
| 48 { |
| 49 NS_LOG_FUNCTION (this); |
| 50 } |
| 51 |
| 52 |
| 53 RlcEntity::RlcEntity (Ptr<LteNetDevice> d) |
| 54 : m_device (d) |
| 55 { |
| 56 NS_LOG_FUNCTION (this); |
| 57 } |
| 58 |
| 59 |
| 60 RlcEntity::~RlcEntity () |
| 61 { |
| 62 NS_LOG_FUNCTION (this); |
| 63 } |
| 64 |
| 65 |
| 66 void |
| 67 RlcEntity::SetDevice (Ptr<LteNetDevice> d) |
| 68 { |
| 69 NS_LOG_FUNCTION (this); |
| 70 m_device = d; |
| 71 } |
| 72 |
| 73 |
| 74 Ptr<LteNetDevice> |
| 75 RlcEntity::GetDevice (void) |
| 76 { |
| 77 NS_LOG_FUNCTION (this); |
| 78 return m_device; |
| 79 } |
| 80 |
| 81 |
| 82 Ptr<Packet> |
| 83 RlcEntity::Dequeue () |
| 84 { |
| 85 NS_LOG_FUNCTION (this); |
| 86 |
| 87 Ptr<Packet> p = GetDevice ()->GetRrcEntity ()->GetDefaultBearer ()->Dequeue ()
; |
| 88 return p; |
| 89 } |
| 90 |
| 91 |
| 92 } // namespace ns3 |
OLD | NEW |