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.
26class SerializationGPSTracker;
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 */
61 static inline DeviceType deviceTypeSerializationGPSTracker();
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
This class is the base class for all gps tracker objects.
Definition GPSTracker.h:39
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 device factory for the Serialization library.
Definition SerializationFactory.h:29
This class implements a Serialization GPS tracker.
Definition SerializationGPSTracker.h:42
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.
~SerializationGPSTracker() override
Destructs a Serialization GPS tracker object.
This class implements a Serialization tracker.
Definition SerializationTracker.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
ReferenceSystem
Definition of different tracking reference system.
Definition devices/Tracker.h:74
This class implements a timestamp.
Definition Timestamp.h:63
The namespace covering the entire Ocean framework.
Definition Accessor.h:15