source: flair-src/trunk/lib/FlairSensorActuator/src/SimuGps.h@ 151

Last change on this file since 151 was 137, checked in by Sanahuja Guillaume, 7 years ago

singleton manager

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 SimuGps.h
7 * \brief Class for a simulation GPS
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2013/08/23
10 * \version 4.0
11 */
12
13#ifndef SIMUGPS_H
14#define SIMUGPS_H
15
16#include <Thread.h>
17#include <NmeaGps.h>
18
19namespace flair {
20 namespace core {
21 class SharedMem;
22 }
23 namespace gui {
24 class SpinBox;
25 class DoubleSpinBox;
26 }
27}
28
29namespace flair {
30namespace sensor {
31/*! \class SimuGps
32*
33* \brief Class for a simulation GPS
34*/
35class SimuGps : public core::Thread, public NmeaGps {
36public:
37 /*!
38 * \brief Constructor
39 *
40 * Construct a simulation GPS. Control part.
41 * It will be child of the FrameworkManager.
42 *
43 * \param name name
44 * \param NMEAFlags NMEA sentances to enable
45 * \param deviceId device id
46 * \param priority priority of the Thread
47 */
48 SimuGps(std::string name,
49 NmeaGps::NMEAFlags_t NMEAFlags, uint32_t deviceId,uint8_t priority);
50
51 /*!
52 * \brief Constructor
53 *
54 * Construct a simulation GPS. Simulation part.\n
55 * The Thread of this class should not be run.
56 *
57 * \param parent parent
58 * \param name name
59 * \param deviceId device id
60 */
61 SimuGps(const core::IODevice *parent, std::string name, uint32_t deviceId);
62
63 /*!
64 * \brief Destructor
65 *
66 */
67 ~SimuGps();
68
69private:
70 /*!
71 * \brief Update using provided datas
72 *
73 * Reimplemented from IODevice.
74 *
75 * \param data data from the parent to process
76 */
77 void UpdateFrom(const core::io_data *data);
78
79 /*!
80 * \brief Run function
81 *
82 * Reimplemented from Thread.
83 *
84 */
85 void Run(void);
86
87 typedef struct {
88 float e;
89 float n;
90 float u;
91 float ve;
92 float vn;
93 } gps_states_t;
94
95 core::SharedMem *shmem;
96 gui::SpinBox *dataRate,*fixQuality,*numberOfSatellites;
97 gui::DoubleSpinBox *latitudeRef,*longitudeRef,*altitudeRef;
98};
99} // end namespace sensor
100} // end namespace framewor
101#endif // SIMUGPS_H
Note: See TracBrowser for help on using the repository browser.