moteaccess
Interface IMoteAccess

All Known Implementing Classes:
DummyMoteAccess, TOSMoteAccess

public interface IMoteAccess

Interface by which an application can start readings and install reactions. This interface is implemented in the moteaccess package, while the client application must provide an implementation of the IMoteListener interface.


Field Summary
static int DEFAULT_SENSING_TIMEOUT_SECS
          Constant that indicates the deafult sensing time, expressed in seconds.
 
Method Summary
 void doRead(RequestID rid, MoteRequest mr, IMoteListener ml)
          Method by which the MoteAccess layer is requested to start an unconditional read operation.
 void injectReaction(RequestID rid, MoteReaction mr, IMoteListener ml)
          Method by which the MoteAccess layer is requested to install a reaction.
 boolean setParameter(java.lang.String parameter, int value)
          Method by which parameters at the MoteAccess level can be set.
 void stopOperation(RequestID rid)
          Method used to stop a running operation, i.e.
 

Field Detail

DEFAULT_SENSING_TIMEOUT_SECS

public static final int DEFAULT_SENSING_TIMEOUT_SECS
Constant that indicates the deafult sensing time, expressed in seconds.

See Also:
Constant Field Values
Method Detail

doRead

public void doRead(RequestID rid,
                   MoteRequest mr,
                   IMoteListener ml)
Method by which the MoteAccess layer is requested to start an unconditional read operation.

Parameters:
rid - : the RequestID that the client application has generated.
mr - : the MoteRequest object describing the desired reading.
ml - : reference to the IMoteListener implementation to be notified of incoming results.

stopOperation

public void stopOperation(RequestID rid)
Method used to stop a running operation, i.e. a reading or a reaction.

Parameters:
rid - : the RequestID identifying the operation to be stopped.

injectReaction

public void injectReaction(RequestID rid,
                           MoteReaction mr,
                           IMoteListener ml)
Method by which the MoteAccess layer is requested to install a reaction.

Parameters:
rid - : the RequestID that the client application has generated.
mr - : the MoteReaction object describing the desired reaction.
ml - : reference to the IMoteListener implementation to be notified of incoming results.

setParameter

public boolean setParameter(java.lang.String parameter,
                            int value)
Method by which parameters at the MoteAccess level can be set.

Parameters:
parameter - String identifying the parameter to be modified
value - integer to which the parameter has to be set.
Returns:
boolean indicating wheter the update has taken place or not