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

Office Address

  • 2nd Floor, #7a, High School Road, Secretariat Colony Ambattur, Chennai-600053 (Landmark: SRM School) Tamil Nadu, India
  • pro@slogix.in
  • +91- 81240 01111

Social List

How to create nam file in NS2?

  • Step-1:Setup nam support in ns-2 by opening file test.nam (user defined name)
  • Step-2: Call the procedure namtrace-all-wireless {}

    set ns [new Simulator]set val(x) 1000set val(y) 1000set namtrace [open test.nam w]$ns namtrace-all-wireless $namtrace $val(x) $val(y)where,val(x) → x-coordinate dimensionval(y) → y-coordinate dimensionnamtrace → file handle for test.nam

    namtrace → file handle for test.nam

    ns → Simulator instance