文件名ideal-8node-floor-v01-00.cc
终端输入./ns3 run ideal-8node-floor-v01-00
后报错
bug:msg="TraceSource 'TxErrHeader' is obsolete, with no fallback: Depending on the failure type, use the NAckedMpdu trace, the DroppedMpdu trace or one of the traces associated with TX timeouts.", +0.000000000s -1 file=/Users/mengyuanchen/Software/NS3/ns-allinone-3.36.1/ns-3.36.1/src/core/model/type-id.cc, line=1166 libc++abi: terminating Command 'build/scratch/ns3.36.1-ideal-8node-floor-v01-00-debug' died with <Signals.SIGABRT: 6>.
翻译:msg=“TraceSource’TxErrHeader’已过时,没有回退:根据故障类型,使用NAckedMpdu跟踪、DroppedMpdu或与TX超时相关的跟踪之一。
- 猜测是TraceSource的问题,但是啥也不懂,去学习一下
- 回调机制
~核心:通过传参的形式将函数的地址传递给其他函数,然后在其他函数中使用函数指针调用该函数
/*test.h*/定义该头文件
#pragma once
#include<iostream>
using namespace std;
typedef int(*callbackfun)(int, int,int); //函数的指针*callbackfun,该指针指向的函数的返回值为int型,且需要输入三个int型参数
void Add(callbackfun pf, int a=0, int b