8#ifndef META_OCEAN_DEVICES_ANDROID_ANDROID_FACTORY_H
9#define META_OCEAN_DEVICES_ANDROID_ANDROID_FACTORY_H
15#include <android/sensor.h>
84 static void newGPSLocation(
const double latitude,
const double longitude,
const float altitude,
const float direction,
const float speed,
const float accuracy,
const float altitudeAccuracy,
const float directionAccuracy,
const float speedAccuracy,
const Timestamp& timestamp);
static void newGPSLocation(const double latitude, const double longitude, const float altitude, const float direction, const float speed, const float accuracy, const float altitudeAccuracy, const float directionAccuracy, const float speedAccuracy, const Timestamp ×tamp)
Sends a new GPS location to the tracker which is managed by this factory.
static bool unregisterFactory()
Unregisters this factory at the manger.
Device * createAndroidGyroRawSensor3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF raw gyro sensor.
Device * createAndroidOrientationTracker3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF orientation tracker.
Device * createAndroidAccelerationSensor3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF acceleration sensor.
Device * createAndroidHeadingTracker3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF heading tracker.
const ASensor * sensorAccelerometer_
The accelerometer sensor.
Definition AndroidFactory.h:196
void registerDevices()
Registers all devices.
const ASensor * sensorRotationVector_
The rotation vector sensor.
Definition AndroidFactory.h:202
const ASensor * sensorGyroUnbiased_
The unbiased gyro sensor.
Definition AndroidFactory.h:211
Lock lock_
The factory's lock.
Definition AndroidFactory.h:220
static void registerCustomTimestampConverter(TimestampConverter &×tampConverter)
Registers a custom timestamp converter for all Android devices.
Device * createAndroidGPSTracker(const std::string &name, const Device::DeviceType &deviceType)
Creates a new GPS tracker.
const ASensor * sensorLinearAccelerometer_
The linear accelerometer sensor.
Definition AndroidFactory.h:199
Device * createAndroidLinearAccelerationSensor3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF linear acceleration sensor.
bool registerCustomDevice(const std::string &deviceName, const std::string &stringType, const Device::DeviceType &deviceType)
Registers a custom device which is otherwise unknown to this factory.
AndroidFactory()
Creates a new factory.
Device * createAndroidGravityTracker3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF gravity tracker.
Device * createCustomDevice(const std::string &name, const Device::DeviceType &deviceType)
static bool registerFactory()
Registers this factory at the manager.
static std::string registerCustomDevice(const std::string &stringType, const Device::DeviceType &deviceType)
Registers a custom device which is otherwise unknown to this factory.
CustomDeviceMap customDeviceMap_
The custom devices.
Definition AndroidFactory.h:217
const ASensor * sensorGameRotationVector_
The game rotation vector sensor, this sensor does not use a magnetometer to avoid issues with changin...
Definition AndroidFactory.h:205
static TimestampConverter & timestampConverter()
Returns the timestamp converter for all android devices.
const ASensor * sensorGyroRaw_
The raw gyro sensor.
Definition AndroidFactory.h:208
const ASensor * sensorGravity_
The gravity sensor.
Definition AndroidFactory.h:214
std::unordered_map< std::string, CustomDevicePair > CustomDeviceMap
Definition of an unordered map mapping names of custom devices to sensors.
Definition AndroidFactory.h:44
std::pair< Device::DeviceType, const ASensor * > CustomDevicePair
Definition of a pair combining a device type with a sensor.
Definition AndroidFactory.h:39
Device * createAndroidGyroUnbiasedSensor3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF unbiased gyro sensor.
friend class AndroidEventDevice
Definition AndroidFactory.h:32
Definition of a class holding the major and minor device type.
Definition devices/Device.h:62
This class is the base class for all devices of any type.
Definition devices/Device.h:28
virtual Device::DeviceType deviceType(const std::string &device) const
Returns the type of a specified device.
Factory(const Factory &factory)=delete
Disabled copy constructor.
const std::string & name() const
Returns the name of this factory.
Definition devices/Factory.h:235
This class implements a recursive lock object.
Definition Lock.h:31
This class is a helper class allowing to converter timestamps defined in a specific time domain to un...
Definition Timestamp.h:313
This class implements a timestamp.
Definition Timestamp.h:64
Namespace of the Devices Android library.
Definition devices/android/Android.h:20
Namespace of the Devices library.
Definition AccelerationSensor3DOF.h:24
The namespace covering the entire Ocean framework.
Definition Accessor.h:15