Node.js 在NS-3中,如何分配节点id以及如何在终端中检索/显示它们?
我想用它的唯一id显示20个节点。我用下面的命令使用for循环创建了20个节点Node.js 在NS-3中,如何分配节点id以及如何在终端中检索/显示它们?,node.js,network-programming,ns2,ns-3,Node.js,Network Programming,Ns2,Ns 3,我想用它的唯一id显示20个节点。我用下面的命令使用for循环创建了20个节点 NodeContainer c; c.Create (20); int j; for(j = 0; j < 20; j++) { m.Install (c.Get(j)); } std::count << "Node Id: %d" << ??? <<std::endl; NodeContainer c; c、 创建(20); int j; 对于(j=0;j
NodeContainer c;
c.Create (20);
int j;
for(j = 0; j < 20; j++)
{
m.Install (c.Get(j));
}
std::count << "Node Id: %d" << ??? <<std::endl;
NodeContainer c;
c、 创建(20);
int j;
对于(j=0;j<20;j++)
{
m、 安装(c.Get(j));
}
std::计数<代码>节点容器c;
c、 创建(20);
对于(uint32_t i=0;i<20;++i)
{
std::ostringstream os;
os NS-3:
NodeContainer c;
c.Create (20);
for (uint32_t i = 0; i < 20; ++i)
{
std::ostringstream os;
os << "node-" << i;
}