net.tinyos.sim.script.reflect
Class Sensor

java.lang.Object
  |
  +--net.tinyos.sim.script.reflect.SimReflect
        |
        +--net.tinyos.sim.script.reflect.Sensor

public class Sensor
extends net.tinyos.sim.script.reflect.SimReflect

Interface class to the sensor model.

The class is bound into the simcore module as the sensor global instance.


Constructor Summary
Sensor(net.tinyos.sim.script.ScriptInterpreter interp, net.tinyos.sim.SimDriver driver)
           
 
Method Summary
 void addField(java.lang.String fieldName, short adcPort, java.lang.String modelName)
          Add a new sensor field to the model.
 void addModel(java.lang.String name, net.tinyos.sim.SensorModel model)
          Add a new sensor model to the set of options.
 void removeField(java.lang.String fieldName)
          Add a new sensor field to the model.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sensor

public Sensor(net.tinyos.sim.script.ScriptInterpreter interp,
              net.tinyos.sim.SimDriver driver)
Method Detail

addModel

public void addModel(java.lang.String name,
                     net.tinyos.sim.SensorModel model)
Add a new sensor model to the set of options.

Parameters:
name - the name of the sensor model
model - the model subclass to use

addField

public void addField(java.lang.String fieldName,
                     short adcPort,
                     java.lang.String modelName)
Add a new sensor field to the model.

Parameters:
fieldName - sensor field name, e.g. "magnetism"
adcPort - ADC port value
modelName - name of the sensor model to use e.g. "linear10"

removeField

public void removeField(java.lang.String fieldName)
Add a new sensor field to the model.

Parameters:
fieldName - sensor field name