Ocean
Loading...
Searching...
No Matches
SerializationGyroSensor3DOF.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_SERIALIZATION_SERIALIZATION_GYRO_SENSOR_3DOF_H
9#define META_OCEAN_DEVICES_SERIALIZATION_SERIALIZATION_GYRO_SENSOR_3DOF_H
10
13
15
16namespace Ocean
17{
18
19namespace Devices
20{
21
22namespace Serialization
23{
24
25// Forward declaration.
26class SerializationGyroSensor3DOF;
27
28/**
29 * Definition of a smart object reference for a Serialization 3DOF gyro sensor.
30 * @see SerializationGyroSensor3DOF.
31 * @ingroup devicesserialization
32 */
34
35/**
36 * This class implements a Serialization 3DOF gyro sensor.
37 * @ingroup devicesserialization
38 */
39class OCEAN_DEVICES_SERIALIZATION_EXPORT SerializationGyroSensor3DOF :
40 virtual public GyroSensor3DOF,
41 virtual public SerializationSensor
42{
45
46 public:
47
48 /**
49 * Forwards sample events.
50 * @param measurements The gyro measurements to forward
51 * @param timestamp The timestamp of the event
52 * @param metadata Optional metadata of the sample
53 */
54 void forwardSampleEvent(Gyro3DOFSample::Measurements&& measurements, const Timestamp& timestamp, Metadata&& metadata);
55
56 /**
57 * Returns the type of this sensor.
58 * @param sensorType The sensor type
59 * @return Sensor type
60 */
61 static inline DeviceType deviceTypeSerializationGyroSensor3DOF(const SensorType sensorType);
62
63 protected:
64
65 /**
66 * Creates a new Serialization 3DOF gyro sensor object.
67 * @param name The name of the sensor
68 * @param sensorType The sensor type
69 */
70 SerializationGyroSensor3DOF(const std::string& name, const SensorType sensorType);
71
72 /**
73 * Destructs a Serialization 3DOF gyro sensor object.
74 */
76};
77
82
83}
84
85}
86
87}
88
89#endif // META_OCEAN_DEVICES_SERIALIZATION_SERIALIZATION_GYRO_SENSOR_3DOF_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 3DOF gyro sensors.
Definition GyroSensor3DOF.h:41
static DeviceType deviceTypeGyroSensor3DOF(const SensorType sensorType)
Returns this device type.
Definition GyroSensor3DOF.h:117
std::unordered_map< std::string, Value > Metadata
Definition of an unordered map mapping keys to values.
Definition Measurement.h:62
SensorType
Definition of different sensor types.
Definition Sensor.h:43
This class implements a device factory for the Serialization library.
Definition SerializationFactory.h:29
This class implements a Serialization 3DOF gyro sensor.
Definition SerializationGyroSensor3DOF.h:42
void forwardSampleEvent(Gyro3DOFSample::Measurements &&measurements, const Timestamp &timestamp, Metadata &&metadata)
Forwards sample events.
~SerializationGyroSensor3DOF() override
Destructs a Serialization 3DOF gyro sensor object.
SerializationGyroSensor3DOF(const std::string &name, const SensorType sensorType)
Creates a new Serialization 3DOF gyro sensor object.
static DeviceType deviceTypeSerializationGyroSensor3DOF(const SensorType sensorType)
Returns the type of this sensor.
Definition SerializationGyroSensor3DOF.h:78
This class implements a Serialization sensor.
Definition SerializationSensor.h:39
This class implements a player for device objects based on Ocean's DataSerializer.
Definition SerializerDevicePlayer.h:45
This class implements a smart device reference.
Definition DeviceRef.h:36
This class implements a timestamp.
Definition Timestamp.h:63
The namespace covering the entire Ocean framework.
Definition Accessor.h:15