~comnets/openwns-wifimac/wifimac--main--1.0

« back to all changes in this revision

Viewing changes to src/draftn/BeaconLinkQualityMeasurementwithMIMO.cpp

  • Committer: Sebastian Max
  • Date: 2010-09-01 15:45:53 UTC
  • Revision ID: smx@comnets.rwth-aachen.de-20100901154553-vfugnov5jll4q3mf
Opportunistic -> PER

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
    // scale metric with usual BPSK1/2 transmission time
150
150
    wifimac::pathselection::Metric m = ett/this->scalingFactor;
151
151
 
152
 
    MESSAGE_SINGLE(NORMAL, parent->logger, "BroadcastLinkQualitywithMIMO for " << peerAddress << ": new PeerMeasurement with " << peerSuccessRate << "/" << peerSINR << " --> " << m);
 
152
    MESSAGE_BEGIN(NORMAL, parent->logger, msg, "BroadcastLinkQualitywithMIMO for ");
 
153
    msg << peerAddress;
 
154
    msg << ": new PeerMeasurement with " << peerSuccessRate;
 
155
    msg << "/" << peerSINR;
 
156
    msg << "/" << getBestTotalRate(peerSINR,factors);
 
157
    msg << " --> " << m;
 
158
    MESSAGE_END();
153
159
 
154
160
    if(linkCreated)
155
161
    {
215
221
  for (SINRwithMIMOInformationBase::NumSSToFactorMap::const_iterator it=factors.begin(); it != factors.end();it++)   
216
222
  {
217
223
        rate = 0;
218
 
        for (int i=0; i < it->second.size();i++)
219
 
        {
220
 
         rate += getBestRate(peerSINR+it->second[i]);   
221
 
        }
222
 
        maxBitRate = std::max(maxBitRate,rate);
223
 
  }     
 
224
        for (int i=0; i < it->second.size();i++)
 
225
        {
 
226
            rate += getBestRate(peerSINR+it->second[i]);
 
227
        }
 
228
        maxBitRate = std::max(maxBitRate,rate);
 
229
  }
224
230
  return(maxBitRate);
225
231
}
226
232