Passion/NS

two interface[error]

sunshout 2006. 9. 24. 16:52
I'm making a node with two interfaces, and the second
one is UMTS, I've changed the procedure add-interface
in ns-mobilenode.tcl:

set t $nifs_               ;# counter

               set numif [$ns set numifs]
for {set i 0} {$i < $numif} {incr i} {
             if {$i > 0}  {

               set opt(channel)
Channel/WirelessChannel
               set opt(pmodel) Propagation/UmtsTdd
               set opt(lltype) LL/RLC
               set opt(mactype) Mac/UmtsTdd/MS
               set opt(qtype) Queue/MQ
               set opt(qlen) 5000
               set opt(iftype) Phy/UmtsTddPhy
               set opt(anttype) Antenna/OmniAntenna
               set opt(inerrproc) ""
               set opt(outerrproc) ""
               set opt(fecproc) ""
               puts "segunda interface"
               incr t
               }


incr nifs_
              puts $nifs_
           set netif_($t) [new $iftype] ;#
interface
set mac_($t) [new $mactype] ;# mac layer
set ifq_($t) [new $qtype] ;# interface queue
set ll_($t)                [new $lltype] ;# link
layer
               set ant_($t)              [new
$anttype]                        ;# antenna type
               set pmodel_($t)         $pmodel      
               ;# propagation model
               set channel_($t)        $channel     
                ;# channel
               set qlen_($t)             $qlen      
                     ;# queue length

and I added -numif (interfaces number) to the API.
I'm not sure how to declare the variable here, Could
you give me some advice?.

The other way I'm trying is calling since my tcl,
directly to the procedure add-interface after use
node-config and declare MH:

set prop2                   Propagation/UmtsTdd      
;#
set iftype                   Phy/UmtsTddPhy          
;# network
set mactype                Mac/UmtsTdd/MS           
;#
set qtype                       Queue/MQ             
   ;#
set lltype2             LL/RLC              ;#
Link layer type
set qlen                 5000                       ;#
max packet in ifq
set anttype         Antenna/OmniAntenna            ;#
antenna
$MH add-interface $chan_1_ $prop2 $lltype2 $mactype
$qtype $qlen $iftype $anttype "" "" ""

but not success with propagation model in line:
$netif_($t) propagation $pmodel_($t) ;# Propagation
Model

Thanks in advance

Mario