• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ NS_LOG_FUNCTION函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中NS_LOG_FUNCTION函数的典型用法代码示例。如果您正苦于以下问题:C++ NS_LOG_FUNCTION函数的具体用法?C++ NS_LOG_FUNCTION怎么用?C++ NS_LOG_FUNCTION使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了NS_LOG_FUNCTION函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: NS_LOG_FUNCTION

Ipv4EndPoint *
Ipv4EndPointDemux::Allocate (uint16_t port)
{
  NS_LOG_FUNCTION (this <<  port);

  return Allocate (Ipv4Address::GetAny (), port);
}
开发者ID:shuiziliuBUPT,项目名称:HelloWorld,代码行数:7,代码来源:ipv4-end-point-demux.cpp


示例2: NS_LOG_FUNCTION

void
FileHelper::Set2dFormat (const std::string &format)
{
  NS_LOG_FUNCTION (this << format);

  m_2dFormat = format;
}
开发者ID:shuiziliuBUPT,项目名称:HelloWorld,代码行数:7,代码来源:file-helper.cpp


示例3: NS_LOG_FUNCTION

int64_t 
RedQueue::AssignStreams (int64_t stream)
{
  NS_LOG_FUNCTION (this << stream);
  m_uv->SetStream (stream);
  return 1;
}
开发者ID:shuiziliuBUPT,项目名称:HelloWorld,代码行数:7,代码来源:red-queue.cpp


示例4: size

PendingData::PendingData(const std::string& s) 
  : size (s.length () + 1), data (0),
    msgSize (0), responseSize (0)
{
  NS_LOG_FUNCTION (this << s.length () + 1);
  data.push_back (Create<Packet> ((uint8_t*)s.c_str (), size));
}
开发者ID:shuiziliuBUPT,项目名称:HelloWorld,代码行数:7,代码来源:pending-data.cpp


示例5: NS_LOG_FUNCTION

bool
PacketQueue::Enqueue (QueueEntry & entry)
{
  NS_LOG_FUNCTION ("Enqueing packet destined for" << entry.GetIpv4Header ().GetDestination ());
  Purge ();
  uint32_t numPacketswithdst;
  for (std::vector<QueueEntry>::const_iterator i = m_queue.begin (); i
       != m_queue.end (); ++i)
    {
      if ((i->GetPacket ()->GetUid () == entry.GetPacket ()->GetUid ())
          && (i->GetIpv4Header ().GetDestination ()
              == entry.GetIpv4Header ().GetDestination ()))
        {
          return false;
        }
    }
  numPacketswithdst = GetCountForPacketsWithDst (entry.GetIpv4Header ().GetDestination ());
  NS_LOG_DEBUG ("Number of packets with this destination: " << numPacketswithdst);
  /** For Brock Paper comparision*/
  if (numPacketswithdst >= m_maxLenPerDst || m_queue.size () >= m_maxLen)
    {
      NS_LOG_DEBUG ("Max packets reached for this destination. Not queuing any further packets");
      return false;
    }
  else
    {
      // NS_LOG_DEBUG("Packet size while enqueing "<<entry.GetPacket()->GetSize());
      entry.SetExpireTime (m_queueTimeout);
      m_queue.push_back (entry);
      return true;
    }
}
开发者ID:shuiziliuBUPT,项目名称:HelloWorld,代码行数:32,代码来源:dsdv-packet-queue.cpp


示例6: NS_LOG_FUNCTION

uint32_t PendingData::SizeFromOffset (uint32_t offset)
{ // Find out how much data is available from offset
  NS_LOG_FUNCTION (this << offset);
  /// \todo should this return zero, or error out?
  if (offset > size) return 0;     // No data at requested offset
  return size - offset;            // Available data after offset
}
开发者ID:shuiziliuBUPT,项目名称:HelloWorld,代码行数:7,代码来源:pending-data.cpp


示例7: m_dlTxFirstWrite

PhyTxStatsCalculator::PhyTxStatsCalculator ()
  : m_dlTxFirstWrite (true),
    m_ulTxFirstWrite (true)
{
  NS_LOG_FUNCTION (this);

}
开发者ID:shuiziliuBUPT,项目名称:HelloWorld,代码行数:7,代码来源:phy-tx-stats-calculator.cpp


示例8: x

Vector3D::Vector3D (double _x, double _y, double _z)
  : x (_x),
    y (_y),
    z (_z)
{
  NS_LOG_FUNCTION (this << _x << _y << _z);
}
开发者ID:shuiziliuBUPT,项目名称:HelloWorld,代码行数:7,代码来源:vector.cpp


示例9: NS_LOG_FUNCTION

