Code Search for Developers
 
 
  

sim_component.asc from EmStar at Krugle


Show sim_component.asc syntax highlighted

Using the sim_component Option in .sim files
============================================
The EmStar Team
$Id: sim_component.asc,v 1.2 2005/01/14 23:48:52 karenyc Exp $

The sim_component option is used to specify components that are part of the simulation environment (as opposed to the nodes device that will be simulated).  The usage is:
*sim_component = "component_to_simulate command_line_options";*
 +

There are several sim_component components provided as part of EmStar, and users may also develop their own.

sim/sim_radio options:
----------------------

The sim_radio component is defined in link:http://cvs.cens.ucla.edu/lxr/source/emstar/sim/radio/sim_radio.c[sim_radio.c].  This defines the simulated radio interface that each node uses to communicate as well as the behaviour of the simulated channel.

Usage:
~~~~~~

           usage: sim_radio [-r <radio_type>] [-c] [-m <model> <args>] [--provides <link>,<link>...] [--graph <arg>] -d
           
           Arguments: 
              -c: Use the contention model 
              -d: Provides device: neighbors_real with ground-truth connectivity 
              --fake-link-est: provides ground-truth connectivity as neighbors 
              -p: Set the radio power 
              -m: Set the channel model
              -r: Set the radio MAC type, one of: 
                   BMAC [default] 
                   SMAC 
                   802.11 
              -R: Set the radio HW type, one of: 
                   mica1 
                   mica2  [default for BMAC/SMAC] 
                   802.11 [default for 802.11 MAC] 
              --graph <arg>: just dump a graph of the specified channel/hw 
                   arg is destfile,minpot,maxpot,deltapot,mindist,maxdist,deltadist 
             --coll-graph <chosen-node>: Print files with transmission start/end times and 
                  collision start/end times 
              --provides: Set the link name for this [default provided by radio spec] 
              --use-node-id: Define the interface id's to be equal to node id's 


Parameter explanation:
~~~~~~~~~~~~~~~~~~~~~~

*-c: Use the contention model* +
    The use of the contention model will effect packet losses during your simulation by adding another packet loss mechanism.  A node may receive a packet based on the propagation condition of the model, but the packet can still be lost due to concurrent traffic (collisions).  With the -c switch you are bounded to have equal or more losses than without it. The magnitude of loss will depend on your traffic pattern.  

WARNING: The contention model is still under development, and contains bugs.  It is suitable for development, but may not be suitable for publication quality data.

*-p: Set the radio transmit power* +
The effect of this option depends on the channel model.  For some of the models it has no effect (perfect, circle), for some other ones it has a probabilitic effect based on an analytical formula and a random number (norm_noise, uni_noise) and for the rest it uses the value to match the closest data set of the models that are based on statistical data gathered for different environments. +

NOTE: Several of the models do not have a deterministic mapping between tx values and radius (as in real life).

*-m: Set the channel model* +
There are a number of different channel models provided including: +
PERFECT - a perfect, lossless channel +
CIRCLE - simple deterministic 8 meter model +
NORM_NOISE - var pwr, noise from a normal distribution +
UNI_NOISE - var pwr, noise from a uniform distribution +
EMP_AVG - empirical model, average case, indoors +
EMP_AVG_OUTDOORS_URBAN - empirical model, average case, outdoors urban +
EMP_STATE - empirical model, stateful case, indoors +

You can also use an arbitrary topology external to the simulator.  An example of its use is found in link:http://cvs.cens.ucla.edu/lxr/source/emstar/devel/multihop/rr_demo/rr_sim.sim[rr_sim.sim]:

`sim-component = "sim/sim_radio -c -m topo_file --node_map ../devel/multihop/jr_deployment/jr_loc --topo_filename ../devel/multihop/jr_deployment/link_quality --use-node-id ";`






See more files for this project here

EmStar

EmStar is a software system for developing and deploying wireless sensor networks involving Linux-based platforms. As the wireless sensor network community has attempted to deploy more complex designs---large-scale, long-lived systems that need self-organization and adaptivity---a number of difficult software design issues have arisen. Advances in software design have not kept pace with the capabilities of hardware. This is because designing for an adaptive, efficient, and useful sensor network has turned out to be surprisingly complex and difficult. EmStar is a Linux-based software framework, whose goal is to dramatically reduce this complexity, enabling work to be shared and reused, and simplifying and speeding the design of new sensor network applications.

Project homepage: http://cvs.cens.ucla.edu/emstar/
Programming language(s): C,Shell Script
License: other

  misc/
    queue.asc
  building_an_array.asc
  delay.asc
  emcee.asc
  emsim.asc
  emtos.asc
  events.asc
  gdb.asc
  http.asc
  index.asc
  link.asc
  make.asc
  misc.asc
  node.info
  prog_model.asc
  run.asc
  sim_component.asc