org.android.activityminer.model.configuration
Enum FrequencyTypes

Package class diagram package FrequencyTypes
java.lang.Object
  extended by java.lang.Enum<FrequencyTypes>
      extended by org.android.activityminer.model.configuration.FrequencyTypes
All Implemented Interfaces:
Serializable, Comparable<FrequencyTypes>

public enum FrequencyTypes
extends Enum<FrequencyTypes>

Frequency types for the runtime configuration.


Enum Constant Summary
FASTEST
          The maximum sample frequency (100Hz)
LOW
          The low sample frequency (16,6Hz)
LOWEST
          The lowest sample frequency (5Hz)
MODERATE
          The moderate sample frequency (25Hz)
NORMAL
          The normal sample frequency (50Hz)
 
Method Summary
static double getFrequency(FrequencyTypes fType)
          Getter for the frequency in Hz.
static FrequencyTypes getFrequencyForSampleRate(long sampleRate)
          Getter for the closest upper frequency for a given sample rate.
static List<FrequencyTypes> getKnownFrequencies(long maxSampleRate)
          Getter for the known frequencies for a given maximum sample rate.
static double getNyquistFrequency(FrequencyTypes fType)
           
static long getOverSamplingRate(FrequencyTypes fType)
          Getter for the over sampling rate (delta between two samples) in milliseconds.
static long getSampleRate(FrequencyTypes fType)
          Getter for the sample rate (delta between two samples) in milliseconds.
static FrequencyTypes valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FrequencyTypes[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

FASTEST

public static final FrequencyTypes FASTEST
The maximum sample frequency (100Hz)


NORMAL

public static final FrequencyTypes NORMAL
The normal sample frequency (50Hz)


MODERATE

public static final FrequencyTypes MODERATE
The moderate sample frequency (25Hz)


LOW

public static final FrequencyTypes LOW
The low sample frequency (16,6Hz)


LOWEST

public static final FrequencyTypes LOWEST
The lowest sample frequency (5Hz)

Method Detail

values

public static FrequencyTypes[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (FrequencyTypes c : FrequencyTypes.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static FrequencyTypes valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getKnownFrequencies

public static final List<FrequencyTypes> getKnownFrequencies(long maxSampleRate)
Getter for the known frequencies for a given maximum sample rate.

Parameters:
maxSampleRate - the maximum sample rate
Returns:
the known frequencies for the given rate

getFrequencyForSampleRate

public static final FrequencyTypes getFrequencyForSampleRate(long sampleRate)
Getter for the closest upper frequency for a given sample rate.

Parameters:
sampleRate - the sample rate
Returns:
the frequency

getSampleRate

public static final long getSampleRate(FrequencyTypes fType)
Getter for the sample rate (delta between two samples) in milliseconds.

Parameters:
fType - the frequency type
Returns:
the sample rate

getOverSamplingRate

public static final long getOverSamplingRate(FrequencyTypes fType)
Getter for the over sampling rate (delta between two samples) in milliseconds.

Parameters:
fType - the frequency type
Returns:
the over sampling rate

getFrequency

public static final double getFrequency(FrequencyTypes fType)
Getter for the frequency in Hz.

Parameters:
fType - the frequency type
Returns:
the frequency

getNyquistFrequency

public static double getNyquistFrequency(FrequencyTypes fType)
Parameters:
fType - the frequency type
Returns:
the nyquist frequency for this freqeuncy type