ns3网卡创建流程

来源:互联网 发布:2016年淘宝女装排行榜 编辑:程序博客网 时间:2024/06/05 07:47
  CsmaHelper csma;  csma.SetChannelAttribute ("DataRate", StringValue ("5Mbps"));  csma.SetChannelAttribute ("Delay", StringValue ("0.001ms"));  NetDeviceContainer devices;  devices = csma.Install (nodes);


这是代码中的网卡实现。

属性设置如下,


  /**   * \param n1 the name of the attribute to set   * \param v1 the value of the attribute to set   *   * Set these attributes on each ns3::CsmaNetDevice created   * by CsmaHelper::Install   */  void SetDeviceAttribute (std::string n1, const AttributeValue &v1);  /**   * \param n1 the name of the attribute to set   * \param v1 the value of the attribute to set   *   * Set these attributes on each ns3::CsmaChannel created   * by CsmaHelper::Install   */  void SetChannelAttribute (std::string n1, const AttributeValue &v1);

即m_deviceFactory

m_channelFactory


  m_deviceFactory.SetTypeId ("ns3::CsmaNetDevice");  m_channelFactory.SetTypeId ("ns3::CsmaChannel");

在后面的类中列出了所有属性列表

0 0