de.Android_Seminar.backend
Interface SensorData
- All Known Implementing Classes:
- SensorDataImpl
public interface SensorData
A container interface for sensor data.
The sensor data from the different sensors varies sometimes, thus
some conventions are needed.
For example the sensor data for a accelerometer consists of 3 values,
values for the x-, y-, and z-axis of the accelerometer. The temperature
sensor on the other hand only delivers one value.
Thus a data set consists of all these values, delivered by a sensor
as well as its corresponding sensor and the time these data have been recorded.
- Author:
- jonas
getValues
double[] getValues()
- Returns:
- all values for one data set
e.g. a accelerometer data set consists of 3 values (x, y, z)
a temperature data set consists of only 1 value
- See Also:
SensorData#setValues(float[])
setValues
void setValues(double[] values,
long timestamp)
- Parameters:
values
- sets the values for one data set
e.g. a accelerometer data set consists of 3 values (x, y, z)
a temperature data set consists of only 1 valuetimestamp
- the time when the data was changed
(time in milliseconds since January 1, 1970 00:00:00 UTC)- See Also:
getValues()
getLength
int getLength()
- Returns:
- the number of values, a data set consists of.
e.g. a accelerometer data set consists of 3 values (x, y, z)
a temperature data set consists of only 1 value
getSensorType
SensorType getSensorType()
- Returns:
- the sensor type for which data can be saved in this data set
- See Also:
SensorType
getTimeStamp
java.sql.Timestamp getTimeStamp()
- Returns:
- the time stamp this a data set has been recorded
- See Also:
Timestamp
getLocation
Location getLocation()
- Returns:
- the location at which the data set has been recorded
- See Also:
Location
setLocation
void setLocation(Location location)
- Parameters:
location
- the location at which the data set will be recorded
setTimeStamp
void setTimeStamp(java.sql.Timestamp timeStamp)
- Deprecated. do not use this method any more
- Parameters:
timeStamp
- sets the time stamp when a data set was recorded- See Also:
Timestamp