LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 05-09-2024, 01:47 AM   #1
Aman Kemal
LQ Newbie
 
Registered: May 2024
Posts: 5

Rep: Reputation: 0
ns Dir-antenna-test.tcl


aman@aman-VirtualBox:~$ cd /home/aman/ns-allinone-2.35/ns-2.35/Directional-Antenna_ex-2
aman@aman-VirtualBox:~/ns-allinone-2.35/ns-2.35/Directional-Antenna_ex-2$ ns Dir-antenna-test.tcl
num_nodes is set 6
invalid command name "Antenna/DirAntenna"
while executing
"Antenna/DirAntenna create _o22 "
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new $anttype"
(procedure "_o14" line 13)
(Node/MobileNode add-interface line 13)
invoked from within
"$node add-interface $chan $propInstance_ $llType_ $macType_ $ifqType_ $ifqlen_ $phyType_
$antType_ $topoInstance_ $inerrProc_ $outerrProc_ $FECProc_"
(procedure "_o3" line 83)
(Simulator create-wireless-node line 83)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns_ node"
(procedure "create_node" line 27)
invoked from within
"create_node 10 10 0"
invoked from within
"set node_(0) [create_node 10 10 0]"
(file "Dir-antenna-test.tcl" line 259)
aman@aman-VirtualBox:~/ns-allinone-2.35/ns-2.35/Directional-Antenna_ex-2$

Last edited by Aman Kemal; 05-09-2024 at 01:48 AM. Reason: I face this kind of error when I run .tcl file in ns-2.35
 
Old 05-09-2024, 05:19 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,711

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by Aman Kemal View Post
Code:
aman@aman-VirtualBox:~$ cd /home/aman/ns-allinone-2.35/ns-2.35/Directional-Antenna_ex-2
aman@aman-VirtualBox:~/ns-allinone-2.35/ns-2.35/Directional-Antenna_ex-2$ ns Dir-antenna-test.tcl
num_nodes is set 6
invalid command name "Antenna/DirAntenna"
while executing
"Antenna/DirAntenna create _o22 "
invoked from within
"catch "$className create $o $args" msg"
invoked from within
"if [catch "$className create $o $args" msg] {
if [string match "__FAILED_SHADOW_OBJECT_" $msg] {
delete $o
return ""
}
global errorInfo
error "class $..."
(procedure "new" line 3)
invoked from within
"new $anttype"
(procedure "_o14" line 13)
(Node/MobileNode add-interface line 13)
invoked from within
"$node add-interface $chan $propInstance_ $llType_ $macType_ $ifqType_ $ifqlen_ $phyType_
$antType_ $topoInstance_ $inerrProc_ $outerrProc_ $FECProc_"
(procedure "_o3" line 83)
(Simulator create-wireless-node line 83)
invoked from within
"_o3 create-wireless-node"
("eval" body line 1)
invoked from within
"eval $self create-wireless-node $args"
(procedure "_o3" line 23)
(Simulator node line 23)
invoked from within
"$ns_ node"
(procedure "create_node" line 27)
invoked from within
"create_node 10 10 0"
invoked from within
"set node_(0) [create_node 10 10 0]"
(file "Dir-antenna-test.tcl" line 259)
aman@aman-VirtualBox:~/ns-allinone-2.35/ns-2.35/Directional-Antenna_ex-2$
Is there an actual question here??? You just posted a lump of commands/errors/messages with zero context, and no details about your system. Likely related to your other thread:
https://www.linuxquestions.org/quest...-a-4175736665/

...where you're asking us to look things up for you, so you can do your homework.
 
Old 05-18-2024, 07:01 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,516

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
ns2 DirectionalAntenna

HOWTO ns-2.35 + DirectionalAntenna
Code:
$ tar xvf ns-allinone-2.35_gcc5.tar.gz 
https://drive.google.com/file/d/0B7S...FDb7ul0VFk6FZQ
cd ns-allinone-2.35/
patch -p0 < directional-antenna_ns235.patch
export CC=gcc-4.8 CXX=g++-4.8 && ./install
cd ns-2.35/
cp ns ns-dir-antenna
sudo cp ns-dir-antenna /usr/local/bin/
------ Simulation -------
$ export NS_ANTENNA_FILE=./antenna1.txt && ns-dir-antenna Dir-antenna-test.tcl
Build example ns-2.33 + Directonal Antenna
Code:
$ tar xvf ns-allinone-2.33.tar.gz
cd ns-allinone-2.33/
patch -p0 < ns233_gcc5.patch
https://drive.google.com/file/d/1XCe...ew?usp=sharing
patch -p0 < dir-antenna_ns233.patch
https://drive.google.com/file/d/14Yf...usp=drive_link
export CC=gcc-4.8 CXX=g++-4.8 && ./install
cd ns-2.33/
cp ns ns233_dir-antenna
sudo cp ns233_dir-antenna /usr/local/bin/
 --------- Simulation ----------
export NS_ANTENNA_FILE=./antenna1.txt && ns233_dir-antenna Dir-antenna-test.tcl
All ~400 ns2 patches https://drive.google.com/drive/folde...usp=drive_link

-

Last edited by knudfl; 05-18-2024 at 07:11 AM.
 
  


Reply

Tags
directional-antenna, ns2



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
how to change omni antenna to directional antenna in NS2 programming 13thsparton Linux - Software 1 10-08-2015 03:36 AM
copying files from home dir to another dir from another dir in a lower dir chomito44 Linux - General 5 10-19-2013 06:18 PM
Command to display /dir, /dir/sub, /dir/sub/files knockout_artist Linux - Newbie 9 10-25-2007 02:57 PM
Is an antenna an antenna or are there different kinds? General Linux - Laptop and Netbook 1 04-27-2007 08:36 PM

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

All times are GMT -5. The time now is 09:11 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
Open Source Consulting | Domain Registration