- Home Page of ProjectGuideline.com ›
- Forums ›
- Questions Asked by Students and Scholars ›
- How to pass node's label from tcl to .cc in ns-2?
Inactive
I’m working on NS-2.35 I write below instruction in TCL to assign a label to specific nodes:
$ns_ at 0 “$sink($i) label SuperNode” ;
now i need to use this label in .CC
what should i do?
Keymaster
In fact, labels are meant for rendering in NAM. So, generally, there is no simple way to access them from .cc code. But any way, you can do it in one way or another if you know the usage of bind command.
Bind command is used to do this tcl to cc or cc to tcl binding.
Learn about bind command.