[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] Use of fid_ and Class_ with Agents




Please can somebody out there help me,
I do not clearly understand the difference between fid_ parameter and 
class_ parameter used for configuring an Agent such as UPD.

If fid_ is used to identify traffic event associated with an Agent, and
Class_ is used to identify the class to which the traffic belongs in a
group of traffics, can I use the two parameters together as shown below?


$ns color 1 Blue

set n0 [$ns node]

set udp0 [new Agent/UDP]
$ns attach-agent $n0 $udp0
set cbr0 [new Application/Traffic/CBR]
$cbr0 atttach-agent $udp0
$udp0 set packetsize_ 500
$udp0  set fid_ 1
$udp0 set class_ 1 #Traffic for this UDP event is grouped as class 1
 
I will be very grateful if somebody can let me know if the above code
conform to NS kernel, and if not, can somebody let me have an example code
of how to used the two parameters together.

I will also like to know how NS treats the two parameters when the
simulation is running, and the distintions between the parameters.

Please help, thanks in advance.
Titus Awotula, MSc AMIEE
Dept. of Electronic & Electrical Engineering
Loughborough University
Loughborough.
Leicestershire LE11 3TU
Tel: Office (01509) 227079
     Home   (01509) 558102  
Fax: (01509) 227014