LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-14-2014, 03:53 AM   #826
kartik.mag
LQ Newbie
 
Registered: Mar 2014
Posts: 1

Rep: Reputation: Disabled
problem with leach patch ns-2.34


hello deepa!!

im using fedora-20 version OS.

i referred to the previous threads but unfortunately couldnt solve my problem related to "Resource/energy problem" during leach patch simulation process. It would be really kind of you if you could help me out, as my engineering major project is based on leach protocol simulation in ns-2.34.

Kindly help me.. im getting this error

invalid command name "Resource/Energy"
while executing
"Resource/Energy instproc setParams {args} {
$self instvar energyLevel_ alarmLevel_
set energyLevel_ [lindex $args 0]
set alarmLevel_ [lind..."
(file "/root/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /root/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source /root/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl"
(file "/root/ns-allinone-2.34/ns-2.34/mit/uAMPS/sims/uamps.tcl" line 18)
invoked from within
"source.orig /root/ns-allinone-2.34/ns-2.34/mit/uAMPS/sims/uamps.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source /root/ns-allinone-2.34/ns-2.34/mit/uAMPS/sims/uamps.tcl"
(file "/root/ns-allinone-2.34/ns-2.34/tcl/mobility/leach.tcl" line 19)
invoked from within
"source.orig /root/ns-allinone-2.34/ns-2.34/tcl/mobility/leach.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source /root/ns-allinone-2.34/ns-2.34/tcl/mobility/$opt(rp).tcl"
(file "tcl/ex/wireless.tcl" line 187)


eagerly awaiting your reply.. it's an emergency.

Thanks and regards,
Kartik
 
Old 03-14-2014, 09:26 AM   #827
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
Quote:
Originally Posted by deepa_2111 View Post
Have you given the correct path to the files in the ns2.34/mit folder ?
is there any requirement to change the path for this line in any file......
source $env(uAMPS_LIBRARY)/ns-mte.tcl
 
Old 03-14-2014, 10:02 AM   #828
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
@deepa #823

As per your suggestion I have changed path in all files of /home/saurabh/ns-allinone-2.34/ns-2.34/mit foder as per my laptop structure.

After modifications error I am getting is

invalid command name "Resource/Energy"
while executing
"Resource/Energy instproc setParams { args } "
(file "/home/saurabh/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /home/saurabh/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source /home/saurabh/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl"
(file "/home/saurabh/ns-allinone-2.34/ns-2.34/mit/uAMPS/sims/uamps.tcl" line 29)
invoked from within
"source.orig /home/saurabh/ns-allinone-2.34/ns-2.34/mit/uAMPS/sims/uamps.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source /home/saurabh/ns-allinone-2.34/ns-2.34/mit/uAMPS/sims/uamps.tcl"
(file "tcl/mobility/leach.tcl" line 18)
invoked from within
"source.orig tcl/mobility/leach.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."invalid command name "Resource/Energy"
while executing
"Resource/Energy instproc setParams { args } "
(file "/home/saurabh/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /home/saurabh/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source /home/saurabh/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl"
(file "/home/saurabh/ns-allinone-2.34/ns-2.34/mit/uAMPS/sims/uamps.tcl" line 29)
invoked from within
"source.orig /home/saurabh/ns-allinone-2.34/ns-2.34/mit/uAMPS/sims/uamps.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source /home/saurabh/ns-allinone-2.34/ns-2.34/mit/uAMPS/sims/uamps.tcl"
(file "tcl/mobility/leach.tcl" line 18)
invoked from within
"source.orig tcl/mobility/leach.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source tcl/mobility/$opt(rp).tcl"
(file "tcl/ex/wireless.tcl" line 187)d
(procedure "source" line 8)invalid command name "Resource/Energy"
while executing
"Resource/Energy instproc setParams { args } "
(file "/home/saurabh/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl" line 11)
invoked from within
"source.orig /home/saurabh/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source /home/saurabh/ns-allinone-2.34/ns-2.34/mit/rca/resources/ns-energy-resource.tcl"
(file "/home/saurabh/ns-allinone-2.34/ns-2.34/mit/uAMPS/sims/uamps.tcl" line 29)
invoked from within
"source.orig /home/saurabh/ns-allinone-2.34/ns-2.34/mit/uAMPS/sims/uamps.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source /home/saurabh/ns-allinone-2.34/ns-2.34/mit/uAMPS/sims/uamps.tcl"
(file "tcl/mobility/leach.tcl" line 18)
invoked from within
"source.orig tcl/mobility/leach.tcl"
("uplevel" body line 1)
invoked from within
"uplevel source.orig[list $fileName]"
invoked from within
"if [$instance_ is_http_url $fileName] {
set buffer [$instance_ read_url $fileName]
uplevel eval $buffer
} else {
uplevel source.orig[list $fileName]
..."
(procedure "source" line 8)
invoked from within
"source tcl/mobility/$opt(rp).tcl"
(file "tcl/ex/wireless.tcl" line 187)
invoked from within
"source tcl/mobility/$opt(rp).tcl"
(file "tcl/ex/wireless.tcl" line 187)

It is saying for Resource/Energy word is invalid
 
Old 03-16-2014, 11:34 PM   #829
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@ deepa
**updates**
hey deepa, I called my function in "advertiseClusterHead" as you said and it works perfectly.now what i am doing is, i am checking nodes energy with threshold and if it is greater than it then CH will send TDMA schedule directly to nodes so that nodes can send data to CH. for this my code is:
if{ $E < $TE } {
puts "$nodeID is a cluster head at time [$ns_ now]"
$self setClusterHead
$ns_ at $now_ "self createSchedule"
}
and the output is cluster head sending TDMA schedule.. but the schedule is not received to other non CH nodes and hence data transmission is also not done.what is the reason behind this..please help me as soon as possible..thanks..
 
Old 03-18-2014, 10:26 AM   #830
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
Please look at this solution:
http://2bytes4u.blogspot.ca/2012/11/...on-ns-234.html


Quote:
Originally Posted by mittal_saurabhin View Post
@deepa #823

As per your suggestion I have changed path in all files of /home/saurabh/ns-allinone-2.34/ns-2.34/mit foder as per my laptop structure.

After modifications error I am getting is

invalid command name "Resource/Energy"
while executing
"Resource/Energy instproc setParams { args } "
....

It is saying for Resource/Energy word is invalid
 
Old 03-21-2014, 02:49 AM   #831
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@deepa
hi deepa..can u please give me the solution to my problem posted in post#829..I am trying to resolve my problem but i am unable to find the "sendmsg" function which may be presented in any cc file..and why it is not receiving the schedule? please help me..i am really stuck here..please..
 
Old 03-24-2014, 09:06 AM   #832
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
First of all, you need a space between 'if' and the '{' in your command "if{ $E < $TE } {".

Quote:
Originally Posted by keepwalking123 View Post
@deepa
hi deepa..can u please give me the solution to my problem posted in post#829..I am trying to resolve my problem but i am unable to find the "sendmsg" function which may be presented in any cc file..and why it is not receiving the schedule? please help me..i am really stuck here..please..
 
Old 03-25-2014, 11:24 AM   #833
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
Quote:
Originally Posted by deepa_2111 View Post
I have followed all the steps given in the link you provided to me...
ut still my leach.err is comprised of same errors.

please please please help me to resolve this issue.
 
Old 03-25-2014, 11:42 AM   #834
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
Like knudfl said some posts back, did you try with a different OS & ns2 version ?

Quote:
Originally Posted by mittal_saurabhin View Post
I have followed all the steps given in the link you provided to me...
ut still my leach.err is comprised of same errors.

please please please help me to resolve this issue.
 
1 members found this post helpful.
Old 03-26-2014, 12:04 AM   #835
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@deepa
hi deepa..sorry actually that was typo..there is space between if and bracket..and also there is no any syntax error..mine problem is other nodes are not getting CH tdma schedule..while tracing i have found sendmsg fun in rcagent.cc..and in that the event is scheduled..but still not getting the solution..how can i get it..please help me..
 
Old 03-26-2014, 08:39 AM   #836
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
Check if your createSchedule function is being called. And if it is, the time when it is called.
Leave the *.cc files. There is not much you can change in them.

Also, check if you are getting the correct values for 'E' and 'TE'.

Quote:
Originally Posted by keepwalking123 View Post
@deepa
hi deepa..sorry actually that was typo..there is space between if and bracket..and also there is no any syntax error..mine problem is other nodes are not getting CH tdma schedule..while tracing i have found sendmsg fun in rcagent.cc..and in that the event is scheduled..but still not getting the solution..how can i get it..please help me..
 
Old 03-27-2014, 04:38 AM   #837
keepwalking123
Member
 
Registered: Jan 2014
Posts: 52

Rep: Reputation: Disabled
@deepa
hi deepa, my create schedule is called because it is creating and sending schedule also.but after that the nodes are not receiving the schedule i.e. pointer is not going in recv function..what is the problem here can you tell me??
 
Old 03-27-2014, 09:52 AM   #838
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
Quote:
Originally Posted by kartik.mag View Post
hello deepa!!

Thanks and regards,
Kartik
@kartik
have u got the solution of your problem.......
if yes please do tell me also what is to be done for removing Resource/Energy error
 
Old 03-27-2014, 09:54 AM   #839
mittal_saurabhin
Member
 
Registered: Jul 2010
Posts: 45

Rep: Reputation: 0
Quote:
Originally Posted by deepa_2111 View Post
Like knudfl said some posts back, did you try with a different OS & ns2 version ?
no till date only working on ubuntu 13.10 and ns2.34
Do you suggest to use a different version of ubuntu and ns2................

if yes what do you suggest the best compatible version of ubuntu and ns2 so that there should be not any dependency issues
 
Old 03-28-2014, 10:04 AM   #840
deepa_2111
Member
 
Registered: Apr 2011
Distribution: -
Posts: 185

Rep: Reputation: 268Reputation: 268Reputation: 268
Yes, there is no harm in trying it out on a different OS + ns2.
Knudfl is much better qualified to answer questions regarding OS/ns2.

Quote:
Originally Posted by mittal_saurabhin View Post
no till date only working on ubuntu 13.10 and ns2.34
Do you suggest to use a different version of ubuntu and ns2................

if yes what do you suggest the best compatible version of ubuntu and ns2 so that there should be not any dependency issues
 
  


Reply

Tags
leach, leach-warning50, ns2, ns2 ns234, pegasis


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
ns:"error when calling class OldSim"&tclsh:"invalid command+child process exits abn." shojaru Linux - Newbie 0 03-05-2009 04:23 AM
labview stopped at "init tmp resource files" on FC4 baosheng Linux - Software 2 09-28-2007 11:02 AM
ORiNOCO WLAN card not working - "failed to allocate resource" hauneboo Linux - Laptop and Netbook 1 11-29-2005 09:08 AM
What "kernel opts" allow PC to power down with "turning energy off"? kornerr Linux - General 1 03-10-2005 12:07 PM
nvidia insmod: "Device or resource busy" w/GeForce 4 MX KeithSpook Linux - Hardware 4 03-03-2004 12:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:29 PM.

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
Open Source Consulting | Domain Registration