void 
ByteTagList::AddAtStart (int32_t adjustment, int32_t prependOffset)
{
  NS_LOG_FUNCTION (this << adjustment << prependOffset);
  if (adjustment == 0 && !IsDirtyAtStart (prependOffset))
    {
      return;
    }
  ByteTagList list;
  ByteTagList::Iterator i = BeginAll ();
  while (i.HasNext ())
    {
      ByteTagList::Iterator::Item item = i.Next ();
      item.start += adjustment;
      item.end += adjustment;

      if (item.end <= prependOffset)
        {
          continue;
        }
      else if (item.end > prependOffset && item.start < prependOffset)
        {
          item.start = prependOffset;
        }
      else
        {
          // nothing to do.
        }
      TagBuffer buf = list.Add (item.tid, item.size, item.start, item.end);
      buf.CopyFrom (item.buf);
    }
  *this = list;
}
开发者ID:shuiziliuBUPT,项目名称:HelloWorld,代码行数:33,代码来源:byte-tag-list.cpp


示例10: NS_LOG_FUNCTION

void RadvdHelper::AddAnnouncedPrefix (uint32_t interface, Ipv6Address prefix, uint32_t prefixLength)
{
  NS_LOG_FUNCTION(this << int(interface) << prefix << int(prefixLength));
  if (prefixLength != 64)
    {
      NS_LOG_WARN("Adding a non-64 prefix is generally a bad idea. Autoconfiguration might not work.");
    }

  bool prefixFound = false;
  if (m_radvdInterfaces.find(interface) == m_radvdInterfaces.end())
    {
      m_radvdInterfaces[interface] = Create<RadvdInterface> (interface);
    }
  else
    {
      RadvdInterface::RadvdPrefixList prefixList = m_radvdInterfaces[interface]->GetPrefixes();
      RadvdInterface::RadvdPrefixListCI iter;
      for (iter=prefixList.begin(); iter!=prefixList.end(); iter++)
        {
          if ((*iter)->GetNetwork() == prefix)
            {
              NS_LOG_LOGIC("Not adding the same prefix twice, skipping " << prefix << " " << int(prefixLength));
              prefixFound = true;
              break;
            }
        }
    }
  if (!prefixFound)
    {
      Ptr<RadvdPrefix> routerPrefix = Create<RadvdPrefix> (prefix, prefixLength);
      m_radvdInterfaces[interface]->AddPrefix(routerPrefix);
    }
}
开发者ID:shuiziliuBUPT,项目名称:HelloWorld,代码行数:33,代码来源:radvd-helper.cpp


示例11: NS_LOG_FUNCTION

void
BuildingsPathlossTestCase::DoRun (void)
{
  NS_LOG_FUNCTION (this);

  // the building basically occupies the negative x plane, so any node
  // in this area will fall in the building 
  Ptr<Building> building1 = CreateObject<Building> ();
  building1->SetBoundaries (Box (-3000, -1, -4000, 4000.0, 0.0, 12));
  building1->SetBuildingType (Building::Residential);
  building1->SetExtWallsType (Building::ConcreteWithWindows);
  building1->SetNFloors (3);
  
  Ptr<MobilityModel> mma = CreateMobilityModel (m_mobilityModelIndex1);
  Ptr<MobilityModel> mmb = CreateMobilityModel (m_mobilityModelIndex2);

  Ptr<HybridBuildingsPropagationLossModel> propagationLossModel = CreateObject<HybridBuildingsPropagationLossModel> ();
  propagationLossModel->SetAttribute ("Frequency", DoubleValue (m_freq));
  propagationLossModel->SetAttribute ("Environment", EnumValue (m_env));
  propagationLossModel->SetAttribute ("CitySize", EnumValue (m_city));
  // cancel shadowing effect
  propagationLossModel->SetAttribute ("ShadowSigmaOutdoor", DoubleValue (0.0));
  propagationLossModel->SetAttribute ("ShadowSigmaIndoor", DoubleValue (0.0));
  propagationLossModel->SetAttribute ("ShadowSigmaExtWalls", DoubleValue (0.0));

  double loss = propagationLossModel->GetLoss (mma, mmb);

  NS_LOG_INFO ("Calculated loss: " << loss);
  NS_LOG_INFO ("Theoretical loss: " << m_lossRef);
 
  NS_TEST_ASSERT_MSG_EQ_TOL (loss, m_lossRef, 0.1, "Wrong loss !");
  Simulator::Destroy ();
}
开发者ID:shuiziliuBUPT,项目名称:HelloWorld,代码行数:33,代码来源:buildings-pathloss-test.cpp


示例12: NS_LOG_FUNCTION

