experiment.property
Class Capability

java.lang.Object
  extended by experiment.property.Capability
All Implemented Interfaces:
java.io.Serializable

public class Capability
extends java.lang.Object
implements java.io.Serializable

Created by IntelliJ IDEA. User: andy Date: Mar 10, 2010 Utilizes objects that describe the wiseml capability tag. It can be used to add capabilities to the nodes (examples are temperature, humidity, etc) and links (for example LQI, packet error rate, cost, etc). The user needs to specify the name, datatype, unit and a value.

See Also:
Serialized Form

Constructor Summary
Capability(java.lang.String name, Setup.Datatype dtype, Setup.Unit unit, java.lang.String value)
          Default Constructor.
 
Method Summary
 Setup.Datatype getDatatype()
          Returns the capability's Datatype
 java.lang.String getName()
          Return the capability's name
 Setup.Unit getUnit()
          Returns the capability's unit type
 java.lang.String getValue()
          Returns the capability's value
 void update(java.lang.String value)
          Update the capability
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Capability

public Capability(java.lang.String name,
                  Setup.Datatype dtype,
                  Setup.Unit unit,
                  java.lang.String value)
Default Constructor.

Parameters:
name - the name of the capability
dtype - the capability's data type
unit - the capability's unit type
value - capability's value
Method Detail

getDatatype

public Setup.Datatype getDatatype()
Returns the capability's Datatype

Returns:
a Datatype enum type

getName

public java.lang.String getName()
Return the capability's name

Returns:
a string containing the name

getUnit

public Setup.Unit getUnit()
Returns the capability's unit type

Returns:
a Unit enum type

getValue

public java.lang.String getValue()
Returns the capability's value

Returns:
s String containing the value

update

public void update(java.lang.String value)
Update the capability

Parameters:
value - contains the new value