source: flair-src/trunk/lib/FlairSensorActuator/src/SimulatedPressureSensor.h@ 345

Last change on this file since 345 was 286, checked in by Sanahuja Guillaume, 6 years ago

draw vrpn axis in simulator

File size: 1.7 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 SimulatedPressureSensor.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 SIMULATEDPRESSURESENSOR_H
14#define SIMULATEDPRESSURESENSOR_H
15
16#include <PressureSensor.h>
17#include <Thread.h>
18
19namespace flair {
20namespace core {
21class SharedMem;
22}
23namespace gui {
24class SpinBox;
25}
26}
27
28namespace flair {
29namespace sensor {
30/*! \class SimulatedPressureSensor
31*
32* \brief Class for a simulation PressureSensor
33*/
34class SimulatedPressureSensor : public core::Thread, public PressureSensor {
35public:
36 /*!
37 * \brief Constructor
38 *
39 * Construct a SimulatedPressureSensor.
40 * It will be child of the FrameworkManager.
41 *
42 * \param name name
43 * \param modelId Model id
44 * \param deviceId PressureSensor id of the Model
45 * \param priority priority of the Thread
46 */
47 SimulatedPressureSensor(std::string name,
48 uint32_t modelId,uint32_t deviceId, uint8_t priority);
49
50 /*!
51 * \brief Destructor
52 *
53 */
54 ~SimulatedPressureSensor();
55
56protected:
57 /*!
58 * \brief SharedMem to access datas
59 *
60 */
61 core::SharedMem *shmem;
62
63private:
64 /*!
65 * \brief Update using provided datas
66 *
67 * Reimplemented from IODevice.
68 *
69 * \param data data from the parent to process
70 */
71 void UpdateFrom(const core::io_data *data){};
72
73 /*!
74 * \brief Run function
75 *
76 * Reimplemented from Thread.
77 *
78 */
79 void Run(void);
80
81 std::string ShMemName(uint32_t modelId,uint32_t deviceId);
82 gui::SpinBox *data_rate;
83};
84} // end namespace sensor
85} // end namespace flair
86#endif // SIMULATEDPRESSURESENSOR_H
Note: See TracBrowser for help on using the repository browser.