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

(-)a/src/wave/examples/vanet-routing-compare.cc (-6 / +9 lines)
 Lines 818-830    Link Here 
818
void
818
void
819
WifiPhyStats::PhyTxDrop (std::string context, Ptr<const Packet> packet)
819
WifiPhyStats::PhyTxDrop (std::string context, Ptr<const Packet> packet)
820
{
820
{
821
  NS_LOG_UNCOND ("PHY Tx Drop");
821
  //NS_LOG_UNCOND ("PHY Tx Drop");
822
}
822
}
823
823
824
void
824
void
825
WifiPhyStats::PhyRxDrop (std::string context, Ptr<const Packet> packet)
825
WifiPhyStats::PhyRxDrop (std::string context, Ptr<const Packet> packet)
826
{
826
{
827
  NS_LOG_UNCOND ("PHY Rx Drop");
827
  //NS_LOG_UNCOND ("PHY Rx Drop");
828
}
828
}
829
829
830
uint32_t
830
uint32_t
 Lines 1605-1614    Link Here 
1605
  // which is used to determine the total amount of
1605
  // which is used to determine the total amount of
1606
  // data transmitted, and then used to calculate
1606
  // data transmitted, and then used to calculate
1607
  // the MAC/PHY overhead beyond the app-data
1607
  // the MAC/PHY overhead beyond the app-data
1608
  Config::Connect ("/NodeList/*/DeviceList/*/Phy/State/Tx", MakeCallback (&WifiPhyStats::PhyTxTrace, m_wifiPhyStats));
1608
  Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/State/Tx", MakeCallback (&WifiPhyStats::PhyTxTrace, m_wifiPhyStats));
1609
  // TxDrop, RxDrop not working yet.  Not sure what I'm doing wrong.
1609
  Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyTxDrop", MakeCallback (&WifiPhyStats::PhyTxDrop, m_wifiPhyStats));
1610
  Config::Connect ("/NodeList/*/DeviceList/*/ns3::WifiNetDevice/Phy/PhyTxDrop", MakeCallback (&WifiPhyStats::PhyTxDrop, m_wifiPhyStats));
1610
  Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/PhyRxDrop", MakeCallback (&WifiPhyStats::PhyRxDrop, m_wifiPhyStats));
1611
  Config::Connect ("/NodeList/*/DeviceList/*/ns3::WifiNetDevice/Phy/PhyRxDrop", MakeCallback (&WifiPhyStats::PhyRxDrop, m_wifiPhyStats));
1611
1612
  Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WaveNetDevice/PhyEntities/*/State/Tx", MakeCallback (&WifiPhyStats::PhyTxTrace, m_wifiPhyStats));
1613
  Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WaveNetDevice/PhyEntities/*/PhyRxDrop", MakeCallback (&WifiPhyStats::PhyRxDrop, m_wifiPhyStats));
1614
  Config::Connect ("/NodeList/*/DeviceList/*/$ns3::WaveNetDevice/PhyEntities/*/PhyRxDrop", MakeCallback (&WifiPhyStats::PhyRxDrop, m_wifiPhyStats));
1612
}
1615
}
1613
1616
1614
void
1617
void
(-)a/src/wave/model/bsm-application.cc (+26 lines)
 Lines 217-222    Link Here 
217
  m_adhocTxInterfaces = &i;
217
  m_adhocTxInterfaces = &i;
218
  m_nodeId = nodeId;
218
  m_nodeId = nodeId;
219
  m_txMaxDelay = txMaxDelay;
219
  m_txMaxDelay = txMaxDelay;
220
221
  // check whether current device is a WAVE device,
222
  // so alternating channel access assignment will be support.
223
  Ptr<Node> node = Application::GetNode();
224
  Ptr<NetDevice> device = node->GetDevice(0);
225
  Ptr<WaveNetDevice> waveDevice = DynamicCast<WaveNetDevice>(device);
226
  if (waveDevice == 0)
227
    return;
228
229
  // assign channel access and register txprofile for sending packets
230
  if (m_chAccessMode == 1)