shared_ptr<Data>
ContentStoreImpl<Policy>::Lookup(shared_ptr<const Interest> interest)
{
  NS_LOG_FUNCTION(this << interest->getName());

  typename super::const_iterator node;
  if (interest->getExclude().empty()) {
    node = this->deepest_prefix_match(interest->getName());
  }
  else {
    node = this->deepest_prefix_match_if_next_level(interest->getName(),
                                                    isNotExcluded(interest->getExclude()));
  }

  if (node != this->end()) {
    this->m_cacheHitsTrace(interest, node->payload()->GetData());

    shared_ptr<Data> copy = make_shared<Data>(*node->payload()->GetData());
    return copy;
  }
  else {
    this->m_cacheMissesTrace(interest);
    return 0;
  }
}
开发者ID:FerberX,项目名称:ndnSIM,代码行数:25,代码来源:content-store-impl.hpp


示例13: NS_LOG_FUNCTION

void
SpectrumInterference::AddSignal (Ptr<const SpectrumValue> spd, const Time duration)
{
  NS_LOG_FUNCTION (this << *spd << duration);
  DoAddSignal (spd);
  Simulator::Schedule (duration, &SpectrumInterference::DoSubtractSignal, this, spd);
}
开发者ID:shuiziliuBUPT,项目名称:HelloWorld,代码行数:7,代码来源:spectrum-interference.cpp


示例14: NS_LOG_FUNCTION

// callback
void
NetDeviceFace::receiveFromNetDevice(Ptr<NetDevice> device, Ptr<const Packet> p, uint16_t protocol,
                                    const Address& from, const Address& to,
                                    NetDevice::PacketType packetType)
{
  NS_LOG_FUNCTION(device << p << protocol << from << to << packetType);

  Ptr<Packet> packet = p->Copy();
  try {
    uint32_t type = Convert::getPacketType(p);
    if (type == ::ndn::tlv::Interest) {
      shared_ptr<const Interest> i = Convert::FromPacket<Interest>(packet);
      this->emitSignal(onReceiveInterest, *i);
    }
    else if (type == ::ndn::tlv::Data) {
      shared_ptr<const Data> d = Convert::FromPacket<Data>(packet);
      this->emitSignal(onReceiveData, *d);
    }
    else {
      NS_LOG_ERROR("Unsupported TLV packet");
    }
  }
  catch (::ndn::tlv::Error&) {
    NS_LOG_ERROR("Unrecognized TLV packet");
  }
}
开发者ID:Stumble,项目名称:ccalgo-ndnsim,代码行数:27,代码来源:ndn-net-device-face.cpp


示例15: NS_LOG_FUNCTION

void
PacketProbe::ConnectByPath (std::string path)
{
  NS_LOG_FUNCTION (this << path);
  NS_LOG_DEBUG ("Name of probe to search for in config database: " << path);
  Config::ConnectWithoutContext (path, MakeCallback (&ns3::PacketProbe::TraceSink, this));
}
开发者ID:shuiziliuBUPT,项目名称:HelloWorld,代码行数:7,代码来源:packet-probe.cpp


示例16: NS_LOG_FUNCTION

void
IpL4Protocol::ReceiveIcmp (Ipv6Address icmpSource, uint8_t icmpTtl,
                           uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo,
                           Ipv6Address payloadSource, Ipv6Address payloadDestination,
                           const uint8_t payload[8])
{
  NS_LOG_FUNCTION (this << icmpSource << static_cast<uint32_t> (icmpTtl) << static_cast<uint32_t> (icmpType) << static_cast<uint32_t> (icmpCode) << icmpInfo << payloadSource << payloadDestination << payload);
}
开发者ID:shuiziliuBUPT,项目名称:HelloWorld,代码行数:8,代码来源:ip-l4-protocol.cpp


示例17: bar

Bar::Bar (Ptr<const Packet> bar, Mac48Address recipient, uint8_t tid, bool immediate)
  : bar (bar),
    recipient (recipient),
    tid (tid),
    immediate (immediate)
{
  NS_LOG_FUNCTION (this << bar << recipient << static_cast<uint32_t> (tid) << immediate);
}
开发者ID:shuiziliuBUPT,项目名称:HelloWorld,代码行数:8,代码来源:block-ack-manager.cpp


示例18: NS_LOG_FUNCTION

    void CachingControllerApplication::HandleClientConfigurationInput(Ptr<Socket> HandleClientConfigurationInput) {
        NS_LOG_FUNCTION(this);
        std::ostringstream buf;
        HandleClientConfigurationInput->Recv()->CopyData(&buf, INT_MAX);
        HandleNewResourceAsked(buf.str());


    }
开发者ID:nherbaut,项目名称:svnf-simu,代码行数:8,代码来源:CachingControllerApplication.cpp



注:本文中的NS_LOG_FUNCTION函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ NS_LossyConvertUTF16toASCII函数代码示例发布时间:2022-05-30
下一篇:
C++ NS_LITERAL_STRING函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap