User Manual, Developers Guide and API Documentation

HARQRetransmissionProxy.cpp

Go to the documentation of this file.
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/HARQRetransmissionProxy.hpp>
00029 
00030 using namespace wns::scheduler::harq;
00031 
00032 STATIC_FACTORY_REGISTER_WITH_CREATOR(
00033                                       HARQRetransmissionProxy,
00034                                       HARQInterface,
00035                                       "harqRetransmissionProxy",
00036                                       wns::PyConfigViewCreator);
00037 
00038 HARQRetransmissionProxy::HARQRetransmissionProxy(const wns::pyconfig::View& config):
00039     logger_(config.get("logger")),
00040     downlinkHARQ_(NULL)
00041 {
00042 }
00043 
00044 HARQRetransmissionProxy::~HARQRetransmissionProxy()
00045 {
00046 }
00047 
00048 void
00049 HARQRetransmissionProxy::setDownlinkHARQ(HARQInterface* downlinkHARQ)
00050 {
00051     assure(downlinkHARQ, "Invalid downlink HARQ instance");
00052 
00053     downlinkHARQ_ = downlinkHARQ;
00054 }
00055 
00056 wns::scheduler::UserSet
00057 HARQRetransmissionProxy::getPeersWithPendingRetransmissions() const
00058 {
00059     assure(downlinkHARQ_, "There is no downlinkHARQ set.");
00060     return downlinkHARQ_->getPeersWithPendingRetransmissions();
00061 }
00062 
00063 std::list<int>
00064 HARQRetransmissionProxy::getPeerProcessesWithRetransmissions(wns::scheduler::UserID peer) const
00065 {
00066     assure(downlinkHARQ_, "There is no downlinkHARQ set.");
00067     return downlinkHARQ_->getPeerProcessesWithRetransmissions(peer);
00068 }
00069 
00070 int
00071 HARQRetransmissionProxy::getNumberOfPeerRetransmissions(wns::scheduler::UserID peer, int processID) const
00072 {
00073     assure(downlinkHARQ_, "There is no downlinkHARQ set.");
00074     return downlinkHARQ_->getNumberOfPeerRetransmissions(peer, processID);
00075 }
00076 
00077 void
00078 HARQRetransmissionProxy::schedulePeerRetransmissions(wns::scheduler::UserID peer, int processID)
00079 {
00080     assure(downlinkHARQ_, "There is no downlinkHARQ set.");
00081     downlinkHARQ_->schedulePeerRetransmissions(peer, processID);
00082 }
00083 void
00084 HARQRetransmissionProxy::sendPendingFeedback()
00085 {
00086     assure(false, "This is only a proxy. You cannot call sendPendingFeedback. You're in uplink dude!");
00087 }
00088 
00089 void
00090 HARQRetransmissionProxy::storeSchedulingTimeSlot(long int transportBlockID,
00091                                                  const wns::scheduler::SchedulingTimeSlotPtr& resourceBlock)
00092 {
00093     assure(false, "This is only a proxy. You cannot call storeSchedulingTimeslot. You're in uplink dude!");
00094 }
00095 
00096 void
00097 HARQRetransmissionProxy::onTimeSlotReceived(const wns::scheduler::SchedulingTimeSlotPtr& resourceBlock,
00098                                             HARQInterface::TimeSlotInfo)
00099 {
00100     assure(false, "This is only a proxy. You cannot call onSchedulingTimeslotReceived. You're in uplink dude!");
00101 }
00102 
00103 HARQInterface::DecodeStatusContainer
00104 HARQRetransmissionProxy::decode()
00105 {
00106     assure(false, "This is only a proxy. You cannot call decode. You're in uplink dude!");
00107     HARQInterface::DecodeStatusContainer a;
00108     return a;
00109 }
00110 
00111 wns::scheduler::UserSet
00112 HARQRetransmissionProxy::getUsersWithRetransmissions() const
00113 {
00114     assure(false, "This is only a proxy. You cannot call getUsersWithRetransmissions. You're in uplink dude!");
00115 }
00116 
00117 std::list<int>
00118 HARQRetransmissionProxy::getProcessesWithRetransmissions(wns::scheduler::UserID peer) const
00119 {
00120   assure(false, "This is only a proxy. You cannot call getProcessesWithRetransmissions. You're in uplink dude!");
00121 }
00122 
00123 int
00124 HARQRetransmissionProxy::getNumberOfRetransmissions(wns::scheduler::UserID, int processID)
00125 {
00126     assure(false, "This is only a proxy. You cannot call getNumberOfRetransmissions. You're in uplink dude!");
00127 }
00128 
00129 bool
00130 HARQRetransmissionProxy::hasFreeSenderProcess(wns::scheduler::UserID peer)
00131 {
00132     assure(false, "This is only a proxy. You cannot call hasFreeSenderProcesses. You're in uplink dude!");
00133     return true;
00134 }
00135 
00136 bool
00137 HARQRetransmissionProxy::hasFreeReceiverProcess(wns::scheduler::UserID peer)
00138 {
00139     return downlinkHARQ_->hasFreeReceiverProcess(peer);
00140 }
00141 
00142 wns::scheduler::SchedulingTimeSlotPtr
00143 HARQRetransmissionProxy::getNextRetransmission(wns::scheduler::UserID user, int processID)
00144 {
00145     assure(false, "This is only a proxy. You cannot call getNextRetransmission. You're in uplink dude!");
00146 }
00147 
00148 wns::scheduler::SchedulingTimeSlotPtr
00149 HARQRetransmissionProxy::peekNextRetransmission(wns::scheduler::UserID user, int processID) const
00150 {
00151     assure(false, "This is only a proxy. You cannot call peekNextRetransmission. You're in uplink dude!");
00152 }

Generated on Thu May 24 03:31:49 2012 for openWNS by  doxygen 1.5.5