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 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