de.unikassel.android.sdcframework.devices
Class GyroscopeDevice

Package class diagram package GyroscopeDevice
java.lang.Object
  extended by de.unikassel.android.sdcframework.devices.AbstractSensorDevice
      extended by de.unikassel.android.sdcframework.devices.ScannerStateAwareSensorDevice
          extended by de.unikassel.android.sdcframework.devices.AbstractAndroidSensorDevice
              extended by de.unikassel.android.sdcframework.devices.GyroscopeDevice
All Implemented Interfaces:
SampleProvidingSensorDevice, SensorDevice, VisitableDevice

public class GyroscopeDevice
extends AbstractAndroidSensorDevice

Implementation of the gyroscope sensor device.


Field Summary
private  GyroscopeSampleData currentSampleData
          The actual sample of the device, updated whenever the handler for sensor changes is called
 
Constructor Summary
GyroscopeDevice(Context context)
          Constructor
 
Method Summary
 void doHandleSensorChanged(SensorEvent event)
          Handler for the sensor changed event ( with incoming updated sensor data )
protected  SampleData getCurrentSampleData()
          Getter for the current sample data
 boolean hasSample()
          Test method for a sample available
 
Methods inherited from class de.unikassel.android.sdcframework.devices.AbstractAndroidSensorDevice
doHandleSensorAccuracyChanged, doSignalDeviceNotEnabledInSystem, getListener, getSample, getSensor, isDeviceInSystemEnabled, onScannerRunningStateChange
 
Methods inherited from class de.unikassel.android.sdcframework.devices.ScannerStateAwareSensorDevice
enableDeviceScanning, onConfigurationChanged
 
Methods inherited from class de.unikassel.android.sdcframework.devices.AbstractSensorDevice
accept, doHandleDeviceDisabledBySystem, doHandleDeviceEnabledBySystem, getConfiguration, getDeviceIdentifier, getScanner, isAirplaneModeOn, isDeviceScanningEnabled, onCreate, onDestroy, setDeviceIdentifier, setScanner, updateConfiguration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentSampleData

private final GyroscopeSampleData currentSampleData
The actual sample of the device, updated whenever the handler for sensor changes is called

Constructor Detail

GyroscopeDevice

public GyroscopeDevice(Context context)
Constructor

Parameters:
context - the context
Method Detail

getCurrentSampleData

protected final SampleData getCurrentSampleData()
Description copied from class: AbstractAndroidSensorDevice
Getter for the current sample data

Specified by:
getCurrentSampleData in class AbstractAndroidSensorDevice
Returns:
the current sample data

doHandleSensorChanged

public final void doHandleSensorChanged(SensorEvent event)
Description copied from class: AbstractAndroidSensorDevice
Handler for the sensor changed event ( with incoming updated sensor data )

Specified by:
doHandleSensorChanged in class AbstractAndroidSensorDevice
Parameters:
event - the sensor event to handle

hasSample

public final boolean hasSample()
Description copied from interface: SampleProvidingSensorDevice
Test method for a sample available

Returns:
true if a sample is available