Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例如,我如何每 20us 执行一个函数?
我的目标是使用(这是最好的方法吗?)在 CSMA 通道上记录忙/闲状态,ns3::CsmaChannel::IsBusy我必须定期调用它来记录每个返回的值和时间。
ns3::CsmaChannel::IsBusy
您可以使用
simulator:: schedule function
定期安排功能
Simulator:: Schedule (Seconds(20.0), &function name, parameter1, parameter 2)
这是每 20 秒安排一次事件的语法