moteaccess
Class MoteResult

java.lang.Object
  extended bymoteaccess.MoteResult

public class MoteResult
extends java.lang.Object

This class carries the information of the result of a reading from the motes.

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

Field Summary
private  int epochTime
          The epoch time that the mote was in when it generated the reading
private  RequestID rid
          The requestID of the operation that generated this reading.
private  int sensorReading
          The value of the reading.
private  SensorType sensorType
          The kind of sensor this reading came from.
private  MoteID sourceID
          The mote this reading came from.
private  java.util.Date timeStamp
          The timeStamp generated by the base station when this MoteResult was created.
 
Constructor Summary
MoteResult(SensorType sensorType, int sensorReading, MoteID sourceMote, int epochTime, RequestID rid)
          Standard contructor of the MoteResult, all the values of the result are passed as parameters, but the timestamp which is generated.
 
Method Summary
 int getEpochTime()
           
 RequestID getRid()
           
 int getSensorReading()
           
 SensorType getSensorType()
           
 MoteID getSourceID()
           
 java.util.Date getTimeStamp()
           
 void setRid(RequestID rid)
           
 void setSensorType(SensorType type)
          Sets the sensor type associated to this result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sensorType

private SensorType sensorType
The kind of sensor this reading came from.


sensorReading

private int sensorReading
The value of the reading.


sourceID

private MoteID sourceID
The mote this reading came from.


epochTime

private int epochTime
The epoch time that the mote was in when it generated the reading


timeStamp

private java.util.Date timeStamp
The timeStamp generated by the base station when this MoteResult was created.


rid

private RequestID rid
The requestID of the operation that generated this reading.

Constructor Detail

MoteResult

public MoteResult(SensorType sensorType,
                  int sensorReading,
                  MoteID sourceMote,
                  int epochTime,
                  RequestID rid)
Standard contructor of the MoteResult, all the values of the result are passed as parameters, but the timestamp which is generated.

Parameters:
sensorType - the type of the sensor.
sensorReading - the value of the reading of the sensor.
sourceMote - the mote that gave the reading.
epochTime - the epoch time of the mote.
rid - the request id this reading is responding to.
Method Detail

setSensorType

public void setSensorType(SensorType type)
Sets the sensor type associated to this result.


getSensorType

public SensorType getSensorType()

getTimeStamp

public java.util.Date getTimeStamp()

getEpochTime

public int getEpochTime()

getSensorReading

public int getSensorReading()

getSourceID

public MoteID getSourceID()

getRid

public RequestID getRid()

setRid

public void setRid(RequestID rid)