Ocean
Ocean::Devices::Android::AndroidDevice Class Reference

This class implements a device for the Android library. More...

Inheritance diagram for Ocean::Devices::Android::AndroidDevice:

Public Member Functions

const std::string & library () const override
 Returns the name of the owner library. More...
 
- Public Member Functions inherited from Ocean::Devices::Device
const std::string & name () const
 Returns the name of this device. 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 &parameter, const Value &value)
 Sets an abstract parameter of this device. More...
 
virtual bool parameter (const std::string &parameter, Value &value)
 Returns an abstract parameter of this device. More...
 
DeviceType type () const
 Returns the major and minor type of this device. More...
 

Protected Member Functions

 AndroidDevice (const std::string &name, const DeviceType type)
 Creates a new device by is name. More...
 
- Protected Member Functions inherited from Ocean::Devices::Device
 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...
 
Deviceoperator= (const Device &device)=delete
 Disabled copy operator. More...
 

Additional Inherited Members

- Public Types inherited from Ocean::Devices::Device
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...
 
- Static Public Member Functions inherited from Ocean::Devices::Device
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 inherited from Ocean::Devices::Device
typedef unsigned int SubscriptionId
 Definition of a subscription id for event callbacks. More...
 
- Static Protected Member Functions inherited from Ocean::Devices::Device
static constexpr SubscriptionId invalidSubscriptionId ()
 Returns an invalid subscription id. More...
 
- Protected Attributes inherited from Ocean::Devices::Device
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...
 

Detailed Description

This class implements a device for the Android library.

Constructor & Destructor Documentation

◆ AndroidDevice()

Ocean::Devices::Android::AndroidDevice::AndroidDevice ( const std::string &  name,
const DeviceType  type 
)
protected

Creates a new device by is name.

Parameters
nameThe name of the device
typeMajor and minor device type of the device

Member Function Documentation

◆ library()

const std::string& Ocean::Devices::Android::AndroidDevice::library ( ) const
overridevirtual

Returns the name of the owner library.

See also
Device::library().

Implements Ocean::Devices::Device.


The documentation for this class was generated from the following file: