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 <ns3/log.h> |
| 23 #include <ns3/pointer.h> |
| 24 #include "ue-net-device.h" |
| 25 #include "enb-net-device.h" |
| 26 #include "packet-scheduler.h" |
| 27 #include "enb-mac-entity.h" |
| 28 |
| 29 NS_LOG_COMPONENT_DEFINE ("PacketScheduler"); |
| 30 |
| 31 namespace ns3 { |
| 32 |
| 33 |
| 34 NS_OBJECT_ENSURE_REGISTERED (PacketScheduler); |
| 35 |
| 36 PacketScheduler::PacketScheduler () |
| 37 : m_enb (0), |
| 38 m_macEntity (0) |
| 39 { |
| 40 NS_LOG_FUNCTION (this); |
| 41 } |
| 42 |
| 43 |
| 44 PacketScheduler::PacketScheduler (Ptr<EnbNetDevice> enb) |
| 45 : m_enb (enb), |
| 46 m_macEntity (0) |
| 47 { |
| 48 NS_LOG_FUNCTION (this); |
| 49 } |
| 50 |
| 51 |
| 52 /* |
| 53 TypeId |
| 54 PacketScheduler::GetTypeId (void) |
| 55 { |
| 56 static TypeId tid = TypeId ("ns3::PacketScheduler") |
| 57 .SetParent<Object> () |
| 58 .AddConstructor<PacketScheduler> () |
| 59 ; |
| 60 return tid; |
| 61 } |
| 62 */ |
| 63 |
| 64 |
| 65 PacketScheduler::~PacketScheduler () |
| 66 { |
| 67 NS_LOG_FUNCTION (this); |
| 68 } |
| 69 |
| 70 |
| 71 void |
| 72 PacketScheduler::SetDevice (Ptr<EnbNetDevice> enb) |
| 73 { |
| 74 NS_LOG_FUNCTION (this << enb); |
| 75 m_enb = enb; |
| 76 } |
| 77 |
| 78 |
| 79 Ptr<EnbNetDevice> |
| 80 PacketScheduler::GetDevice () |
| 81 { |
| 82 NS_LOG_FUNCTION (this); |
| 83 return m_enb; |
| 84 } |
| 85 |
| 86 |
| 87 |
| 88 void |
| 89 PacketScheduler::SetMacEntity (Ptr<MacEntity> mac) |
| 90 { |
| 91 NS_LOG_FUNCTION (this); |
| 92 m_macEntity = mac; |
| 93 } |
| 94 |
| 95 |
| 96 Ptr<MacEntity> |
| 97 PacketScheduler::GetMacEntity (void) |
| 98 { |
| 99 NS_LOG_FUNCTION (this); |
| 100 return m_macEntity; |
| 101 } |
| 102 |
| 103 |
| 104 void |
| 105 PacketScheduler::RunPacketScheduler (void) |
| 106 { |
| 107 NS_LOG_FUNCTION (this); |
| 108 DoRunPacketScheduler (); |
| 109 } |
| 110 |
| 111 |
| 112 } // namespace ns3 |
OLD | NEW |