Ocean
Loading...
Searching...
No Matches
SerializationAccelerationSensor3DOF.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_ACCELERATION_SENSOR_3DOF_H
9#define META_OCEAN_DEVICES_SERIALIZATION_SERIALIZATION_ACCELERATION_SENSOR_3DOF_H
10
13
15
16namespace Ocean
17{
18
19namespace Devices
20{
21
22namespace Serialization
23{
24
25// Forward declaration.
26class SerializationAccelerationSensor3DOF;
27
28/**
29 * Definition of a smart object reference for a Serialization 3DOF acceleration sensor.
30 * @see SerializationAccelerationSensor3DOF.
31 * @ingroup devicesserialization
32 */
34
35/**
36 * This class implements a Serialization 3DOF acceleration sensor.
37 * @ingroup devicesserialization
38 */
39class OCEAN_DEVICES_SERIALIZATION_EXPORT SerializationAccelerationSensor3DOF :
40 virtual public AccelerationSensor3DOF,
41 virtual public SerializationSensor
42{
45
46 public:
47
48 /**
49 * Forwards sample events.
50 * @param measurements The acceleration measurements to forward
51 * @param timestamp The timestamp of the event
52 * @param metadata Optional metadata of the sample
53 */
54 void forwardSampleEvent(Acceleration3DOFSample::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 deviceTypeSerializationAccelerationSensor3DOF(const SensorType sensorType);
62
63 protected:
64
65 /**
66 * Creates a new Serialization 3DOF acceleration sensor object.
67 * @param name The name of the sensor
68 * @param sensorType The sensor type
69 */
70 SerializationAccelerationSensor3DOF(const std::string& name, const SensorType sensorType);
71
72 /**
73 * Destructs a Serialization 3DOF acceleration sensor object.
74 */
76};
77
82
83}
84
85}
86
87}
88
89#endif // META_OCEAN_DEVICES_SERIALIZATION_SERIALIZATION_ACCELERATION_SENSOR_3DOF_H
This class is the base class for all 3DOF acceleration sensors.
Definition AccelerationSensor3DOF.h:41
static DeviceType deviceTypeAccelerationSensor3DOF(const SensorType sensorType)
Returns this device type.
Definition AccelerationSensor3DOF.h:119
Definition of a class holding the major and minor device type.
Definition devices/Device.h:62
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 Serialization 3DOF acceleration sensor.
Definition SerializationAccelerationSensor3DOF.h:42
static DeviceType deviceTypeSerializationAccelerationSensor3DOF(const SensorType sensorType)
Returns the type of this sensor.
Definition SerializationAccelerationSensor3DOF.h:78
SerializationAccelerationSensor3DOF(const std::string &name, const SensorType sensorType)
Creates a new Serialization 3DOF acceleration sensor object.
void forwardSampleEvent(Acceleration3DOFSample::Measurements &&measurements, const Timestamp &timestamp, Metadata &&metadata)
Forwards sample events.
~SerializationAccelerationSensor3DOF() override
Destructs a Serialization 3DOF acceleration sensor object.
This class implements a device factory for the Serialization library.
Definition SerializationFactory.h:29
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