我在哪里可以找到在NS2库的cpp文件中生成的打印信息,其中我添加了一些cout()函数来打印一些信息

Where can i find the printed information generated in the cpp files of NS2 library in which I added some cout() functions to print some information?

本文关键字:打印 信息 函数 添加 cout 在哪里 NS2 文件 cpp 库的      更新时间:2023-10-16

我在linux中使用ns2来做一些网络实验。 我在 ns 库的一些 cpp 文件中添加了一些打印行(通过函数 cout())。但是当我执行 TCL 脚本时,我在屏幕上看不到打印的信息。那么我在哪里可以找到 cpp 文件中生成的打印信息?

@Ryan ,嗨。

Ns2是一个otcl/tcl应用程序。"函数"也必须编译成ns-2.3x/tcl/lib/{ files.tcl }。

示例"打印消息"是默认的 HELLO :

CD NS-2.3X/TCL/lib/&&grep -in hello ns-lib.tcl

860:自我在 0.0 "$ragent启动" ;# 启动信标/你好消息

867: 自我在 0.0 "$ragent启动" ;# 启动信标/你好消息

891: 自我在 0.0 "$ragent启动" ;# 启动信标/你好消息

您还可以检查 HELLO 在 files.cc 中的位置:CD NS-2.3X/&&格雷普-凛你好 *

-