![]() |
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-2009 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 <WIMAC/scheduler/RegistryProxyWiMAC.hpp> 00029 00030 #include <WNS/node/Node.hpp> 00031 #include <WNS/ldk/FUNConfigCreator.hpp> 00032 #include <WNS/service/phy/phymode/PhyModeMapperInterface.hpp> 00033 #include <WNS/service/qos/QoSClasses.hpp> 00034 #include <WNS/service/dll/StationTypes.hpp> 00035 00036 #include <WIMAC/StationManager.hpp> 00037 #include <WIMAC/Classifier.hpp> 00038 #include <WIMAC/scheduler/Scheduler.hpp> 00039 #include <WIMAC/parameter/PHY.hpp> 00040 #include <WIMAC/parameter/PHY.hpp> 00041 #include <WIMAC/services/ConnectionManager.hpp> 00042 #include <WIMAC/services/InterferenceCache.hpp> 00043 #include <WIMAC/ConnectionIdentifier.hpp> 00044 #include <WIMAC/frame/ULMapCollector.hpp> 00045 00046 00047 using namespace wimac; 00048 using namespace wimac::scheduler; 00049 00050 STATIC_FACTORY_REGISTER_WITH_CREATOR(RegistryProxyWiMAC, wns::scheduler::RegistryProxyInterface, "RegistryProxyWiMAC", wns::ldk::FUNConfigCreator); 00051 00052 RegistryProxyWiMAC::RegistryProxyWiMAC(wns::ldk::fun::FUN*, const wns::pyconfig::View& config) 00053 : //phyModeMapper(NULL), 00054 phyModeMapper(wns::service::phy::phymode::PhyModeMapperInterface::getPhyModeMapper(config.getView("phyModeMapper"))), 00055 queueSize(config.get<int>("queueSize")), 00056 currentQoSFilter(ConnectionIdentifier::NoQoS), 00057 powerUT(config.get("powerCapabilitiesUT")), 00058 powerAP(config.get("powerCapabilitiesAP")), 00059 powerFRS(config.get("powerCapabilitiesFRS")), 00060 numberOfPriorities(config.get<int>("numberOfPriorities")), 00061 isDL_(config.get<bool>("isDL")), 00062 mapHandler(0) 00063 { 00064 //phyModeMapper.reset(wns::service::phy::phymode::createPhyModeMapper(config.getView("phyModeMapper")));// obsolete 00065 } 00066 00067 wns::scheduler::UserID 00068 RegistryProxyWiMAC::getUserForCID(wns::scheduler::ConnectionID cid) { 00069 assure(connManager, "No valid connection manager"); 00070 00071 // wimax-address of the station 00072 ConnectionIdentifierPtr wimacCIDPtr = 00073 connManager->getConnectionWithID( ConnectionIdentifier::CID(cid) ); 00074 00075 assure(wimacCIDPtr != ConnectionIdentifierPtr(), "Invalid CID Ptr"); 00076 00078 ConnectionIdentifier::StationID peerStationId = 0; 00079 00080 wns::service::dll::StationType stationType = layer2->getStationType(); 00081 if ( stationType == wns::service::dll::StationTypes::AP() ) 00082 { 00083 // I'm the BS, so get subscriber's StationID 00084 peerStationId = wimacCIDPtr->subscriberStation_; 00085 } 00086 else if ( stationType == wns::service::dll::StationTypes::UT() ) 00087 { 00088 // I'm the BS, so get subscriber's StationID 00089 peerStationId = wimacCIDPtr->baseStation_; 00090 } 00091 else if ( stationType == wns::service::dll::StationTypes::FRS() ) 00092 { 00093 if (wimacCIDPtr->baseStation_ == layer2->getID()) 00094 peerStationId = wimacCIDPtr->subscriberStation_; 00095 else 00096 peerStationId = wimacCIDPtr->baseStation_; 00097 } 00098 else 00099 { 00100 assure(0, "Help, I don't know what to do..."); 00101 } 00102 00103 00104 if (peerStationId == 0) //Broadcast 00105 { 00106 wns::scheduler::UserID bcast; 00107 bcast.setBroadcast(); 00108 userId2StationId[bcast] = peerStationId; 00109 00110 return bcast; 00111 } 00112 else //Normal Compound 00113 { 00114 Component* peerLayer2 = dynamic_cast<wimac::Component*> 00115 ( TheStationManager::getInstance()->getStationByID(peerStationId) ); 00116 assure( peerLayer2, "Invalid peer layer pointer"); 00117 assure( peerLayer2->getNode(), "No valid Node pointer in peer FUN"); 00118 00119 userId2StationId[wns::scheduler::UserID(peerLayer2->getNode())] = peerStationId; 00120 00121 return wns::scheduler::UserID(peerLayer2->getNode()); 00122 } 00123 } 00124 00125 wns::service::dll::UnicastAddress 00126 RegistryProxyWiMAC::getPeerAddressForCID(wns::scheduler::ConnectionID cid) 00127 { 00128 wns::scheduler::UserID user = getUserForCID(cid); 00129 wns::service::dll::UnicastAddress peerAddress 00130 = TheStationManager::getInstance()->getStationByNode(user.getNode())->getDLLAddress(); 00131 return peerAddress; 00132 } 00133 00134 wns::scheduler::ConnectionVector 00135 RegistryProxyWiMAC::getConnectionsForUser(const wns::scheduler::UserID user) { 00136 wns::scheduler::ConnectionVector connections; 00137 00138 // getUserForCid is called first, so I can remember the mapping there 00139 00140 assure(userId2StationId.find(user) != userId2StationId.end(), "User not yet registered"); 00141 ConnectionIdentifier::StationID toDestination = userId2StationId[user]; 00142 00143 // the ConnectionManager returns the CIDs ordered with the basic connections 00144 // coming first, thus I can simply return the cids in this order. 00145 ConnectionIdentifier::List CIDs = connManager->getOutgoingConnections(toDestination); 00146 ConnectionIdentifier::List incomings = connManager->getIncomingConnections(toDestination); 00147 00148 CIDs.insert( CIDs.end(), incomings.begin(), incomings.end()); 00149 00150 LOG_INFO("getOutgoingConnections returned ", CIDs.size(), " connections:"); 00151 00152 for (ConnectionIdentifier::List::const_iterator it = CIDs.begin(); 00153 it != CIDs.end(); 00154 ++it) 00155 { 00156 LOG_INFO("Connection ID: ", (*it)->getID()); 00157 } 00158 00159 for (ConnectionIdentifiers::iterator iter = CIDs.begin(); 00160 iter != CIDs.end(); ++iter) 00161 connections.push_back(wns::scheduler::ConnectionID((*iter)->getID())); 00162 00163 // the convention is that connections to be prioritized have to come first 00164 return connections; 00165 } 00166 00167 float 00168 RegistryProxyWiMAC::getMinTPForCID(wns::scheduler::ConnectionID /* cid */) { 00170 return 0.0; 00171 } 00172 00173 00174 float 00175 RegistryProxyWiMAC::getMaxDelayForCID(wns::scheduler::ConnectionID /* cid */) { 00177 return 0.0; 00178 } 00179 00180 wns::Ratio 00181 RegistryProxyWiMAC::getMinSIRForCID(wns::scheduler::ConnectionID /* cid */) { 00183 return wns::Ratio::from_dB(-1000.0); 00184 } 00185 00186 wns::scheduler::ConnectionID 00187 RegistryProxyWiMAC::getCIDforPDU(const wns::ldk::CompoundPtr& compound) { 00188 assure(friends.classifier, "Need a classifier as friend, please set first"); 00189 wns::ldk::ClassifierCommand* command = 00190 dynamic_cast<wns::ldk::ClassifierCommand*>(friends.classifier->getCommand(compound->getCommandPool())); 00191 00192 return command->peer.id; 00193 00194 } 00195 00196 void 00197 RegistryProxyWiMAC::setFriends( const wns::ldk::CommandTypeSpecifierInterface* _classifier) 00198 { 00199 friends.classifier = const_cast<wns::ldk::CommandTypeSpecifierInterface*>(_classifier); 00200 } 00201 00202 void 00203 RegistryProxyWiMAC::setFUN(const wns::ldk::fun::FUN* _fun) { 00204 fun = const_cast<wns::ldk::fun::FUN*>(_fun); 00205 00206 assure(fun, "RegistryProxyWiMAC needs a FUN"); 00207 00208 layer2 = dynamic_cast<wimac::Component*>(fun->getLayer()); 00209 assure(layer2, "RegistryProxyWiMAC could not get Layer2 from FUN"); 00210 00211 LOG_INFO("RegistryProxy::setFUN called in station ", layer2->getID(), " "); 00212 00213 connManager = layer2->getManagementService<service::ConnectionManager>("connectionManager"); 00214 assure(connManager, "RegistryProxyWiMAC needs a Connection Manager"); 00215 00216 wns::service::dll::StationType stationType = layer2->getStationType(); 00217 if(stationType == wns::service::dll::StationTypes::UT()) { 00218 mapHandler = fun->findFriend< wimac::frame::MapHandlerInterface*>("ulmapcollector"); 00219 assure( mapHandler, "mapcollector not of type wimac::scheduler::MapHandler"); 00220 } 00221 } 00222 00223 std::string 00224 RegistryProxyWiMAC::getNameForUser(const wns::scheduler::UserID user) 00225 { 00226 // I was asked for my name 00227 if (user == getMyUserID()) 00228 return fun->getLayer()->getName(); 00229 00230 // I was asked for broadcast id 00231 if (user.isBroadcast()) 00232 return "Broadcast"; 00233 00234 // same workaround as for getConnectionsForUser 00235 if (userId2StationId.find(user) == userId2StationId.end()) 00236 return std::string("not yet known"); 00237 00238 Component* peerLayer2 = dynamic_cast<wimac::Component*>( TheStationManager::getInstance()->getStationByID(userId2StationId[user]) ); 00239 assure(peerLayer2, "Could not get peer layer for user"); 00240 00241 return peerLayer2->getName(); 00242 } 00243 00244 wns::service::phy::phymode::PhyModeMapperInterface* 00245 RegistryProxyWiMAC::getPhyModeMapper() const 00246 { 00247 //return phyModeMapper.get(); 00248 assure (phyModeMapper != NULL, "phyModeMapper==NULL"); 00249 return phyModeMapper; 00250 } 00251 00252 wns::SmartPtr<const wns::service::phy::phymode::PhyModeInterface> 00253 RegistryProxyWiMAC::getBestPhyMode(const wns::Ratio& sinr) 00254 { 00255 return getPhyModeMapper()->getBestPhyMode(sinr); 00256 } 00257 00258 wns::scheduler::UserID 00259 RegistryProxyWiMAC::getMyUserID() 00260 { 00261 return wns::scheduler::UserID(layer2->getNode()); 00262 } 00263 00264 simTimeType 00265 RegistryProxyWiMAC::getOverhead(int /* numBursts */) { 00266 simTimeType retVal = 0.0; 00267 00268 assure(0, "Please insert the calculation here"); 00269 00270 return retVal; 00271 } 00272 00273 wns::scheduler::ChannelQualityOnOneSubChannel 00274 RegistryProxyWiMAC::estimateTxSINRAt(const wns::scheduler::UserID user, int slot){ 00275 wns::service::dll::StationType stationType = layer2->getStationType(); 00276 if(stationType != wns::service::dll::StationTypes::UT()) { 00277 // lookup the results reported by the receiving subscriber station in the 00278 // local cache 00279 wns::Power interference = 00280 layer2->getManagementService<service::InterferenceCache>("interferenceCache") 00281 ->getAveragedInterference(user.getNode(), slot); 00282 wns::Ratio pathloss = 00283 layer2->getManagementService<service::InterferenceCache>("interferenceCache") 00284 ->getAveragedPathloss(user.getNode(), slot); 00285 wns::Power carrier = 00286 layer2->getManagementService<service::InterferenceCache>("interferenceCache") 00287 ->getAveragedCarrier(user.getNode(), slot); 00288 return wns::scheduler::ChannelQualityOnOneSubChannel(pathloss, interference, carrier); 00289 } else { 00290 //lookup results signaled by the BS-master through the MAP 00291 return mapHandler->getEstimatedCQI(); 00292 } 00293 } 00294 00295 wns::scheduler::ChannelQualityOnOneSubChannel 00296 RegistryProxyWiMAC::estimateRxSINROf(const wns::scheduler::UserID user, int slot){ 00297 00298 // lookup the results previously reported by us to the remote side 00299 service::InterferenceCache* remoteCache = 00300 TheStationManager::getInstance()-> 00301 getStationByNode(user.getNode())-> 00302 getManagementService<service::InterferenceCache>("interferenceCache"); 00303 00304 wns::Ratio pathloss = remoteCache->getAveragedPathloss(getMyUserID().getNode(), slot); 00305 wns::Power interference = remoteCache->getAveragedInterference(getMyUserID().getNode(), slot); 00306 wns::Power carrier = remoteCache->getAveragedCarrier(getMyUserID().getNode(), slot); 00307 00308 return wns::scheduler::ChannelQualityOnOneSubChannel(pathloss, interference, carrier); 00309 } 00310 00311 wns::Power 00312 RegistryProxyWiMAC::estimateInterferenceStdDeviation(const wns::scheduler::UserID user) { 00313 return layer2->getManagementService<service::InterferenceCache>("interferenceCache") 00314 ->getInterferenceDeviation(user.getNode()); 00315 } 00316 00317 wns::scheduler::Bits 00318 RegistryProxyWiMAC::getQueueSizeLimitPerConnection() { 00319 return queueSize; 00320 00321 } 00322 00323 wns::service::dll::StationType 00324 RegistryProxyWiMAC::getStationType(const wns::scheduler::UserID user) 00325 { 00326 wns::service::dll::StationType stationType = TheStationManager::getInstance()->getStationByNode(user.getNode())->getStationType(); 00327 return stationType; 00328 /* 00329 std::map<wns::scheduler::UserID, ConnectionIdentifier::StationID>::const_iterator station = 00330 userId2StationId.find(user); 00331 assure(station != userId2StationId.end(), "User not yet registered"); 00332 00333 Component* userLayer2 = 00334 dynamic_cast<wimac::Component*>( TheStationManager::getInstance()->getStationByID(station->second) ); 00335 00336 std::string stationType = wns::service::dll::StationTypes::toString( userLayer2->getStationType() ); 00337 if( stationType == "AP" ) 00338 { 00339 return wns::scheduler::BaseStation; 00340 } 00341 else if( stationType == "FRS" ) 00342 { 00343 return wns::scheduler::RelayStation; 00344 } 00345 else if( stationType == "UT" ) 00346 { 00347 return wns::scheduler::SubscriberStation; 00348 } 00349 else if( stationType == "RT" ) 00350 { 00351 return wns::scheduler::RemoteStation; 00352 } 00353 else 00354 { 00355 assure(0, "unknown station type"); 00356 } 00357 return -1; 00358 */ 00359 } 00360 00361 wns::scheduler::UserSet 00362 RegistryProxyWiMAC::filterListening( wns::scheduler::UserSet users ) 00363 { 00364 wns::scheduler::UserSet result; 00365 00366 for (wns::scheduler::UserSet::const_iterator it = users.begin(); 00367 it != users.end(); ++it) 00368 { 00369 wimac::ConnectionIdentifier::StationID uID; 00370 uID = TheStationManager::getInstance()->getStationByNode(it->getNode())->getID(); 00371 00372 ConnectionIdentifierPtr ci ( 00373 connManager->getBasicConnectionFor( uID ) ); 00374 00375 assure( ci->valid_, "RegistryProxyWiMAC::filterListening: no ConnectionIdentifier exist for this user!"); 00376 00377 if (ci->ciNotListening_ == 0 ) 00378 { 00379 result.insert(*it); 00380 } 00381 } 00382 return result; 00383 } 00384 00385 wns::scheduler::UserSet 00386 RegistryProxyWiMAC::filterQoSbased( wns::scheduler::UserSet users ) 00387 { 00388 assure(connManager, "No valid connection manager"); 00389 00390 wns::scheduler::UserSet results, tmpResults; 00391 results.clear(); tmpResults.clear(); 00392 00393 00394 00395 for (wns::scheduler::UserSet::const_iterator it = users.begin(); 00396 it != users.end(); ++it) 00397 { 00398 wns::scheduler::UserID user = *it; 00399 00400 assure(userId2StationId.find(user) != userId2StationId.end(), "User not yet registered"); 00401 ConnectionIdentifier::StationID toDestination = userId2StationId[user]; 00402 00403 ConnectionIdentifier::List cids = connManager->getAllCIForSS(toDestination); 00404 00405 for (ConnectionIdentifiers::const_iterator cidIter = cids.begin(); 00406 cidIter != cids.end(); ++cidIter) 00407 { 00408 if ((*cidIter)->qos_ == currentQoSFilter) 00409 { 00410 results.insert(user); 00411 LOG_INFO("Included user with QoS=", currentQoSFilter, " with cidPtr ", **cidIter); 00412 } 00413 00414 if ( (currentQoSFilter == ConnectionIdentifier::Signaling) 00415 && ((*cidIter)->qos_ != ConnectionIdentifier::Signaling) ) 00416 { 00417 tmpResults.insert(user); 00418 } 00419 00420 } 00421 } 00422 00423 00424 //We would to catch users with only Signaling Connections 00425 if(currentQoSFilter == ConnectionIdentifier::Signaling) 00426 for(wns::scheduler::UserSet::const_iterator it = tmpResults.begin(); 00427 it != tmpResults.end(); ++it) 00428 results.erase(*it); 00429 00430 00431 return results; 00432 } 00433 00434 wns::scheduler::UserSet 00435 RegistryProxyWiMAC::filterReachable(wns::scheduler::UserSet users, const int /*frameNr*/) 00436 { 00437 users = filterListening(users); 00438 00439 if (currentQoSFilter != ConnectionIdentifier::NoQoS) 00440 return filterQoSbased(users); 00441 00442 // else 00443 return users; 00444 } 00445 00446 wns::scheduler::UserSet 00447 RegistryProxyWiMAC::filterReachable(wns::scheduler::UserSet users) 00448 { 00449 return filterReachable(users,0); 00450 } 00451 00452 wns::scheduler::ConnectionSet 00453 RegistryProxyWiMAC::filterReachable(wns::scheduler::ConnectionSet connections, const int /*frameNr*/, bool /*useHARQ*/) 00454 { 00455 return connections; 00456 } 00457 00458 wns::scheduler::PowerMap 00459 RegistryProxyWiMAC::calcULResources(const wns::scheduler::UserSet& /*users*/, unsigned long int /*rapResources*/) const 00460 { 00461 throw wns::Exception("called un-implemented method RegistryProxyWiMAC::calcULResources"); 00462 return wns::scheduler::PowerMap(); 00463 } 00464 00465 wns::scheduler::UserSet 00466 RegistryProxyWiMAC::getActiveULUsers() const 00467 { 00468 throw wns::Exception("called un-implemented method RegistryProxyWiMAC::getActiveULUsers"); 00469 return wns::scheduler::UserSet(); 00470 } 00471 00472 int 00473 RegistryProxyWiMAC::getTotalNumberOfUsers(wns::scheduler::UserID user) 00474 { 00475 /* ConnectionIdentifiers conns = connManager->getAllBasicConnections(); 00476 int count = 0; 00477 for (ConnectionIdentifiers::iterator it = conns.begin(); 00478 it != conns.end(); 00479 ++it ) 00480 { 00481 if (TheStationManager::getInstance()->getStationByID((*it)->subscriberStation_)->getNode() == user) 00482 { 00483 ++count; 00484 } 00485 } 00486 assure(count>0, "No basic connection for user " << user->getName() << " found."); 00487 LOG_INFO("getTotalNumberOfUsers(): ", count, " users"); 00488 return count;*/ 00489 return 1; 00490 } 00491 00492 void 00493 RegistryProxyWiMAC::switchFilterTo(int qos) 00494 { 00495 currentQoSFilter = qos; 00496 } 00497 00498 wns::scheduler::ChannelQualitiesOnAllSubBandsPtr 00499 RegistryProxyWiMAC::getChannelQualities4UserOnUplink(wns::scheduler::UserID /*user*/, int) 00500 { 00501 return wns::scheduler::ChannelQualitiesOnAllSubBandsPtr(); // fake (empty) 00502 } 00503 00504 wns::scheduler::ChannelQualitiesOnAllSubBandsPtr 00505 RegistryProxyWiMAC::getChannelQualities4UserOnDownlink(wns::scheduler::UserID /*user*/, int) 00506 { 00507 return wns::scheduler::ChannelQualitiesOnAllSubBandsPtr(); // fake (empty) 00508 } 00509 00510 wns::scheduler::PowerCapabilities 00511 RegistryProxyWiMAC::getPowerCapabilities(const wns::scheduler::UserID user) const 00512 { 00513 wns::service::dll::StationType stationType; 00514 if (user.isValid()) { // peer known 00515 stationType = TheStationManager::getInstance()->getStationByNode(user.getNode())->getStationType(); 00516 } else { // peer unknown. assume peer=UT 00517 stationType = wns::service::dll::StationTypes::UT(); 00518 } 00519 if ( stationType == wns::service::dll::StationTypes::UT() ) 00520 return powerUT; // this may be variable in the future (different userTerminal classes) 00521 else if ( stationType == wns::service::dll::StationTypes::AP() ) 00522 return powerAP; 00523 else if ( stationType == wns::service::dll::StationTypes::FRS() ) 00524 return powerFRS; 00525 else 00526 assure(false, "oops, don't know other station ("<<user.getNode()->getName()<<") stationType="<<stationType); 00527 return wns::scheduler::PowerCapabilities(); 00528 } 00529 00530 wns::scheduler::PowerCapabilities 00531 RegistryProxyWiMAC::getPowerCapabilities() const 00532 { 00533 // get my own station type 00534 int stationType = layer2->getStationType(); 00535 if ( stationType == wns::service::dll::StationTypes::UT() ) 00536 return powerUT; // this may be variable in the future (different userTerminal classes) 00537 else if ( stationType == wns::service::dll::StationTypes::AP() ) 00538 return powerAP; 00539 else if ( stationType == wns::service::dll::StationTypes::FRS() ) 00540 return powerFRS; 00541 else 00542 assure(false, "oops, don't know stationType="<<stationType); 00543 return wns::scheduler::PowerCapabilities(); 00544 } 00545 00546 // This is QoS/priority related 00547 int 00548 RegistryProxyWiMAC::getNumberOfQoSClasses() 00549 { 00550 return ConnectionIdentifier::MaxQoSCategory + 1; 00551 } 00552 00553 // This is QoS/priority related 00554 int 00555 RegistryProxyWiMAC::getNumberOfPriorities() 00556 { 00557 return getNumberOfQoSClasses(); 00558 } 00559 00560 00561 wns::scheduler::ConnectionList& 00562 RegistryProxyWiMAC::getCIDListForPriority(int priority) 00563 { 00564 assure(false, "Not implemented"); 00565 } 00566 00567 00568 // gets the cids in a set, because the strategy can better handle sorted list of 00569 // cids (a set implicit sorts the cids) 00570 wns::scheduler::ConnectionSet 00571 RegistryProxyWiMAC::getConnectionsForPriority(int priority) 00572 { 00573 wns::scheduler::ConnectionSet result; 00574 00575 assure(priority >= 0 && priority < getNumberOfPriorities(), 00576 "invalid priority " << priority); 00577 00578 /* The priority is directly mapped to the QoS class number */ 00579 00580 ConnectionIdentifier::List CIDs = 00581 connManager->getAllDataConnections(ConnectionIdentifier::Downlink, 00582 ConnectionIdentifier::QoSCategory(priority)); 00583 00584 for (ConnectionIdentifiers::iterator iter = CIDs.begin(); 00585 iter != CIDs.end(); ++iter) 00586 result.insert(wns::scheduler::ConnectionID((*iter)->getID())); 00587 00588 if(isDL_) { 00589 CIDs = connManager->getAllDataConnections(ConnectionIdentifier::Downlink, 00590 ConnectionIdentifier::QoSCategory(priority)); 00591 } else { 00592 CIDs = connManager->getAllDataConnections(ConnectionIdentifier::Uplink, 00593 ConnectionIdentifier::QoSCategory(priority)); 00594 } 00595 00596 for (ConnectionIdentifiers::iterator iter = CIDs.begin(); 00597 iter != CIDs.end(); ++iter) 00598 result.insert(wns::scheduler::ConnectionID((*iter)->getID())); 00599 00600 return result; 00601 } 00602 00603 int 00604 RegistryProxyWiMAC::getPriorityForConnection(wns::scheduler::ConnectionID cid) 00605 { 00606 ConnectionIdentifierPtr ci = connManager->getConnectionWithID(cid); 00607 assure(ci != NULL, "Unknown CID"); 00608 00609 return int(ci->qos_); 00610 } 00611 00612 bool 00613 RegistryProxyWiMAC::getDL() const 00614 { 00615 LOG_INFO("RegistryProxy::getDL called in station ", layer2->getID(), " isDL: ", isDL_); 00616 return isDL_; 00617 } 00618 00619 bool 00620 RegistryProxyWiMAC::getCQIAvailable() const 00621 { 00622 return false; 00623 }
1.5.5