moteaccess
Class MoteRequest

java.lang.Object
  extended bymoteaccess.MoteRequest
Direct Known Subclasses:
LimeMoteRequest

public class MoteRequest
extends java.lang.Object

Class describing an unconditional read request.

Version:
1.0
Author:
Carlo Curino, Matteo Giani, Marco Giorgetta, Alessandro Giusti

Field Summary
protected  MoteID moteID
          ID of the mote to be queried
protected  SensorType sensorType
          The desired sensor.
protected  boolean timedMode
          If this flag is active, then the request is timed, i.e.
 
Constructor Summary
MoteRequest()
          Default constructor.
MoteRequest(MoteID m, SensorType sensorType, boolean timedMode)
          Public constructor for a new MoteRequest.
MoteRequest(MoteRequest mr2)
          Copy constructor.
 
Method Summary
 MoteID getMoteID()
          Getter method for the ID of the mote that has performed the reading.
 SensorType getSensorType()
          Getter method for the Type of sensor requested.
 boolean isTimed()
          Returns true if this request is timed, false if it is to be run until a reading is obtained.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sensorType

protected SensorType sensorType
The desired sensor.


timedMode

protected boolean timedMode
If this flag is active, then the request is timed, i.e. it is run until the sensing timeout expires. Otherwise, the request continues to run until at least one reply is received.


moteID

protected MoteID moteID
ID of the mote to be queried

Constructor Detail

MoteRequest

public MoteRequest()
Default constructor. Constructs a MoteRequest for a timed reading from any sensor of any mote.


MoteRequest

public MoteRequest(MoteID m,
                   SensorType sensorType,
                   boolean timedMode)
Public constructor for a new MoteRequest.

Parameters:
m - the mote Identifier
sensorType - the type of sensor to be read
timedMode - Query mode : if true, the query stops itself after the timeout expires. Otherwise, it runs indefinitely until a reply is received.

MoteRequest

public MoteRequest(MoteRequest mr2)
Copy constructor.

Method Detail

getMoteID

public MoteID getMoteID()
Getter method for the ID of the mote that has performed the reading.


getSensorType

public SensorType getSensorType()
Getter method for the Type of sensor requested.


isTimed

public boolean isTimed()
Returns true if this request is timed, false if it is to be run until a reading is obtained.