|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectde.unikassel.android.sdcframework.devices.SampleFactory
public class SampleFactory
A factory to create samples from Android specific types ( implemented as singleton ).
| Field Summary | |
|---|---|
private static SampleFactory |
instance
The global singleton instance |
private LocationTracker |
locationTracker
The location tracker |
| Constructor Summary | |
|---|---|
private |
SampleFactory()
Constructor |
| Method Summary | |
|---|---|
String |
bluetoothClassToHumanReadableInformation(BluetoothClass bluetoothClass)
Does translate Android BluetoothClass in a human readable form |
BluetoothSampleData |
createBluetoothSampleData(BluetoothDevice bluetoothDevice,
Short rssi)
Method to create an bluetooth sample from an BluetoothDevice |
Sample |
createSample(TimeInformation timeInfo,
SensorDeviceIdentifier id,
int priority,
SampleData data)
Method to create a sample from available information |
WifiSampleData |
createWifiSampleData(ScanResult scanResult,
boolean isConnected)
Method to create a wifi sample from a ScanResult |
void |
enableLocationTracking(boolean enable)
Method to enable location tracking |
static SampleFactory |
getInstance()
Getter for the global singleton instance |
LocationTracker |
getLocationTracker()
Getter for the locationTracker |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final LocationTracker locationTracker
private static SampleFactory instance
| Constructor Detail |
|---|
private SampleFactory()
| Method Detail |
|---|
public LocationTracker getLocationTracker()
public static SampleFactory getInstance()
public void enableLocationTracking(boolean enable)
enable - flag for enabled state of location tracking
public Sample createSample(TimeInformation timeInfo,
SensorDeviceIdentifier id,
int priority,
SampleData data)
timeInfo - the sample time stamp and NTP sync stateid - the sensor device identifierpriority - the prioritydata - the sensor specific data
public WifiSampleData createWifiSampleData(ScanResult scanResult,
boolean isConnected)
scanResult - the Wifi scan result to create the sample fromisConnected - flag if it is the current Wifi connection
public BluetoothSampleData createBluetoothSampleData(BluetoothDevice bluetoothDevice,
Short rssi)
bluetoothDevice - the bluetooth devicerssi - the received signal strength indicator
public String bluetoothClassToHumanReadableInformation(BluetoothClass bluetoothClass)
bluetoothClass - the buetooth class
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||