[ns] Sink selection
Subha Uthayaraj
usubha.me at gmail.com
Sun Jan 23 21:53:58 PST 2011
---------- Forwarded message ----------
From: Subha Uthayaraj <usubha.me at gmail.com>
Date: Mon, Jan 24, 2011 at 9:52 AM
Subject: Sink selection
To: ns-users at isi.edu
Hi all,
I am using multiple sinks with high density network in my Tcl code. That is
I am using 500 devices(sensor nodes) and 4 sink nodes which are deployed
randomly. I want to create traffic between sink and devices. My concept is
"the devices should select sink node *based on transmission energy or
area*and send packets to corresponding sink node".
How to achieve that? I googled but i couldnt find answer.
**
for {set val(x) 0} {$val(x) < 25} {incr val(x)} {
for {set val(y) 0} {$val(y) < 25} {incr val(y)} {
for {set i 1} {$i < $val(nn)} {incr i} {
ftptraffic $i 0 $appTime(1)
}
}
}
I used like this in my code.
I am getting error as follows:
num_nodes is set 504
INITIALIZE THE LIST xListHead
Traffic: ftp
Acknowledgement for data: on
*terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc*
what it means?
Please anyone reply me.
Thank you.
--
Regards,
Subha
More information about the Ns-users
mailing list