|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SensorController
An interface to control the devices sensors, start a recording for different sensors and obtain data from them.
| Method Summary | |
|---|---|
void |
activateSensor(SensorType sensor)
Activates a sensor and makes it ready to record data. |
void |
activateSensor(SensorType sensor,
int bufferSize)
|
void |
close()
closes the SensorController and disables all sensors. |
void |
deactivateSensor(SensorType sensor)
Disables a sensor and prevents it from recording data. |
java.util.List<SensorType> |
getActiveSensors()
|
SensorData[] |
getBufferedData(SensorType sensor,
int amount)
|
SensorData |
getCurrentData(SensorType sensor)
|
int |
getDeviceSensorNumber()
|
java.util.List<SensorType> |
getDeviceSensors()
|
FileTransmitter |
getFileTransmitter()
|
double |
getMaxValue(SensorType sensor)
returns an sensor specific, expected maximum value. |
double |
getMinValue(SensorType sensor)
returns an sensor specific, expected minimum value. |
SensorConfiguration |
getSensorConfiguration()
|
XmlCreator |
getXmlCreator()
|
boolean |
hasSensor(SensorType sensor)
Determines if the device has a specific sensor |
boolean |
isRecordin()
Determines if a recording is running |
boolean |
sensorIsActive(SensorType sensor)
Checks, if a sensor is active or not |
void |
startRecording(java.lang.String tag,
java.lang.String file)
Starts a data recording. |
void |
stopRecording()
Stops a recording immediately. |
| Method Detail |
|---|
void startRecording(java.lang.String tag,
java.lang.String file)
SensorConfiguration.getLastTimeout() value is reached.
A recording will start after SensorConfiguration.getLastStartDelay() seconds.
tag - determines how a data set will be tagged. If the tag is a null valuefile - the path and name of the xml file (audio file) the data will be saved to.
If audio data will be recorded, for this data type a audio file (mp3) will be created.
Thus all data, except audio data will be saved in a single xml file with path and name
specified in the 'file' attribute. For audio data, a mp3 file will be created with path
and name specified in the 'file' attribute.
If no tag should be set, an empty string or a null value can be delivered.stopRecording(),
activateSensor(SensorType),
deactivateSensor(SensorType)void stopRecording()
SensorController#startRecording(String, String, float),
activateSensor(SensorType),
deactivateSensor(SensorType)boolean isRecordin()
SensorController#startRecording(String, String, float),
stopRecording()void activateSensor(SensorType sensor)
SensorConfiguration corresponding to this SensorController
object. Otherwise the default sample rate determined by the SensorConfiguration
class will be used.
sensor - the sensor which should be activatedSensorController#startRecording(String, String, float),
deactivateSensor(SensorType)
void activateSensor(SensorType sensor,
int bufferSize)
sensor - the sensor which should be activatedbufferSize - the size of the sensor's buffer. If the size is smaller than
one, the default size will be usedactivateSensor(SensorType)void deactivateSensor(SensorType sensor)
SensorController#startRecording(String, String, float),
activateSensor(SensorType),
SensorTypejava.util.List<SensorType> getActiveSensors()
activateSensor(SensorType),
SensorTypeint getDeviceSensorNumber()
activateSensor(SensorType),
SensorTypejava.util.List<SensorType> getDeviceSensors()
SensorTypeSensorConfiguration getSensorConfiguration()
SensorControllerSensorConfigurationboolean hasSensor(SensorType sensor)
sensor - the sensor which should be checked for availability
SensorTypeboolean sensorIsActive(SensorType sensor)
sensor - the sensor which should be checked
SensorTypedouble getMaxValue(SensorType sensor)
sensor - the sensor where the maximal value should be obtained from
SensorTypedouble getMinValue(SensorType sensor)
sensor - the sensor where the minimal value should be obtained from
SensorTypeSensorData getCurrentData(SensorType sensor)
sensor - the sensor where the data should be obtained from
SensorType was activated (activateSensor(SensorType)),
or no data have been received already.SensorType,
SensorData
SensorData[] getBufferedData(SensorType sensor,
int amount)
sensor - the sensor where the data should be obtained fromamount - the number of data sets that should be returned.
If 'amount' is greater than the sernsor's buffer size, all buffered
data will be returned.
SensorType was activated: (activateSensor(SensorType)).
An empty array if no data were received from the sensorSensorType,
SensorDatavoid close()
deactivateSensor(SensorType)XmlCreator getXmlCreator()
XmlCreator that gives you some xml creating/manipulation features
for activitiesFileTransmitter getFileTransmitter()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||