Ocean
Loading...
Searching...
No Matches
IOSFactory.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_DEVICES_IOS_IOS_FACTORY_H
9#define META_OCEAN_DEVICES_IOS_IOS_FACTORY_H
10
12
14
15namespace Ocean
16{
17
18namespace Devices
19{
20
21namespace IOS
22{
23
24/**
25 * This class implements a device factory for the IOS feature based tracking system.
26 * @ingroup devicesios
27 */
28class OCEAN_DEVICES_IOS_EXPORT IOSFactory : public Factory
29{
30 public:
31
32 /**
33 * Registers this factory at the manager.
34 * Beware: Unregister this factory if not needed anymore.
35 * @return True, if this factory hasn't been registered before
36 */
37 static bool registerFactory();
38
39 /**
40 * Unregisters this factory at the manger.
41 * This unregistration should be done after all created devices have been released.
42 * @return True, if this factory chould be unregistered
43 */
44 static bool unregisterFactory();
45
46 private:
47
48 /**
49 * Creates a new factory.
50 */
52
53 /**
54 * Registers all devices.
55 */
57
58 /**
59 * Creates a new 3DOF acceleration sensor.
60 * The caller is responsible to release the sensor.
61 * @param name The name of the new device, must be valid
62 * @param deviceType The device type of the device, must be valid
63 * @return The new sensor, nullptr if the sensor could not be created
64 */
65 static Device* createIOSAccelerationSensor3DOF(const std::string& name, const Device::DeviceType& deviceType);
66
67 /**
68 * Creates a new 3DOF linear acceleration sensor.
69 * The caller is responsible to release the sensor.
70 * @param name The name of the new device, must be valid
71 * @param deviceType The device type of the device, must be valid
72 * @return The new sensor, nullptr if the sensor could not be created
73 */
74 static Device* createIOSLinearAccelerationSensor3DOF(const std::string& name, const Device::DeviceType& deviceType);
75
76 /**
77 * Creates a new 3DOF orientation tracker.
78 * The caller is responsible to release the sensor.
79 * @param name The name of the new device, must be valid
80 * @param deviceType The device type of the device, must be valid
81 * @return The new tracker, nullptr if the sensor could not be created
82 */
83 static Device* createIOSOrientationTracker3DOF(const std::string& name, const Device::DeviceType& deviceType);
84
85 /**
86 * Creates a new 3DOF raw gyro sensor.
87 * The caller is responsible to release the sensor.
88 * @param name The name of the new device, must be valid
89 * @param deviceType The device type of the device, must be valid
90 * @return The new sensor, nullptr if the sensor could not be created
91 */
92 static Device* createIOSGyroRawSensor3DOF(const std::string& name, const Device::DeviceType& deviceType);
93
94 /**
95 * Creates a new 3DOF unbiased gyro sensor.
96 * The caller is responsible to release the sensor.
97 * @param name The name of the new device, must be valid
98 * @param deviceType The device type of the device, must be valid
99 * @return The new sensor, nullptr if the sensor could not be created
100 */
101 static Device* createIOSGyroUnbiasedSensor3DOF(const std::string& name, const Device::DeviceType& deviceType);
102
103 /**
104 * Creates a new GPS tracker.
105 * The caller is responsible to release the sensor.
106 * @param name The name of the new device, must be valid
107 * @param deviceType The device type of the device, must be valid
108 * @return The new tracker, nullptr if the tracker could not be created
109 */
110 static Device* createIOSGPSTracker(const std::string& name, const Device::DeviceType& deviceType);
111
112 /**
113 * Creates a new Gravity tracker.
114 * The caller is responsible to release the sensor.
115 * @param name The name of the new device, must be valid
116 * @param deviceType The device type of the device, must be valid
117 * @return The new tracker, nullptr if the tracker could not be created
118 */
119 static Device* createIOSGravityTracker3DOF(const std::string& name, const Device::DeviceType& deviceType);
120
121 /**
122 * Creates a new Heading tracker.
123 * The caller is responsible to release the sensor.
124 * @param name The name of the new device, must be valid
125 * @param deviceType The device type of the device, must be valid
126 * @return The new tracker, nullptr if the tracker could not be created
127 */
128 static Device* createIOSHeadingTracker3DOF(const std::string& name, const Device::DeviceType& deviceType);
129};
130
131}
132
133}
134
135}
136
137#endif // META_OCEAN_DEVICES_IOS_IOS_FACTORY_H
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
This class implements a factory able to create instances of devices.
Definition devices/Factory.h:28
This class implements a device factory for the IOS feature based tracking system.
Definition IOSFactory.h:29
static Device * createIOSOrientationTracker3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF orientation tracker.
static bool unregisterFactory()
Unregisters this factory at the manger.
IOSFactory()
Creates a new factory.
static Device * createIOSGPSTracker(const std::string &name, const Device::DeviceType &deviceType)
Creates a new GPS tracker.
static Device * createIOSGyroUnbiasedSensor3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF unbiased gyro sensor.
static Device * createIOSLinearAccelerationSensor3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF linear acceleration sensor.
void registerDevices()
Registers all devices.
static Device * createIOSGyroRawSensor3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF raw gyro sensor.
static Device * createIOSGravityTracker3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new Gravity tracker.
static bool registerFactory()
Registers this factory at the manager.
static Device * createIOSAccelerationSensor3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new 3DOF acceleration sensor.
static Device * createIOSHeadingTracker3DOF(const std::string &name, const Device::DeviceType &deviceType)
Creates a new Heading tracker.
The namespace covering the entire Ocean framework.
Definition Accessor.h:15