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 11-24-2011, 11:03 PM   #1
haiying7
LQ Newbie
 
Registered: Nov 2011
Location: Sydney, Australia
Posts: 15

Rep: Reputation: Disabled
Unhappy Got error when add a new antenna module into NS2!


Hi,

I write a new antenna module and want to add it into NS2. I can compile it successfully, but when I run the simulation file, I got the following error. It seems ns2 does not identify the new module. Could someone give me a help? THX a lot.

Code:
num_nodes is set 4
warning: Please use -channel as shown in tcl/ex/wireless-mitf.tcl
invalid command name "Antenna/DirectionalAntenna"
    while executing
"Antenna/DirectionalAntenna create _o23 "
    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 "_o15" 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 76)
    (Simulator create-wireless-node line 76)
    invoked from within
"_o3 create-wireless-node 0"
    ("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 $i"
    ("for" body line 2)
    invoked from within
"for {set i 0} {$i < $val(nn) } {incr i} {
	set node_($i) [$ns_ node $i]
}"
    (file "UAVDir.tcl" line 125)
 
Old 11-25-2011, 06:45 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,391

Rep: Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604
? May be you are using the original 'ns' ?

The new "ns Antenna/DirectionalAntenna" binary must be used
for "Antenna/DirectionalAntenna"
 
Old 11-26-2011, 10:11 PM   #3
haiying7
LQ Newbie
 
Registered: Nov 2011
Location: Sydney, Australia
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
? May be you are using the original 'ns' ?

The new "ns Antenna/DirectionalAntenna" binary must be used
for "Antenna/DirectionalAntenna"
Original 'ns'? What does that mean? How can I choose new or old?
 
Old 11-27-2011, 04:32 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,391

Rep: Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604Reputation: 3604
Say you have set your PATH to "another 'ns' ".
Then that ns will be used.

The new " 'ns' Antenna/DirectionalAntenna" binary can be copied
to /usr/local/bin/ . Then it is in a system PATH.

To be absolutely sure, it is used, please try :
'/usr/local/bin/ns <simulation file>.tcl'

.
 
Old 12-02-2011, 02:03 AM   #5
haiying7
LQ Newbie
 
Registered: Nov 2011
Location: Sydney, Australia
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
Say you have set your PATH to "another 'ns' ".
Then that ns will be used.

The new " 'ns' Antenna/DirectionalAntenna" binary can be copied
to /usr/local/bin/ . Then it is in a system PATH.

To be absolutely sure, it is used, please try :
'/usr/local/bin/ns <simulation file>.tcl'

.
I only have one NS version in the system, so I am not sure it is the problem of PATH. I will try it. Thank you anyway.
 
  


Reply


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
how to installing LTE module patch in NS2.33 kiwiw Ubuntu 179 02-27-2015 03:27 AM
Error on example simulation on ns2 using add-on for directional antenna Vixxx Linux - Software 5 02-03-2012 10:37 AM
patch LTE module for ns2 Emna Linux - Newbie 1 03-10-2011 02:59 AM
Ndiswrapper Error:couldn't add module alias: at /usr/sbin/ndiswrapper-1.9 line 717. Skuggi Linux - Wireless Networking 1 06-07-2007 11:57 AM
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 11:24 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