Ocean
Loading...
Searching...
No Matches
SerializationGPSTracker.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_GPS_TRACKER_H
9#define META_OCEAN_DEVICES_SERIALIZATION_SERIALIZATION_GPS_TRACKER_H
10
13
15
16namespace Ocean
17{
18
19namespace Devices
20{
21
22namespace Serialization
23{
24
25// Forward declaration.
27
28/**
29 * Definition of a smart object reference for a Serialization GPS tracker.
30 * @see SerializationGPSTracker.
31 * @ingroup devicesserialization
32 */
34
35/**
36 * This class implements a Serialization GPS tracker.
37 * @ingroup devicesserialization
38 */
39class OCEAN_DEVICES_SERIALIZATION_EXPORT SerializationGPSTracker :
40 virtual public GPSTracker,
41 virtual public SerializationTracker
42{
45
46 public:
47
48 /**
49 * Forwards sample events.
50 * @param locations The GPS locations to forward
51 * @param referenceSystem The reference system of the sample
52 * @param timestamp The timestamp of the event
53 * @param metadata Optional metadata of the sample
54 */
55 void forwardSampleEvent(GPSTracker::Locations&& locations, const ReferenceSystem referenceSystem, const Timestamp& timestamp, Metadata&& metadata);
56
57 /**
58 * Returns the type of this tracker.
59 * @return Tracker type
60 */
62
63 protected:
64
65 /**
66 * Creates a new Serialization GPS tracker object.
67 * @param name The name of the tracker
68 */
69 explicit SerializationGPSTracker(const std::string& name);
70
71 /**
72 * Destructs a Serialization GPS tracker object.
73 */
75};
76
81
82}
83
84}
85
86}
87
88#endif // META_OCEAN_DEVICES_SERIALIZATION_SERIALIZATION_GPS_TRACKER_H
Definition of a class holding the major and minor device type.
Definition devices/Device.h:62
const std::string & name() const
Returns the name of this device.
Definition devices/Device.h:340
GPSTracker(const std::string &name)
Creates a new GPS tracker object.
StackHeapVector< Location, 1 > Locations
Definition of a vector holding GPS data values.
Definition GPSTracker.h:161
static DeviceType deviceTypeGPSTracker()
Returns the device type of this tracker.
Definition GPSTracker.h:362
std::unordered_map< std::string, Value > Metadata
Definition of an unordered map mapping keys to values.
Definition Measurement.h:62
This class implements a Serialization GPS tracker.
Definition SerializationGPSTracker.h:42
friend class SerializationFactory
Definition SerializationGPSTracker.h:43
static DeviceType deviceTypeSerializationGPSTracker()
Returns the type of this tracker.
Definition SerializationGPSTracker.h:77
SerializationGPSTracker(const std::string &name)
Creates a new Serialization GPS tracker object.
void forwardSampleEvent(GPSTracker::Locations &&locations, const ReferenceSystem referenceSystem, const Timestamp &timestamp, Metadata &&metadata)
Forwards sample events.
friend class SerializerDevicePlayer
Definition SerializationGPSTracker.h:44
~SerializationGPSTracker() override
Destructs a Serialization GPS tracker object.
SerializationTracker(const std::string &name, const DeviceType &type)
Creates a new tracker object.
This class implements a smart device reference.
Definition DeviceRef.h:36
ReferenceSystem
Definition of different tracking reference system.
Definition devices/Tracker.h:74
This class implements a timestamp.
Definition Timestamp.h:64
SmartDeviceRef< SerializationGPSTracker > SerializationGPSTrackerRef
Definition of a smart object reference for a Serialization GPS tracker.
Definition SerializationGPSTracker.h:33
Namespace of the Devices Serialization library.
Definition DeviceSerializer.h:32
Namespace of the Devices library.
Definition AccelerationSensor3DOF.h:24
The namespace covering the entire Ocean framework.
Definition Accessor.h:15