next up previous contents index
Next: 30. PLM Up: 29. Agent/SRM Previous: 29.8 SRM objects

   
29.9 Commands at a glance

The following is a list of commands to create/manipulate srm agents in simulations:

set srm0 [new Agent/SRM]
This creates an instance of the SRM agent. In addition to the base class, two extensions of the srm agent have been implemented. They are Agent/SRM/Fixed and Agent/SRM/Adaptive. See section 29.7 for details about these extensions.

ns_ attach-agent node srm-agent
This attaches the srm agent instance to the given <node>.

set grp [Node allocaddr]
\$srm set dst\_ \$grp
This assigns the srm agent to a multicast group represented by the mcast address <grp>.

Configuration parameters for srm agent may be set as follows:

\$srm set fid\_ \
\$srm set tg\_ \
.. etc
For all possible parameters and their default values please lookup /tcl/mcast/srm.tcl and /tcl/mcast/srm-adaptive.tcl.

set exp [new Application/Traffic/Exponential]
\$exp attach-agent \$srm
This command attaches a traffic generator (an exponential one in this example), to the srm agent.

$srm start; $exp start
These commands start the srm agent and traffic generator. Note that the srm agent and traffic generator have to be started separately. Alternatively, the traffic generator may be started through the agent as follows:
$srm start-source.

See /tcl/ex/srm.tcl for a simple example of setting up a SRM agent.


next up previous contents index
Next: 30. PLM Up: 29. Agent/SRM Previous: 29.8 SRM objects

2000-08-24