.tcl code for LEACH and SPIN protocols- Bad
I need the .tcl codes for LEACH and SPIN protocols. Could you mail me the codes to my e-mail id either to 'ksdeshamukh@gmail.com' or 'kartikavya@gmail.com'
|
Quote:
|
Welcome to LQ.
SPIN : spin/rca/sims/rca.tcl is included in "old-spin.tar.gz", post #13 → → http://www.linuxquestions.org/questi...2-a-928523/#13 SPIN info http://www.linuxquestions.org/questions/tags/spin-ns2/ LEACH : The files to run the simulation { test, leach_test, wireless*.tcl }: In the leach patches → exidus-pegasis-leach-ns234.patch.2.tar.gz , ns-234-leach.tar.gz , etc. Leach info http://www.linuxquestions.org/questions/tags/leach/ Leach / pegasis info http://www.linuxquestions.org/questions/tags/pegasis/ - |
thank you knudfl
it was very helpful and I could get the code. How to install SPIN protocol in ns-2.34?
|
1 Attachment(s)
# 4 .
There are examples, where people say : I added SPIN to ns-2.34/, but they didn't tell how to do it. ? Might be simple, it's a few lines to edit. ("Old ns2 mac* might be too different from "new ns2 mac* ?) .. Besides that, is the SPIN protocol used at all in real life ? *ns2 files with SPIN code : app.cc app.h cmu-trace.cc ll.cc ll.h mac.cc packet.cc packet.h scheduler.cc wireless-phy.cc Finding the lines with SPIN, in the spin/ directory : $ grep -Rin spin * ... Which will show the line numbers, where the SPIN code starts. EDIT : The mac.cc SPIN is just this ... 86:#ifdef SPIN 87-static int MacIndex = 0; 88-#else 89-static int MacIndex = 1; 90-#endif - |
to knufdl
while executing rca.tcl in SPIN protocol, I encountered this error,
' no such variable (read trace on "env(RCA_LIBRARY)") invoked from within "source $env(RCA_LIBRARY)/timer.tcl" (file"rca.tcl" line 1) ' also I have done the changes u had said..... Pls help me .... |
# 6 .
Which version of ns-allinone-2.xx are you using for SPIN ? About your errors : The line(s) with the error is missing. I.e. which variable is missing : Somewhere above the line with "no such variable". - |
to knufdl
I am using ns -allione 2.34
also in ubuntu 12.04 LTS |
# 6 .
What is the error ? ? The error is the usually one of the first lines. Post #5 shows the last five lines. - |
the error mentioned in #6 is encountered.
I typed " ns rca.tcl " in ns-2 terminal and it showed the message in post #6 and stopped execution..... TO knufdl, Sir/Madam, could pls upload a video how to execute SPIN protocol from scratch. It would be helpful.... Pls do as soon as possible....... need them badly .......... Thank you..... |
1 Attachment(s)
# 10 .
This is the result I got so far : Making the ten diff´s between the original ns-2.1b5a files, and the "ns-2.1b5a SPIN code" , like : $ diff -Nau ns-allinone-2.1b5a/ns-2.1b5/ll.h spin/ll.h > ll.h.patch The 10 files are attached as DIFF-2.1b5__spin.tar.bz2.txt . Download the 4.2kB package, rename to DIFF-2.1b5__spin.tar.bz2, and unpack. .. Then you have the 10 times "code to be added to ns-2.xx" files. .. I will try if the code is usable at all with ns-2.34 .... later. . |
1 Attachment(s)
To knudfl, Sir I am attaching the leach.txt file, could you provide me the a similar file that works for spin protocol, which shows output on nam and graph. Pls help me .. I need to have atleat some of the output by tomorrow please help me sir.... Waiting for your reply.....
|
# 12 .
Not leach.txt : You mean leach.tcl.txt . ( Saved here as ``kartiksd-(leach).tcl´´ ). ? I don't see that this tcl file has anything to do with LEACH. ? It's just a very nice simulation example with three xgraph outputs. The file can be used with any "none leach executable 'ns' ". If really leach , then please explain the "leach functions". Who wrote the file ? A link please. - |
A friend of mine gave me the file. can u give me optimised spin tcl for other than you mentioned in #3. Please sir...
|
# 14 .
Quote:
|
All times are GMT -5. The time now is 09:09 AM. |