37.9 Commands at a glance
The following is a list of commands to create/manipulate srm agents in
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 37.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
Configuration parameters for srm agent may be set as follows:
\$srm set fid\_ \<flow-id\>
\$srm set tg\_ \<traffic-generator-instance\>
For all possible parameters and their default values please lookup ns/tcl/mcast/srm.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:
See ns/tcl/ex/srm.tcl for a simple example of setting up a SRM agent.