LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-28-2018, 09:12 AM   #1
arezoo123
LQ Newbie
 
Registered: Mar 2018
Posts: 3

Rep: Reputation: Disabled
ns2


Hi,
what does this line do in ns2?
$self sched 0.1
 
Old 03-28-2018, 09:21 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2018 CentOS6.10 CentOS7.5 + 50+ other Linux OS, for test only.
Posts: 17,081

Rep: Reputation: 3485Reputation: 3485Reputation: 3485Reputation: 3485Reputation: 3485Reputation: 3485Reputation: 3485Reputation: 3485Reputation: 3485Reputation: 3485Reputation: 3485
Welcome to LQ.

16.1.2 Creating Node movements https://www.isi.edu/nsnam/ns/doc/node172.html
Code:
# The movement of mobilenodes may be logged by using a procedure like the following:

proc log-movement {} {
    global logtimer ns_ ns

    set ns $ns_
    source ../mobility/timer.tcl
    Class LogTimer -superclass Timer
    LogTimer instproc timeout {} {
        global opt node_;
        for {set i 0} {$i \< $opt(nn)} {incr i} {
            $node_($i) log-movement
        }
        $self sched 0.1
    }

    set logtimer [new LogTimer]
    $logtimer sched 0.1
}
 
  


Reply

Tags
ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Detection of sybil attack in wireless sensor network in ns2. I need help to simulate it in ns2 Miralimk Linux - Software 1 02-22-2016 12:36 PM
NS2: How to set idle(sleeping) time to a node in wireless network in ns2 pon Linux - Newbie 0 08-19-2014 06:45 PM
NS2: Require eap-sim authentication code for simulation in ns2.24 noamankhatib Linux - Software 0 04-29-2013 12:03 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration