![]() |
User Manual, Developers Guide and API Documentation |
![]() |
00001 /******************************************************************************* 00002 * This file is part of openWNS (open Wireless Network Simulator) 00003 * _____________________________________________________________________________ 00004 * 00005 * Copyright (C) 2004-2007 00006 * Chair of Communication Networks (ComNets) 00007 * Kopernikusstr. 5, D-52074 Aachen, Germany 00008 * phone: ++49-241-80-27910, 00009 * fax: ++49-241-80-22242 00010 * email: info@openwns.org 00011 * www: http://www.openwns.org 00012 * _____________________________________________________________________________ 00013 * 00014 * openWNS is free software; you can redistribute it and/or modify it under the 00015 * terms of the GNU Lesser General Public License version 2 as published by the 00016 * Free Software Foundation; 00017 * 00018 * openWNS is distributed in the hope that it will be useful, but WITHOUT ANY 00019 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 00020 * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 00021 * details. 00022 * 00023 * You should have received a copy of the GNU Lesser General Public License 00024 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00025 * 00026 ******************************************************************************/ 00027 00028 #include <WNS/scheduler/harq/NoHARQ.hpp> 00029 00030 using namespace wns::scheduler::harq; 00031 00032 STATIC_FACTORY_REGISTER_WITH_CREATOR( 00033 NoHARQ, 00034 HARQInterface, 00035 "noharq", 00036 wns::PyConfigViewCreator); 00037 00038 NoHARQ::NoHARQ(const wns::pyconfig::View& config) 00039 { 00040 } 00041 00042 NoHARQ::~NoHARQ() 00043 { 00044 } 00045 00046 void 00047 NoHARQ::storeSchedulingTimeSlot(long int transportBlockID, const wns::scheduler::SchedulingTimeSlotPtr& resourceBlock) 00048 { 00049 } 00050 00051 void 00052 NoHARQ::onTimeSlotReceived(const wns::scheduler::SchedulingTimeSlotPtr& resourceBlock, 00053 HARQInterface::TimeSlotInfo info) 00054 { 00055 wns::scheduler::UserID userID = 00056 resourceBlock->physicalResources[0].getSourceUserIDOfScheduledCompounds(); 00057 00058 assure(!resourceBlock->isHARQEnabled(), 00059 "Received HARQ transmission but HARQ strategy is NoHARQ"); 00060 00061 resourceBlock->harq.successfullyDecoded = true; 00062 receivedNonHARQTimeslots_.push_back(HARQInterface::DecodeStatusContainerEntry(resourceBlock, info)); 00063 return; 00064 } 00065 00066 HARQInterface::DecodeStatusContainer 00067 NoHARQ::decode() 00068 { 00069 HARQInterface::DecodeStatusContainer tmp; 00070 tmp = receivedNonHARQTimeslots_; 00071 receivedNonHARQTimeslots_.clear(); 00072 00073 return tmp; 00074 } 00075 00076 wns::scheduler::UserSet 00077 NoHARQ::getUsersWithRetransmissions() const 00078 { 00079 wns::scheduler::UserSet empty; 00080 return empty; 00081 } 00082 00083 std::list<int> 00084 NoHARQ::getProcessesWithRetransmissions(wns::scheduler::UserID peer) const 00085 { 00086 std::list<int> empty; 00087 return empty; 00088 } 00089 00090 int 00091 NoHARQ::getNumberOfRetransmissions(wns::scheduler::UserID, int processID) 00092 { 00093 int numberOfRetransmissions = 0; 00094 return numberOfRetransmissions; 00095 } 00096 00097 bool 00098 NoHARQ::hasFreeSenderProcess(wns::scheduler::UserID peer) 00099 { 00100 return true; 00101 } 00102 00103 bool 00104 NoHARQ::hasFreeReceiverProcess(wns::scheduler::UserID peer) 00105 { 00106 return true; 00107 } 00108 00109 wns::scheduler::SchedulingTimeSlotPtr 00110 NoHARQ::getNextRetransmission(wns::scheduler::UserID, int processID) 00111 { 00112 return wns::scheduler::SchedulingTimeSlotPtr(); // empty 00113 } 00114 00115 wns::scheduler::SchedulingTimeSlotPtr 00116 NoHARQ::peekNextRetransmission(wns::scheduler::UserID, int processID) const 00117 { 00118 return wns::scheduler::SchedulingTimeSlotPtr(); // empty 00119 } 00120 00121 void 00122 NoHARQ::setDownlinkHARQ(HARQInterface* downlinkHARQ) 00123 { 00124 } 00125 00126 wns::scheduler::UserSet 00127 NoHARQ::getPeersWithPendingRetransmissions() const 00128 { 00129 wns::scheduler::UserSet u; 00130 return u; 00131 } 00132 00133 std::list<int> 00134 NoHARQ::getPeerProcessesWithRetransmissions(wns::scheduler::UserID peer) const 00135 { 00136 std::list<int> empty; 00137 return empty; 00138 } 00139 00140 int 00141 NoHARQ::getNumberOfPeerRetransmissions(wns::scheduler::UserID peer, int processID) const 00142 { 00143 return 0; 00144 } 00145 00146 void 00147 NoHARQ::schedulePeerRetransmissions(wns::scheduler::UserID peer, int processID) 00148 { 00149 } 00150 00151 void 00152 NoHARQ::sendPendingFeedback() 00153 { 00154 } 00155 00156
1.5.5