de.Android_Seminar.backend.impl
Class SensorConfigurationImpl

java.lang.Object
  extended by de.Android_Seminar.backend.impl.SensorConfigurationImpl
All Implemented Interfaces:
SensorConfiguration

public class SensorConfigurationImpl
extends java.lang.Object
implements SensorConfiguration


Constructor Summary
SensorConfigurationImpl()
          standard constructor
 
Method Summary
 java.util.Map<SensorType,SampleRate> getLastSampleRates()
          Receives the last for a specified sensor.
 float getLastStartDelay()
          Receives the last start delay.
 float getLastTimeout()
           
 java.util.Set<SensorType> getLastUsedSensors()
          Receives a list of all sensors that have been used during the last recording.
 boolean getLocationSaving()
           
 boolean getTimeSaving()
           
 void setLastSampleRates(java.util.Map<SensorType,SampleRate> rates)
          Saves the last sample rate to the configuration file.
 void setLastStartDelay(float delay)
          Saves the last start delay to the configuration file.
 void setLastTimeout(float timeout)
          The timeout value determines when a data recording will stop.
 void setLastUsedSensors(java.util.Set<SensorType> sensors)
          Saves all sensors that have been used for the last recording to the configuration file.
 void setLocationSaving(boolean saving)
          determines whether the current location should be saved within an 'activity' in the xml file or not
 void setTimeSaving(boolean saving)
          determines whether the current time should be saved within an 'activity' in the xml file or not
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SensorConfigurationImpl

public SensorConfigurationImpl()
standard constructor

Method Detail

getLastSampleRates

public java.util.Map<SensorType,SampleRate> getLastSampleRates()
Description copied from interface: SensorConfiguration
Receives the last for a specified sensor. If the application just started, the last sample rate will be obtained from the configuration file.

Specified by:
getLastSampleRates in interface SensorConfiguration
Returns:
the last sample rate used for specified sensor
See Also:
SensorType

getLastStartDelay

public float getLastStartDelay()
Description copied from interface: SensorConfiguration
Receives the last start delay. If the application just started, the start delay will be obtained from the configuration file.

Specified by:
getLastStartDelay in interface SensorConfiguration
Returns:
the last start delay time.
See Also:
SensorController#startRecording(String, String, float)

getLastUsedSensors

public java.util.Set<SensorType> getLastUsedSensors()
Description copied from interface: SensorConfiguration
Receives a list of all sensors that have been used during the last recording. If the application just started, the list will be obtained from the configuration file.

Specified by:
getLastUsedSensors in interface SensorConfiguration
Returns:
the sensors that have been used during the last recording.
See Also:
SensorType

setLastSampleRates

public void setLastSampleRates(java.util.Map<SensorType,SampleRate> rates)
Description copied from interface: SensorConfiguration
Saves the last sample rate to the configuration file.

Specified by:
setLastSampleRates in interface SensorConfiguration
Parameters:
rates - the sample rate and the sensor for which the last sample rate should be set
See Also:
SampleRate, SensorType

setLastStartDelay

public void setLastStartDelay(float delay)
Description copied from interface: SensorConfiguration
Saves the last start delay to the configuration file.

Specified by:
setLastStartDelay in interface SensorConfiguration
Parameters:
delay - the time the application has to wait until the recording will start after executing the SensorController#startRecording(String, String, float) method.
See Also:
SensorController#startRecording(String, String, float)

setLastUsedSensors

public void setLastUsedSensors(java.util.Set<SensorType> sensors)
Description copied from interface: SensorConfiguration
Saves all sensors that have been used for the last recording to the configuration file.

Specified by:
setLastUsedSensors in interface SensorConfiguration
Parameters:
sensors - all sensors that have been used for the last recording
See Also:
SensorType

getLastTimeout

public float getLastTimeout()
Specified by:
getLastTimeout in interface SensorConfiguration
Returns:
the last timeout value (in seconds). This value determines when a data recording will stop. if this value is negative, the recording will never stop.

setLastTimeout

public void setLastTimeout(float timeout)
Description copied from interface: SensorConfiguration
The timeout value determines when a data recording will stop. if this value is negative, the recording will never stop.

Specified by:
setLastTimeout in interface SensorConfiguration
Parameters:
timeout - the timeout in seconds

getLocationSaving

public boolean getLocationSaving()
Specified by:
getLocationSaving in interface SensorConfiguration
Returns:
true, if the location will be saved, false otherwise.
See Also:
SensorController#setLocationSaving(boolean)

getTimeSaving

public boolean getTimeSaving()
Specified by:
getTimeSaving in interface SensorConfiguration
Returns:
true, if the time will be saved, false otherwise.
See Also:
SensorController#setTimeSaving(boolean)

setLocationSaving

public void setLocationSaving(boolean saving)
Description copied from interface: SensorConfiguration
determines whether the current location should be saved within an 'activity' in the xml file or not

Specified by:
setLocationSaving in interface SensorConfiguration
Parameters:
saving - if this is true, the location will be saved

setTimeSaving

public void setTimeSaving(boolean saving)
Description copied from interface: SensorConfiguration
determines whether the current time should be saved within an 'activity' in the xml file or not

Specified by:
setTimeSaving in interface SensorConfiguration
Parameters:
saving - if this is true, the time will be saved