source: flair-src/branches/mavlink/lib/FlairCore/src/GpsData.h@ 57

Last change on this file since 57 was 42, checked in by Sanahuja Guillaume, 8 years ago

m

File size: 2.0 KB
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5/*!
6 * \file GpsData.h
7 * \brief Class defining gps datas
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2016/07/01
10 * \version 4.0
11 */
12#ifndef GPSDATA_H
13#define GPSDATA_H
14
15#include <io_data.h>
16#include <IODataElement.h>
17#include <Vector3D.h>
18
19namespace flair {
20namespace core {
21
22/*! \class GpsData
23*
24* \brief Class defining gps datas
25*
26* GPS datas consist of
27*
28*
29*/
30class GpsData : public io_data {
31public:
32 class Type : public DataType {
33 public:
34 Type(ScalarType const &_elementDataType)
35 : elementDataType(_elementDataType) {}
36 ScalarType const &GetElementDataType() const { return elementDataType; }
37 std::string GetDescription() const { return "gps data"; }
38 size_t GetSize() const {
39 return 0;
40 }
41
42 private:
43 ScalarType const &elementDataType;
44 };
45
46 /*!
47 \enum PlotableData_t
48 \brief Datas wich can be plotted in a DataPlot1D
49 */
50 typedef enum {
51
52 } PlotableData_t;
53
54 /*!
55 * \brief Constructor
56 *
57 * Construct an io_data representing GPS datas. \n
58 *
59 * \param parent parent
60 * \param name name
61 * \param n number of samples
62 */
63 GpsData(const Object *parent, std::string name = "", int n = 1);
64
65 /*!
66 * \brief Destructor
67 *
68 */
69 ~GpsData();
70
71 /*!
72 * \brief Element
73 *
74 * Get a pointer to a specific element. This pointer can be used for plotting.
75 *
76 * \param data_type data type
77 *
78 * \return pointer to the element
79 */
80 IODataElement *Element(PlotableData_t data_type) const;
81
82
83 Type const &GetDataType() const { return dataType; }
84
85private:
86 /*!
87 * \brief Copy datas
88 *
89 * Reimplemented from io_data. \n
90 * See io_data::CopyDatas.
91 *
92 * \param dst destination buffer
93 */
94 void CopyDatas(char *dst) const;
95
96
97
98 void Queue(char **dst, const void *src, size_t size) const;
99 Type dataType;
100};
101
102} // end namespace core
103} // end namespace flair
104
105#endif // GPSDATA_H
Note: See TracBrowser for help on using the repository browser.