33.5 Commands at a glance

Following is a list of commands used to simulate dynamic scenarios in ns:

$ns_ rtmodel model model-params args
This command defines the dynamic model (currently implemented models are: Deterministic, Exponential, Manual or Trace) to be applied to nodes and links in the topology. The first two arguments consists of the rtmodel and the parameter to configure the model. <args> stands for different type of arguments expected with different dynamic model types. This returns a handle to a model object corresponding to the specified model.

$ns_ rtmodel-delete model
This command takes the handle of the routemodel <model> as an argument, removes it from the list of rtmodels maintained by simulator and deletes the model.

$ns_ rtmodel-at at op args
This command is a special interface to the Manual model of network dynamics. It takes the time <at>, type of operation <op> and node or link on which to apply the operation <args> as the arguments. At time <at>, the operation <op> which maybe up or down is applied to a node or link.

$rtmodel trace ns f optional:op
This enables tracing of dynamics effected by this model in the links. <ns> is an instance of the simulator, <f> the output file to write the traces to and <op> is an optional argument that may be used to define a type of operation (like nam). This is a wrapper for the class Link procedure trace-dynamics.

$link trace-dynamics ns f optional:op
This is a class link instance procedure that is used to setup tracing of dynamics in that particular link. The arguments are same as that of class rtModel's procedure trace described above.

$link dynamic
This command inserts a DynamicLink object at the head of the queue and signals to all connectors in the link that the link is now dynamic.

Internal procedures:

$ns_ rtmodel-configure
This is an internal procedure that configures all dynamic models that are present in the list of models maintained by the simulator.

Tom Henderson 2014-12-17