Ocean
Loading...
Searching...
No Matches
IOSDevice.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_DEVICE_H
9#define META_OCEAN_DEVICES_IOS_IOS_DEVICE_H
10
12
14
15namespace Ocean
16{
17
18namespace Devices
19{
20
21namespace IOS
22{
23
24/**
25 * This class implements a device for the IOS library.
26 * @ingroup devicesios
27 */
28class OCEAN_DEVICES_IOS_EXPORT IOSDevice : virtual public Device
29{
30 public:
31
32 /**
33 * Returns the name of the owner library.
34 * @see Device::library().
35 */
36 virtual const std::string& library() const;
37
38 protected:
39
40 /**
41 * Creates a new device by is name.
42 * @param name The name of the device
43 * @param type Major and minor device type of the device
44 */
45 IOSDevice(const std::string& name, const DeviceType type);
46
47 /**
48 * Returns the relative and unix timestamp of an Android sensor event.
49 * @param cmLogItemTimestamp The timestamp of the base class for all motion-related data objects, in seconds since the device booted
50 * @param relativeTimestamp The resulting relative timestamp
51 * @return The resulting unix timestamp
52 */
53 Timestamp convertTimestamp(const double cmLogItemTimestamp, Timestamp& relativeTimestamp);
54
55 /**
56 * Returns the timestamp converter for all android sensors.
57 * @return The timestamp converter
58 */
60
61 protected:
62
63 /// True, if this sensor is started.
64 bool isStarted_ = false;
65
66 /// The timestamp converter of this sensor.
68};
69
70}
71
72}
73
74}
75
76#endif // META_OCEAN_DEVICES_IOS_IOS_DEVICE_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 device for the IOS library.
Definition IOSDevice.h:29
static Timestamp::TimestampConverter & timestampConverter()
Returns the timestamp converter for all android sensors.
Timestamp convertTimestamp(const double cmLogItemTimestamp, Timestamp &relativeTimestamp)
Returns the relative and unix timestamp of an Android sensor event.
Timestamp::TimestampConverter & timestampConverter_
The timestamp converter of this sensor.
Definition IOSDevice.h:67
virtual const std::string & library() const
Returns the name of the owner library.
IOSDevice(const std::string &name, const DeviceType type)
Creates a new device by is name.
This class is a helper class allowing to converter timestamps defined in a specific time domain to un...
Definition Timestamp.h:67
This class implements a timestamp.
Definition Timestamp.h:51
The namespace covering the entire Ocean framework.
Definition Accessor.h:15