class Simulator


Inheritance:


Public Fields

Simulator instvar addressType_
Simulator instvar agentTrace_
Simulator instvar allocAddr_
Simulator instvar alltrace_
Simulator instvar annotationSeq_
Simulator instvar antType_
Simulator instvar chan
Simulator instvar channelType_
Simulator instvar cluster_num_
Simulator instvar color_
Simulator instvar delay_
Simulator instvar domain_num_
Simulator instvar dropper_
Simulator instvar energyModel_
Simulator instvar hlevel_
Simulator instvar ifqlen_
Simulator instvar ifqType_
Simulator instvar imepflag_
Simulator instvar initialEnergy_
Simulator instvar level1_
Simulator instvar level2_
Simulator instvar link_
Simulator instvar linkConfigList_
Simulator instvar llType_
Simulator instvar macTrace_
Simulator instvar macType_
Simulator instvar McastMask_
Simulator instvar McastShift_
Simulator instvar mn_
Simulator instvar mobileIP_
Simulator instvar MobileNode_
Simulator instvar monitoredAgents_
Simulator instvar movementTrace_
Simulator instvar MrtHandle_
Simulator instvar multiSim_
Simulator instvar namConfigFile_
Simulator instvar namtraceAllFile_
Simulator instvar namtraceSomeFile_
Simulator instvar newTraceFormat
Simulator instvar Node_
Simulator instvar nodebits_
Simulator instvar nodefactory_
Simulator instvar NodeMask_
Simulator instvar nodes_num_
Simulator instvar NodeShift_
Simulator instvar nullAgent_
Simulator instvar phyType_
Simulator instvar propInstance_
Simulator instvar propType_
Simulator instvar queueMap_
Simulator instvar RenoAckfsm_
Simulator instvar RenoDelAckfsm_
Simulator instvar routerTrace_
Simulator instvar routingAgent_
Simulator instvar routingTable_
Simulator instvar rtModel_
Simulator instvar rtq_
Simulator instvar rxPower_
Simulator instvar scheduler_
Simulator instvar started_
Simulator instvar TahoeAckfsm_
Simulator instvar TahoeDelAckfsm_
Simulator instvar topoInstance_
Simulator instvar traceAllFile_
Simulator instvar tracedAgents_
Simulator instvar txPower_
Simulator instvar vartab_
Simulator instvar wiredRouting_

Public Methods

Simulator instproc abstract-tcp {}
Simulator instproc add-agent-trace { agent name {f ""} }
Simulator instproc add-first-links {node_ linktype linkargs chan}
Simulator instproc add-isl {ltype node1 node2 bw qtype qlim}
Simulator instproc addressType {val}
Simulator instproc adhocRouting {val}
Simulator instproc after {ival args}
Simulator instproc agentTrace {val}
Simulator instproc all-links-list {}
Simulator instproc all-nodes-list {}
Simulator instproc antType {val}
Simulator instproc at args
Simulator instproc at-now args
Simulator instproc attach-agent { node agent }
Simulator instproc attach-fmon {lnk fm { edrop 0 } }
Simulator instproc attach-tbf-agent { node agent tbf }
Simulator instproc bw_parse { bspec }
Simulator instproc cancel args
Simulator instproc channelType {val}
Simulator instproc check-node-num {}
Simulator instproc chk-hier-field-lengths {}
Simulator instproc clear-mcast {}
Simulator instproc clearMemTrace {}
Simulator instproc color { id name }
Simulator instproc compute-algo-routes {}
Simulator instproc compute-flat-routes {}
Simulator instproc compute-hier-routes {}
Simulator instproc compute-route-for-mobilenodes {}
Simulator instproc compute-routes {}
Simulator instproc connect {src dst}
Simulator instproc cost {n1 n2 c}
Simulator instproc create-aodv-agent { node }
Simulator instproc create-connection {s_type source d_type dest pktClass}
Simulator instproc create-connection-list {s_type source d_type dest pktClass}
Simulator instproc create-dsdv-agent { node }
Simulator instproc create-node-instance { args }
Simulator instproc create-tcp-connection {s_type source d_type dest pktClass}
Simulator instproc create-tora-agent { node }
Simulator instproc create-trace { type file src dst {op ""} }
Simulator instproc create-wireless-node { args }
Simulator instproc create_packetformat { }
Simulator instproc delay { n1 n2 delay }
Simulator instproc delay_parse { dspec }
Simulator instproc delete-agent-trace { agent }
Simulator instproc detach-agent { node agent }
Simulator instproc drop-trace { n1 n2 trace }
Simulator instproc dump-namaddress {}
Simulator instproc dump-namagents {}
Simulator instproc dump-namcolors {}
Simulator instproc dump-namlans {}
Simulator instproc dump-namlinks {}
Simulator instproc dump-namnodes {}
Simulator instproc dump-namqueues {}
Simulator instproc dump-namversion { v }
Simulator instproc dump-routelogic-distance {}
Simulator instproc dump-routelogic-nh {}
Simulator instproc dumper obj
Simulator instproc dumpq {}
Simulator instproc duplex-intserv-link { n1 n2 bw pd sched signal adc args }
Simulator instproc duplex-link { n1 n2 bw delay type args }
Simulator instproc duplex-link-op { n1 n2 op args }
Simulator instproc energy-color-change {level1 level2}
Simulator instproc energyModel {val}
Simulator instproc expand-address {}
Simulator instproc expand-port-field-bits nbits
Simulator instproc flush-trace {}
Simulator instproc gen-map {}
Simulator instproc get-AllocAddrBits {prog}
Simulator instproc get-color { id }
Simulator instproc get-nam-config {}
Simulator instproc get-nam-traceall {}
Simulator instproc get-node-by-addr address
Simulator instproc get-node-by-id id
Simulator instproc get-node-id-by-addr address
Simulator instproc get-nodetype {}
Simulator instproc get-ns-traceall {}
Simulator instproc get-routelogic {}
Simulator instproc halt {}
Simulator instproc hier-node haddr
Simulator instproc hier-topo {rl}
Simulator instproc ifqLen {val}
Simulator instproc ifqType {val}
Simulator instproc imep-support {}
Simulator instproc init args
Simulator instproc init-nam {}
Simulator instproc initial_node_pos {nodep size}
Simulator instproc initialEnergy {val}
Simulator instproc is-started {}
Simulator instproc link { n1 n2 }
Simulator instproc link-lossmodel {lossobj from to}
Simulator instproc llType {val}
Simulator instproc lossmodel {lossobj from to}
Simulator instproc macTrace {val}
Simulator instproc macType {val}
Simulator instproc make-lan {nodelist bw delay \
Simulator instproc makeflowmon { cltype { clslots 29 } }
Simulator instproc maybeEnableTraceAll {obj args}
Simulator instproc mobileIP {val}
Simulator instproc mobility-trace {ttype atype node}
Simulator instproc monitor-agent-trace { agent }
Simulator instproc monitor-queue { n1 n2 qtrace { sampleInterval 0.1 } }
Simulator instproc movementTrace {val}
Simulator instproc mrtproto { mproto { nodelist "" } }
Simulator instproc mrtproto-iifs {mproto node iiflist }
Simulator instproc multicast
Simulator instproc multicast args
Simulator instproc nam-end-wireless {stoptime}
Simulator instproc namtrace-all file
Simulator instproc namtrace-all-wireless {file optx opty}
Simulator instproc namtrace-all-wireless {file optx opty}
Simulator instproc namtrace-config { f }
Simulator instproc namtrace-queue { n1 n2 {file ""} }
Simulator instproc namtrace-some file
Simulator instproc newLan {nodelist bw delay args}
Simulator instproc node args
Simulator instproc node-config args
Simulator instproc now {}
Simulator instproc nullagent {}
Simulator instproc phyType {val}
Simulator instproc populate-mobilenode {level}
Simulator instproc propType {val}
Simulator instproc puts-nam-config { str }
Simulator instproc puts-nam-traceall { str }
Simulator instproc puts-ns-traceall { str }
Simulator instproc queue-limit { n1 n2 limit }
Simulator instproc re-rewind-nam { }
Simulator instproc register-nam-linkconfig link
Simulator instproc remove-nam-linkconfig {i1 i2}
Simulator instproc rewind-nam { }
Simulator instproc routerTrace {val}
Simulator instproc rtmodel { dist parms args }
Simulator instproc rtmodel-at {at op args}
Simulator instproc rtmodel-configure {}
Simulator instproc rtmodel-delete model
Simulator instproc rtproto {proto args}
Simulator instproc rtt { src dst }
Simulator instproc run {}
Simulator instproc run-mcast {}
Simulator instproc rxPower {val}
Simulator instproc satnode args
Simulator instproc satnode-geo {lon linkargs chan}
Simulator instproc satnode-geo-repeater {lon chan}
Simulator instproc satnode-polar {alt inc lon alpha plane linkargs chan}
Simulator instproc satnode-terminal {lat lon}
Simulator instproc set-address {node}
Simulator instproc set-address-format {opt args}
Simulator instproc set-animation-rate { rate }
Simulator instproc set-dsr-nodetype {}
Simulator instproc set-hieraddress {hlevel args}
Simulator instproc simplex-connect { src dst }
Simulator instproc simplex-link { n1 n2 bw delay qtype args }
Simulator instproc simplex-link-op { n1 n2 op args }
Simulator instproc snapshot { }
Simulator instproc terminate-nam { }
Simulator instproc topoInstance {val}
Simulator instproc toraDebug {val}
Simulator instproc trace-all file
Simulator instproc trace-all-satlinks {f}
Simulator instproc trace-annotate { str }
Simulator instproc trace-queue { n1 n2 {file ""} }
Simulator instproc txPower {val}
Simulator instproc use-newtrace {}
Simulator instproc use-scheduler type
Simulator instproc wiredRouting {val}

Documentation

Create the core OTcl class called "Simulator". This is the principal interface to the simulation engine.

Simulator instproc get-AllocAddrBits {prog}

Simulator instvar allocAddr_

Simulator instproc set-address-format {opt args}

Simulator instproc expand-port-field-bits nbits

Simulator instproc set-address {node}

Simulator instproc expand-address {}

Simulator instproc set-hieraddress {hlevel args}

Simulator instproc get-node-by-addr address
Given an node's address, Return the node

Simulator instvar Node_

Simulator instproc get-node-id-by-addr address
Given an node's address, Return the node-id

Simulator instproc create_packetformat { }

Simulator instvar vartab_

Simulator instproc gen-map {}

Simulator instvar link_

Simulator instvar MobileNode_

Simulator instproc maybeEnableTraceAll {obj args}

Simulator instproc rtproto {proto args}

Simulator instvar routingTable_

Simulator instproc get-routelogic {}

Simulator instproc dump-routelogic-nh {}

Simulator instproc dump-routelogic-distance {}

Simulator instproc compute-routes {}

Simulator instproc compute-flat-routes {}

Simulator instproc hier-topo {rl}
Hierarchical routing support

Simulator instvar domain_num_

Simulator instvar cluster_num_

Simulator instvar nodes_num_

Simulator instvar hlevel_

Simulator instproc compute-hier-routes {}

Simulator instproc rtmodel { dist parms args }

Simulator instvar rtModel_

Simulator instproc rtmodel-configure {}

Simulator instvar rtq_

Simulator instproc rtmodel-at {at op args}

Simulator instproc rtmodel-delete model

Simulator instproc compute-algo-routes {}

Simulator instproc compute-route-for-mobilenodes {}

Simulator instvar mn_

Simulator instproc populate-mobilenode {level}

Simulator instproc satnode-polar {alt inc lon alpha plane linkargs chan}
Wrapper method for making a polar satellite node that first creates a satnode plus two link interfaces (uplink and downlink) plus two satellite channels (uplink and downlink) Additional ISLs can be added later

Simulator instproc satnode-geo {lon linkargs chan}
Wrapper method for making a geo satellite node that first creates a satnode plus two link interfaces (uplink and downlink) plus two satellite channels (uplink and downlink)

Simulator instproc satnode-geo-repeater {lon chan}
Wrapper method for making a geo satellite repeater node that first creates a satnode plus two link interfaces (uplink and downlink) plus two satellite channels (uplink and downlink)

Simulator instproc satnode-terminal {lat lon}
Wrapper method that does nothing really but makes the API consistent

Simulator instproc satnode args

Simulator instproc add-first-links {node_ linktype linkargs chan}
Helper method for creating uplinks and downlinks for a satellite node

Simulator instproc add-isl {ltype node1 node2 bw qtype qlim}
Add network stacks for ISLs, and create channels for them

Simulator instproc trace-all-satlinks {f}

Simulator instproc newLan {nodelist bw delay args}
newLan: create a LAN from a sete of nodes

Simulator instproc make-lan {nodelist bw delay \
For convenience, use make-lan. For more fine-grained control, use newLan instead of make-lan. {macType Mac/Csma/Cd} -> for now support for only Mac

Simulator instproc multicast args

Simulator instproc multicast

Simulator instvar multiSim_

Simulator instproc run-mcast {}

Simulator instproc clear-mcast {}

Simulator instproc mrtproto { mproto { nodelist "" } }

Simulator instvar MrtHandle_

Simulator instproc mrtproto-iifs {mproto node iiflist }
finer control than mrtproto: specify which iifs protocols owns

Simulator instproc all-links-list {}

Simulator instproc snapshot { }

Simulator instproc rewind-nam { }

Simulator instproc re-rewind-nam { }

Simulator instproc terminate-nam { }

Simulator instproc add-agent-trace { agent name {f ""} }
This function records agents being traced, so they will be written into nam trace when the simulator starts

Simulator instvar tracedAgents_

Simulator instproc delete-agent-trace { agent }

Simulator instproc monitor-agent-trace { agent }

Simulator instvar monitoredAgents_

Simulator instproc dump-namagents {}
nam initialization

Simulator instproc dump-namversion { v }

Simulator instproc dump-namcolors {}

Simulator instvar color_

Simulator instproc dump-namlans {}

Simulator instproc dump-namlinks {}

Simulator instvar linkConfigList_

Simulator instproc dump-namnodes {}

Simulator instproc dump-namqueues {}

Simulator instproc dump-namaddress {}
Write hierarchical masks/shifts into trace file

Simulator instvar NodeShift_

Simulator instvar NodeMask_

Simulator instvar McastShift_

Simulator instvar McastMask_

Simulator instproc init-nam {}

Simulator instvar annotationSeq_

Simulator instproc trace-annotate { str }
Other animation control support

Simulator instproc set-animation-rate { rate }
rate's unit is second

Simulator instproc init args

Simulator instproc nullagent {}

Simulator instvar nullAgent_

Simulator instproc use-scheduler type

Simulator instvar scheduler_

Simulator instproc dumper obj
A simple method to wrap any object around a trace object that dumps to stdout

Simulator instproc addressType {val}

Simulator instproc adhocRouting {val}

Simulator instproc llType {val}

Simulator instproc macType {val}

Simulator instproc propType {val}

Simulator instproc ifqType {val}

Simulator instproc ifqLen {val}

Simulator instproc phyType {val}

Simulator instproc antType {val}

Simulator instproc channelType {val}

Simulator instproc topoInstance {val}

Simulator instproc wiredRouting {val}

Simulator instproc mobileIP {val}

Simulator instproc energyModel {val}

Simulator instproc initialEnergy {val}

Simulator instproc txPower {val}

Simulator instproc rxPower {val}

Simulator instproc agentTrace {val}

Simulator instproc routerTrace {val}

Simulator instproc macTrace {val}

Simulator instproc movementTrace {val}

Simulator instproc toraDebug {val}

Simulator instproc get-nodetype {}

Simulator instvar addressType_

Simulator instvar routingAgent_

Simulator instvar wiredRouting_

Simulator instproc node-config args

Simulator instvar nodefactory_

Simulator instvar propType_

Simulator instvar macTrace_

Simulator instvar routerTrace_

Simulator instvar agentTrace_

Simulator instvar movementTrace_

Simulator instvar channelType_

Simulator instvar topoInstance_

Simulator instvar propInstance_

Simulator instvar chan

Simulator instvar mobileIP_

Simulator instvar rxPower_

Simulator instvar txPower_

Simulator instproc node args
Default behavior is changed: consider nam as not initialized if no shape OR color parameter is given

Simulator instproc imep-support {}

Simulator instvar imepflag_

Simulator instproc create-wireless-node { args }

Simulator instvar llType_

Simulator instvar macType_

Simulator instvar ifqType_

Simulator instvar ifqlen_

Simulator instvar phyType_

Simulator instvar antType_

Simulator instvar energyModel_

Simulator instvar initialEnergy_

Simulator instvar namtraceAllFile_

Simulator instvar level1_

Simulator instvar level2_

Simulator instproc create-node-instance { args }

Simulator instproc set-dsr-nodetype {}

Simulator instproc create-tora-agent { node }

Simulator instproc create-dsdv-agent { node }

Simulator instproc create-aodv-agent { node }

Simulator instproc use-newtrace {}

Simulator instvar newTraceFormat

Simulator instproc mobility-trace {ttype atype node}

Simulator instproc hier-node haddr

Simulator instproc now {}

Simulator instproc at args

Simulator instproc at-now args

Simulator instproc cancel args

Simulator instproc after {ival args}

Simulator instproc check-node-num {}
check if total num of nodes exceed 2 to the power n where <n=node field size in address>

Simulator instvar nodebits_

Simulator instproc chk-hier-field-lengths {}
Check if number of items at each hier level (num of nodes, or clusters or domains) exceed size of that hier level field size (in bits). should be modified to support n-level of hierarchies

Simulator instproc run {}

Simulator instvar started_

Simulator instproc halt {}

Simulator instproc dumpq {}

Simulator instproc is-started {}

Simulator instproc clearMemTrace {}

Simulator instproc simplex-link { n1 n2 bw delay qtype args }

Simulator instvar queueMap_

Simulator instproc register-nam-linkconfig link
This is used by Link::orient to register/update the order in which links should created in nam. This is important because different creation order may result in different layout.

A poor hack. :( Any better ideas?

Simulator instproc remove-nam-linkconfig {i1 i2}
GT-ITM may occasionally generate duplicate links, so we need this check to ensure duplicated links do not appear in nam trace files.

Simulator instproc duplex-link { n1 n2 bw delay type args }

Simulator instproc duplex-intserv-link { n1 n2 bw pd sched signal adc args }

Simulator instproc simplex-link-op { n1 n2 op args }

Simulator instproc duplex-link-op { n1 n2 op args }

Simulator instproc flush-trace {}

Simulator instvar alltrace_

Simulator instproc namtrace-all file

Simulator instproc energy-color-change {level1 level2}

Simulator instproc namtrace-all-wireless {file optx opty}

Simulator instproc nam-end-wireless {stoptime}

Simulator instproc namtrace-some file

Simulator instvar namtraceSomeFile_

Simulator instproc namtrace-all-wireless {file optx opty}

Simulator instproc initial_node_pos {nodep size}

Simulator instproc trace-all file

Simulator instvar traceAllFile_

Simulator instproc get-nam-traceall {}

Simulator instproc get-ns-traceall {}

Simulator instproc puts-ns-traceall { str }
If exists a traceAllFile_, print $str to $traceAllFile_

Simulator instproc puts-nam-traceall { str }
If exists a traceAllFile_, print $str to $traceAllFile_

Simulator instproc namtrace-config { f }
namConfigFile is used for writing color/link/node/queue/annotations. XXX It cannot co-exist with namtraceAll.

Simulator instvar namConfigFile_

Simulator instproc get-nam-config {}

Simulator instproc puts-nam-config { str }
Used only for writing nam configurations to trace file(s). This is different from puts-nam-traceall because we may want to separate configuration informations and actual tracing information

Simulator instproc color { id name }

Simulator instproc get-color { id }

Simulator instproc create-trace { type file src dst {op ""} }
you can pass in {} as a null file

Simulator instproc namtrace-queue { n1 n2 {file ""} }

Simulator instproc trace-queue { n1 n2 {file ""} }

Simulator instproc monitor-queue { n1 n2 qtrace { sampleInterval 0.1 } }
arrange for queue length of link between nodes n1 and n2 to be tracked and return object that can be queried to learn average q size etc. XXX this API still rough

Simulator instproc queue-limit { n1 n2 limit }

Simulator instproc drop-trace { n1 n2 trace }

Simulator instproc cost {n1 n2 c}

Simulator instproc attach-agent { node agent }

Simulator instproc attach-tbf-agent { node agent tbf }

Simulator instproc detach-agent { node agent }

Simulator instproc delay { n1 n2 delay }
Helper proc for setting delay on an existing link

Simulator instproc connect {src dst}
XXX need to check that agents are attached to nodes already

Simulator instproc simplex-connect { src dst }

Simulator instproc get-node-by-id id

Simulator instproc all-nodes-list {}

Simulator instproc link { n1 n2 }

Simulator instproc create-connection {s_type source d_type dest pktClass}
Creates connection. First creates a source agent of type s_type and binds it to source. Next creates a destination agent of type d_type and binds it to dest. Finally creates bindings for the source and destination agents, connects them, and returns the source agent.

Simulator instproc create-connection-list {s_type source d_type dest pktClass}
Creates connection. First creates a source agent of type s_type and binds it to source. Next creates a destination agent of type d_type and binds it to dest. Finally creates bindings for the source and destination agents, connects them, and returns a list of source agent and destination agent.

Simulator instproc create-tcp-connection {s_type source d_type dest pktClass}
This seems to be an obsolete procedure.

Simulator instproc makeflowmon { cltype { clslots 29 } }

Simulator instproc attach-fmon {lnk fm { edrop 0 } }

Simulator instproc lossmodel {lossobj from to}
Imported from session.tcl. It is deleted there. to insert loss module to regular links in detailed Simulator

Simulator instproc link-lossmodel {lossobj from to}
This function generates losses that can be visualized by nam.

Simulator instproc bw_parse { bspec }

Simulator instproc delay_parse { dspec }

Simulator instproc rtt { src dst }

Simulator instvar delay_

Simulator instproc abstract-tcp {}

Simulator instvar TahoeAckfsm_

Simulator instvar RenoAckfsm_

Simulator instvar TahoeDelAckfsm_

Simulator instvar RenoDelAckfsm_

Simulator instvar dropper_


Direct child classes:
SessionSim
OldSim
NamSimulator
MultiSim

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

Adapted for the NS documentation page

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de