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 SimuPressureSensor.h
|
---|
7 | * \brief Class for a simulation PressureSensor
|
---|
8 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
9 | * \date 2018/05/24
|
---|
10 | * \version 4.0
|
---|
11 | */
|
---|
12 |
|
---|
13 | #ifndef SIMUPRESSURESENSOR_H
|
---|
14 | #define SIMUPRESSURESENSOR_H
|
---|
15 |
|
---|
16 | #include <IODevice.h>
|
---|
17 |
|
---|
18 | namespace flair {
|
---|
19 | namespace core {
|
---|
20 | class SharedMem;
|
---|
21 | }
|
---|
22 | namespace gui {
|
---|
23 | class SpinBox;
|
---|
24 | class DoubleSpinBox;
|
---|
25 | }
|
---|
26 | namespace simulator {
|
---|
27 | class Model;
|
---|
28 | }
|
---|
29 | }
|
---|
30 |
|
---|
31 | namespace flair {
|
---|
32 | namespace sensor {
|
---|
33 | /*! \class SimuPressureSensor
|
---|
34 | *
|
---|
35 | * \brief Class for a simulation PressureSensor
|
---|
36 | */
|
---|
37 | class SimuPressureSensor : public core::IODevice {
|
---|
38 | public:
|
---|
39 | /*!
|
---|
40 | * \brief Constructor
|
---|
41 | *
|
---|
42 | * Construct a SimuPressureSensor
|
---|
43 | *
|
---|
44 | * \param parent parent
|
---|
45 | * \param name name
|
---|
46 | * \param modelId Model id
|
---|
47 | * \param deviceId PressureSensor id of the Model
|
---|
48 | */
|
---|
49 | SimuPressureSensor(const simulator::Model *parent, std::string name, uint32_t modelId,uint32_t deviceId);
|
---|
50 |
|
---|
51 | /*!
|
---|
52 | * \brief Destructor
|
---|
53 | *
|
---|
54 | */
|
---|
55 | ~SimuPressureSensor();
|
---|
56 |
|
---|
57 | protected:
|
---|
58 | /*!
|
---|
59 | * \brief SharedMem to access datas
|
---|
60 | *
|
---|
61 | */
|
---|
62 | core::SharedMem *shmem;
|
---|
63 |
|
---|
64 | private:
|
---|
65 | /*!
|
---|
66 | * \brief Update using provided datas
|
---|
67 | *
|
---|
68 | * Reimplemented from IODevice.
|
---|
69 | *
|
---|
70 | * \param data data from the parent to process
|
---|
71 | */
|
---|
72 | void UpdateFrom(const core::io_data *data);
|
---|
73 |
|
---|
74 | std::string ShMemName(uint32_t modelId,uint32_t deviceId);
|
---|
75 | gui::SpinBox *data_rate;
|
---|
76 | gui::DoubleSpinBox *seaPressure;
|
---|
77 | };
|
---|
78 | } // end namespace sensor
|
---|
79 | } // end namespace flair
|
---|
80 | #endif // SIMUPRESSURESENSOR_H
|
---|