Ocean
|
This class is the base class for all devices of any type. More...
Data Structures | |
class | DeviceType |
Definition of a class holding the major and minor device type. More... | |
Public Types | |
enum | MajorType : uint32_t { DEVICE_INVALID = 0u , DEVICE_MEASUREMENT = (1u << 0u) , DEVICE_SENSOR = (1u << 1u) | DEVICE_MEASUREMENT , DEVICE_TRACKER = (1u << 2u) | DEVICE_MEASUREMENT } |
Definition of all major device types. More... | |
enum | MinorType : uint32_t { MINOR_INVALID = 0u } |
Base definition of a minor type. More... | |
Public Member Functions | |
const std::string & | name () const |
Returns the name of this device. More... | |
virtual const std::string & | library () const =0 |
Returns the name of the owner library. More... | |
virtual bool | isStarted () const |
Returns whether this device is active. More... | |
bool | isValid () const |
Returns whether this device is valid. More... | |
bool | isExclusive () const |
Returns whether this device can be use exclusively. More... | |
virtual bool | start () |
Starts the device. More... | |
virtual bool | pause () |
Pauses the device. More... | |
virtual bool | stop () |
Stops the device. More... | |
virtual bool | setParameter (const std::string ¶meter, const Value &value) |
Sets an abstract parameter of this device. More... | |
virtual bool | parameter (const std::string ¶meter, Value &value) |
Returns an abstract parameter of this device. More... | |
DeviceType | type () const |
Returns the major and minor type of this device. More... | |
Static Public Member Functions | |
static std::string | translateMajorType (const MajorType majorType) |
Translates the major devices type to a readable string. More... | |
static MajorType | translateMajorType (const std::string &majorType) |
Translates the major devices type from a readable string to a value. More... | |
Protected Types | |
typedef unsigned int | SubscriptionId |
Definition of a subscription id for event callbacks. More... | |
Protected Member Functions | |
Device (const Device &device)=delete | |
Disabled copy constructor. More... | |
Device (const std::string &name, const DeviceType type) | |
Creates a new device by is name. More... | |
virtual | ~Device () |
Destructs a device. More... | |
Device & | operator= (const Device &device)=delete |
Disabled copy operator. More... | |
Static Protected Member Functions | |
static constexpr SubscriptionId | invalidSubscriptionId () |
Returns an invalid subscription id. More... | |
Protected Attributes | |
std::string | deviceName |
Name of this device. More... | |
DeviceType | deviceType |
Major and minor type of this device. More... | |
bool | deviceIsValid |
Flag determining whether this device is valid. More... | |
Lock | deviceLock |
Device lock. More... | |
Friends | |
class | Factory |
class | Ocean::ObjectRef< Device > |
This class is the base class for all devices of any type.
|
protected |
Definition of a subscription id for event callbacks.
enum Ocean::Devices::Device::MajorType : uint32_t |
Definition of all major device types.
Enumerator | |
---|---|
DEVICE_INVALID | Invalid major type. |
DEVICE_MEASUREMENT | Measurement device. |
DEVICE_SENSOR | Sensor device. |
DEVICE_TRACKER | Tracker device. |
enum Ocean::Devices::Device::MinorType : uint32_t |
|
protecteddelete |
Disabled copy constructor.
device | Object which would be copied |
|
protected |
Creates a new device by is name.
name | The name of the device |
type | Major and minor device type of the device |
|
protectedvirtual |
Destructs a device.
|
staticconstexprprotected |
Returns an invalid subscription id.
bool Ocean::Devices::Device::isExclusive | ( | ) | const |
Returns whether this device can be use exclusively.
|
virtual |
Returns whether this device is active.
Reimplemented in Ocean::Devices::SLAM::SLAMTracker6DOF, Ocean::Devices::RMV::RMVTracker6DOF, Ocean::Devices::Pattern::StaticPatternTracker6DOF, Ocean::Devices::Pattern::PatternTracker6DOF, Ocean::Devices::MapBuilding::OnDeviceRelocalizerTracker6DOF, and Ocean::Devices::MapBuilding::OnDeviceMapCreatorTracker6DOF.
|
inline |
Returns whether this device is valid.
|
pure virtual |
Returns the name of the owner library.
Implemented in Ocean::Devices::MapBuilding::MapBuildingDevice, Ocean::Devices::ARKit::AKRoomPlanTracker6DOF, Ocean::Devices::ARKit::AKDevice, Ocean::Devices::ARCore::ACDevice, Ocean::Devices::Android::AndroidDevice, Ocean::Devices::SLAM::SLAMDevice, Ocean::Devices::RMV::RMVDevice, Ocean::Devices::Pattern::PatternDevice, and Ocean::Devices::IOS::IOSDevice.
|
inline |
Returns the name of this device.
Disabled copy operator.
device | Object which would be copied |
|
virtual |
Returns an abstract parameter of this device.
parameter | Name of the parameter to return the value for |
value | Resulting value |
Reimplemented in Ocean::Devices::Pattern::PatternTracker6DOF.
|
virtual |
Pauses the device.
Reimplemented in Ocean::Devices::IOS::IOSOrientationTracker3DOF, Ocean::Devices::IOS::IOSHeadingTracker3DOF, Ocean::Devices::IOS::IOSGravityTracker3DOF, Ocean::Devices::IOS::IOSGPSTracker, Ocean::Devices::ARKit::AKWorldTracker6DOF, Ocean::Devices::ARKit::AKSceneTracker6DOF, Ocean::Devices::ARKit::AKRoomPlanTracker6DOF, Ocean::Devices::ARKit::AKPlaneTracker6DOF, Ocean::Devices::ARKit::AKGeoAnchorsTracker6DOF, Ocean::Devices::ARKit::AKFaceTracker6DOF, Ocean::Devices::ARKit::AKDepthTracker6DOF, Ocean::Devices::ARCore::ACDevice, Ocean::Devices::Android::AndroidSensor, Ocean::Devices::IOS::IOSGyroSensor3DOF, and Ocean::Devices::IOS::IOSAccelerationSensor3DOF.
|
virtual |
Sets an abstract parameter of this device.
parameter | Name of the parameter to set |
value | Abstract value to be set |
Reimplemented in Ocean::Devices::Pattern::PatternTracker6DOF.
|
virtual |
Starts the device.
Reimplemented in Ocean::Devices::SLAM::SLAMTracker6DOF, Ocean::Devices::RMV::RMVTracker6DOF, Ocean::Devices::Pattern::StaticPatternTracker6DOF, Ocean::Devices::Pattern::PatternTracker6DOF, Ocean::Devices::MapBuilding::OnDeviceRelocalizerTracker6DOF, Ocean::Devices::MapBuilding::OnDeviceMapCreatorTracker6DOF, Ocean::Devices::IOS::IOSOrientationTracker3DOF, Ocean::Devices::IOS::IOSHeadingTracker3DOF, Ocean::Devices::IOS::IOSGravityTracker3DOF, Ocean::Devices::IOS::IOSGPSTracker, Ocean::Devices::ARKit::AKWorldTracker6DOF, Ocean::Devices::ARKit::AKSceneTracker6DOF, Ocean::Devices::ARKit::AKRoomPlanTracker6DOF, Ocean::Devices::ARKit::AKPlaneTracker6DOF, Ocean::Devices::ARKit::AKGeoAnchorsTracker6DOF, Ocean::Devices::ARKit::AKFaceTracker6DOF, Ocean::Devices::ARKit::AKDepthTracker6DOF, Ocean::Devices::ARCore::ACDevice, Ocean::Devices::Android::AndroidSensor, Ocean::Devices::IOS::IOSGyroSensor3DOF, and Ocean::Devices::IOS::IOSAccelerationSensor3DOF.
|
virtual |
Stops the device.
Reimplemented in Ocean::Devices::SLAM::SLAMTracker6DOF, Ocean::Devices::RMV::RMVTracker6DOF, Ocean::Devices::Pattern::StaticPatternTracker6DOF, Ocean::Devices::Pattern::PatternTracker6DOF, Ocean::Devices::MapBuilding::OnDeviceRelocalizerTracker6DOF, Ocean::Devices::MapBuilding::OnDeviceMapCreatorTracker6DOF, Ocean::Devices::IOS::IOSOrientationTracker3DOF, Ocean::Devices::IOS::IOSHeadingTracker3DOF, Ocean::Devices::IOS::IOSGravityTracker3DOF, Ocean::Devices::IOS::IOSGPSTracker, Ocean::Devices::ARKit::AKWorldTracker6DOF, Ocean::Devices::ARKit::AKSceneTracker6DOF, Ocean::Devices::ARKit::AKRoomPlanTracker6DOF, Ocean::Devices::ARKit::AKPlaneTracker6DOF, Ocean::Devices::ARKit::AKGeoAnchorsTracker6DOF, Ocean::Devices::ARKit::AKFaceTracker6DOF, Ocean::Devices::ARKit::AKDepthTracker6DOF, Ocean::Devices::ARCore::ACDevice, Ocean::Devices::Android::AndroidSensor, Ocean::Devices::IOS::IOSGyroSensor3DOF, and Ocean::Devices::IOS::IOSAccelerationSensor3DOF.
|
static |
Translates the major devices type to a readable string.
majorType | The major device type to translate |
|
static |
Translates the major devices type from a readable string to a value.
majorType | The major device type to translate |
|
inline |
Returns the major and minor type of this device.
|
friend |
|
friend |
|
protected |
Flag determining whether this device is valid.
|
protected |
Name of this device.
|
protected |
Major and minor type of this device.