de.unikassel.android.sdcframework.devices
Class MagneticFieldDevice
java.lang.Object
de.unikassel.android.sdcframework.devices.AbstractSensorDevice
de.unikassel.android.sdcframework.devices.ScannerStateAwareSensorDevice
de.unikassel.android.sdcframework.devices.AbstractAndroidSensorDevice
de.unikassel.android.sdcframework.devices.MagneticFieldDevice
- All Implemented Interfaces:
- SampleProvidingSensorDevice, SensorDevice, VisitableDevice
public class MagneticFieldDevice
- extends AbstractAndroidSensorDevice
Implementation of the magnetic field sensor device.
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 |
currentSampleData
private final MagneticFieldSampleData currentSampleData
- The actual sample of the device, updated whenever the handler for sensor
changes is called
MagneticFieldDevice
public MagneticFieldDevice(Context context)
- Constructor
- Parameters:
context
- the context
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