moteaccess
Class SensorType

java.lang.Object
  extended bymoteaccess.SensorType
All Implemented Interfaces:
java.io.Serializable

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

See Also:
Serialized Form

Field Summary
static int ACCEL_X
           
static int ACCEL_X_FR
           
static int ACCEL_Y
           
static int ACCEL_Y_FR
           
static int ANY
          The constants that indicates the different kinds of sensors.
static int ANY_FR
          The constants that indicate the default freshness of each sensor.
static int[] freshness
           
static int GPS
           
static int GPS_FR
           
static int HUM
           
static int HUM_FR
           
static int LIGHT
           
static int LIGHT_FR
           
static int MAG_X
           
static int MAG_X_FR
           
static int MAG_Y
           
static int MAG_Y_FR
           
static int MIC
           
static int MIC_FR
           
static int NUM_OF_SENSORS
           
static int RADIO_STRENGTH
           
static int RADIO_STRENGTH_FR
           
private static java.lang.String[] sensorNames
          An array that indicates the names of the sensor.
static int TEMP
           
static int TEMP_FR
           
private  int type
          The internal representation of the sensor type.
static int VOLTAGE
           
static int VOLTAGE_FR
           
 
Constructor Summary
SensorType(int t)
          Public constructor of a sensor type from its int representation.
 
Method Summary
 boolean equals(java.lang.Object s)
           
static int freshness(SensorType st)
          Static method that returns the freshness of the passed sensor.
 int getSensorType()
          Getter for the sensor type.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ANY

public static final int ANY
The constants that indicates the different kinds of sensors.

See Also:
Constant Field Values

LIGHT

public static final int LIGHT
See Also:
Constant Field Values

TEMP

public static final int TEMP
See Also:
Constant Field Values

MIC

public static final int MIC
See Also:
Constant Field Values

ACCEL_X

public static final int ACCEL_X
See Also:
Constant Field Values

ACCEL_Y

public static final int ACCEL_Y
See Also:
Constant Field Values

MAG_X

public static final int MAG_X
See Also:
Constant Field Values

VOLTAGE

public static final int VOLTAGE
See Also:
Constant Field Values

MAG_Y

public static final int MAG_Y
See Also:
Constant Field Values

GPS

public static final int GPS
See Also:
Constant Field Values

HUM

public static final int HUM
See Also:
Constant Field Values

RADIO_STRENGTH

public static final int RADIO_STRENGTH
See Also:
Constant Field Values

NUM_OF_SENSORS

public static final int NUM_OF_SENSORS
See Also:
Constant Field Values

ANY_FR

public static final int ANY_FR
The constants that indicate the default freshness of each sensor.

See Also:
Constant Field Values

LIGHT_FR

public static final int LIGHT_FR
See Also:
Constant Field Values

TEMP_FR

public static final int TEMP_FR
See Also:
Constant Field Values

MIC_FR

public static final int MIC_FR
See Also:
Constant Field Values

ACCEL_X_FR

public static final int ACCEL_X_FR
See Also:
Constant Field Values

ACCEL_Y_FR

public static final int ACCEL_Y_FR
See Also:
Constant Field Values

MAG_X_FR

public static final int MAG_X_FR
See Also:
Constant Field Values

VOLTAGE_FR

public static final int VOLTAGE_FR
See Also:
Constant Field Values

MAG_Y_FR

public static final int MAG_Y_FR
See Also:
Constant Field Values

GPS_FR

public static final int GPS_FR
See Also:
Constant Field Values

HUM_FR

public static final int HUM_FR
See Also:
Constant Field Values

RADIO_STRENGTH_FR

public static final int RADIO_STRENGTH_FR
See Also:
Constant Field Values

freshness

public static final int[] freshness

sensorNames

private static final java.lang.String[] sensorNames
An array that indicates the names of the sensor. Position GPS_FR indicates the textual name of GPS_FR sensor.


type

private int type
The internal representation of the sensor type.

Constructor Detail

SensorType

public SensorType(int t)
Public constructor of a sensor type from its int representation.

Parameters:
t - the sensor type int representation.
Method Detail

freshness

public static int freshness(SensorType st)
Static method that returns the freshness of the passed sensor.

Parameters:
st - the sensor.
Returns:
the default freshness of sensor st.

getSensorType

public int getSensorType()
Getter for the sensor type.

Returns:
the int representation of the sensor type.

equals

public boolean equals(java.lang.Object s)

toString

public java.lang.String toString()