231
  {
232
    // assign alternating channel access for SCH1 and CCH
233
    SchInfo info = SchInfo (SCH1, false, EXTENDED_ALTERNATING);
234
    Simulator::Schedule (Seconds (0), &WaveNetDevice::StartSch, waveDevice, info);
235
  }
236
  else
237
  {
238
    // assign continuous channel access for SCH1
239
    SchInfo info = SchInfo (SCH1, false, EXTENDED_CONTINUOUS);
240
    Simulator::Schedule (Seconds (0), &WaveNetDevice::StartSch, waveDevice, info);
241
  }
242
243
  // register a tx profile for IP-based packets
244
  const TxProfile txProfile = TxProfile (SCH1);
245
  Simulator::Schedule (Seconds (0), &WaveNetDevice::RegisterTxProfile, waveDevice, txProfile);
220
}
246
}
221
247
222
void
248
void
(-)a/src/wave/model/wave-net-device.cc (-3 / +3 lines)
 Lines 412-418    Link Here 
412
      txVector.SetTxPowerLevel (txInfo.txPowerLevel);
412
      txVector.SetTxPowerLevel (txInfo.txPowerLevel);
413
      txVector.SetMode (txInfo.dataRate);
413
      txVector.SetMode (txInfo.dataRate);
414
      HigherLayerTxVectorTag tag = HigherLayerTxVectorTag (txVector, false);
414
      HigherLayerTxVectorTag tag = HigherLayerTxVectorTag (txVector, false);
415
      packet->AddPacketTag (tag);
415
      packet->ReplacePacketTag (tag);
416
    }
416
    }
417
417
418
  LlcSnapHeader llc;
418
  LlcSnapHeader llc;
 Lines 422-428    Link Here 
422
  // according to channel number and priority,
422
  // according to channel number and priority,
423
  // route the packet to a proper queue.
423
  // route the packet to a proper queue.
424
  QosTag qos = QosTag (txInfo.priority);
424
  QosTag qos = QosTag (txInfo.priority);
425
  packet->AddPacketTag (qos);
425
  packet->ReplacePacketTag (qos);
426
  Ptr<WifiMac> mac = GetMac (txInfo.channelNumber);
426
  Ptr<WifiMac> mac = GetMac (txInfo.channelNumber);
427
  Mac48Address realTo = Mac48Address::ConvertFrom (dest);
427
  Mac48Address realTo = Mac48Address::ConvertFrom (dest);
428
  mac->NotifyTx (packet);
428
  mac->NotifyTx (packet);
 Lines 618-624    Link Here 
618
      txVector.SetTxPowerLevel (m_txProfile->txPowerLevel);
618
      txVector.SetTxPowerLevel (m_txProfile->txPowerLevel);
619
      txVector.SetMode (m_txProfile->dataRate);
619
      txVector.SetMode (m_txProfile->dataRate);
620
      HigherLayerTxVectorTag tag = HigherLayerTxVectorTag (txVector, m_txProfile->adaptable);
620
      HigherLayerTxVectorTag tag = HigherLayerTxVectorTag (txVector, m_txProfile->adaptable);
621
      packet->AddPacketTag (tag);
621
      packet->ReplacePacketTag (tag);
622
    }
622
    }
623
623
624
  LlcSnapHeader llc;
624
  LlcSnapHeader llc;
(-)a/src/wifi/model/dcf-manager.cc (+6 lines)
 Lines 474-479    Link Here 
474
    {
474
    {
475
      return true;
475
      return true;
476
    }
476
    }
477
  // CCA busy
478
  Time lastBusyEnd = m_lastBusyStart + m_lastBusyDuration;
479
  if (lastBusyEnd >= Simulator::Now ())
480
    {
481
      return true;
482
    }
477
  // NAV busy
483
  // NAV busy
478
  Time lastNavEnd = m_lastNavStart + m_lastNavDuration;
484
  Time lastNavEnd = m_lastNavStart + m_lastNavDuration;
479
  if (lastNavEnd > Simulator::Now ())
485
  if (lastNavEnd > Simulator::Now ())

Return to bug 2314