View | Details | Raw Unified | Return to bug 2314
Collapse All | Expand All

(-)a/src/wave/model/bsm-application.cc (+26 lines)
 Lines 218-223   BsmApplication::Setup (Ipv4InterfaceContainer & i, Link Here 
218
  m_adhocTxInterfaces = &i;
218
  m_adhocTxInterfaces = &i;
219
  m_nodeId = nodeId;
219
  m_nodeId = nodeId;
220
  m_txMaxDelay = txMaxDelay;
220
  m_txMaxDelay = txMaxDelay;
221
222
  // check whether current device is a WAVE device,
223
  // so alternating channel access assignment will be support.
224
  Ptr<Node> node = Application::GetNode();
225
  Ptr<NetDevice> device = node->GetDevice(0);
226
  Ptr<WaveNetDevice> waveDevice = DynamicCast<WaveNetDevice>(device);
227
  if (waveDevice == 0)
228
    return;
229
230
  // assign channel access and register txprofile for sending packets
231
  if (m_chAccessMode == 1)
232
  {
233
    // assign alternating channel access for SCH1 and CCH
234
    SchInfo info = SchInfo (SCH1, false, EXTENDED_ALTERNATING);
235
    Simulator::Schedule (Seconds (0), &WaveNetDevice::StartSch, waveDevice, info);
236
  }
237
  else
238
  {
239
    // assign continuous channel access for SCH1
240
    SchInfo info = SchInfo (SCH1, false, EXTENDED_CONTINUOUS);
241
    Simulator::Schedule (Seconds (0), &WaveNetDevice::StartSch, waveDevice, info);
242
  }
243
244
  // register a tx profile for IP-based packets
245
  const TxProfile txProfile = TxProfile (SCH1);
246
  Simulator::Schedule (Seconds (0), &WaveNetDevice::RegisterTxProfile, waveDevice, txProfile);
221
}
247
}
222
248
223
void
249
void
(-)a/src/wave/model/wave-net-device.cc (-3 / +3 lines)
 Lines 411-417   WaveNetDevice::SendX (Ptr<Packet> packet, const Address & dest, uint32_t protoco Link Here 
411
      txVector.SetTxPowerLevel (txInfo.txPowerLevel);
411
      txVector.SetTxPowerLevel (txInfo.txPowerLevel);
412
      txVector.SetMode (txInfo.dataRate);
412
      txVector.SetMode (txInfo.dataRate);
413
      HigherLayerTxVectorTag tag = HigherLayerTxVectorTag (txVector, false);
413
      HigherLayerTxVectorTag tag = HigherLayerTxVectorTag (txVector, false);
414
      packet->AddPacketTag (tag);
414
      packet->ReplacePacketTag (tag);
415
    }
415
    }
416
416
417
  LlcSnapHeader llc;
417
  LlcSnapHeader llc;
 Lines 421-427   WaveNetDevice::SendX (Ptr<Packet> packet, const Address & dest, uint32_t protoco Link Here 
421
  // according to channel number and priority,
421
  // according to channel number and priority,
422
  // route the packet to a proper queue.
422
  // route the packet to a proper queue.
423
  QosTag qos = QosTag (txInfo.priority);
423
  QosTag qos = QosTag (txInfo.priority);
424
  packet->AddPacketTag (qos);
424
  packet->ReplacePacketTag (qos);
425
  Ptr<WifiMac> mac = GetMac (txInfo.channelNumber);
425
  Ptr<WifiMac> mac = GetMac (txInfo.channelNumber);
426
  Mac48Address realTo = Mac48Address::ConvertFrom (dest);
426
  Mac48Address realTo = Mac48Address::ConvertFrom (dest);
427
  mac->NotifyTx (packet);
427
  mac->NotifyTx (packet);
 Lines 617-623   WaveNetDevice::Send (Ptr<Packet> packet, const Address& dest, uint16_t protocol) Link Here 
617
      txVector.SetTxPowerLevel (m_txProfile->txPowerLevel);
617
      txVector.SetTxPowerLevel (m_txProfile->txPowerLevel);
618
      txVector.SetMode (m_txProfile->dataRate);
618
      txVector.SetMode (m_txProfile->dataRate);
619
      HigherLayerTxVectorTag tag = HigherLayerTxVectorTag (txVector, m_txProfile->adaptable);
619
      HigherLayerTxVectorTag tag = HigherLayerTxVectorTag (txVector, m_txProfile->adaptable);
620
      packet->AddPacketTag (tag);
620
      packet->ReplacePacketTag (tag);
621
    }
621
    }
622
622
623
  LlcSnapHeader llc;
623
  LlcSnapHeader llc;
(-)a/src/wifi/model/dcf-manager.cc (+5 lines)
 Lines 441-446   DcfManager::IsBusy (void) const Link Here 
441
    {
441
    {
442
      return true;
442
      return true;
443
    }
443
    }
444
  Time lastBusyEnd = m_lastBusyStart + m_lastBusyDuration;
445
  if (lastBusyEnd > Simulator::Now ())
446
  {
447
	  return true;
448
  }
444
  // NAV busy
449
  // NAV busy
445
  Time lastNavEnd = m_lastNavStart + m_lastNavDuration;
450
  Time lastNavEnd = m_lastNavStart + m_lastNavDuration;
446
  if (lastNavEnd > Simulator::Now ())
451
  if (lastNavEnd > Simulator::Now ())

Return to bug 2314