Amazing technological breakthrough possible @S-Logix pro@slogix.in

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • pro@slogix.in
  • +91- 81240 01111

Social List

How to pass the variable tcl to c++ using NS2?

  • The variable (total number of nodes) in tcl is passed to c++ as follows.
    TCL part :

    Example : AODV protocol
    Agent / AODV set total_nodes_ 50

  • C++ part :

    int total_nodes_ ; // in header file
    bind(“total_nodes_,&total_nodes);
    Printf(“Total number of nodes %d \n”,total_nodes_);

  • Result :

    Total number of nodes 50