source: flair-src/trunk/lib/FlairIpc/src/IpcPressureSensor.h@ 433

Last change on this file since 433 was 397, checked in by Sanahuja Guillaume, 4 years ago

add ipc lib

  • Property svn:eol-style set to native
File size: 1.6 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 IpcPressureSensor.h
7 * \brief Class for an ipc PressureSensor
8 * \author Sébastien Ambroziak, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2021/03/03
10 * \version 4.0
11 */
12
13#ifndef IPCPRESSURESENSOR_H
14#define IPCPRESSURESENSOR_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
28template <typename T>
29class ShmReceiver;
30
31namespace flair {
32namespace sensor {
33/*! \class IpcPressureSensor
34*
35* \brief Class for an ipc PressureSensor
36*/
37class IpcPressureSensor : public core::Thread, public PressureSensor {
38public:
39 /*!
40 * \brief Constructor
41 *
42 * Construct an IpcPressureSensor.
43 * It will be child of the FrameworkManager.
44 *
45 * \param name name
46 * \param priority priority of the Thread
47 * \param ipc_name name of the ipc
48 * \param ipc_channel ipc channel number
49 */
50 IpcPressureSensor(std::string name,
51 uint8_t priority, const char* ipc_name, int ipc_channel);
52
53 /*!
54 * \brief Destructor
55 *
56 */
57 ~IpcPressureSensor();
58
59protected:
60 /*!
61 * \brief SharedMem to access datas
62 *
63 */
64
65private:
66 /*!
67 * \brief Update using provided datas
68 *
69 * Reimplemented from IODevice.
70 *
71 * \param data data from the parent to process
72 */
73 void UpdateFrom(const core::io_data *data){};
74
75 /*!
76 * \brief Run function
77 *
78 * Reimplemented from Thread.
79 *
80 */
81 void Run(void);
82
83 gui::SpinBox *data_rate;
84 ShmReceiver<float>* receiver;
85};
86} // end namespace sensor
87} // end namespace flair
88#endif // IPCPRESSURESENSOR_H
Note: See TracBrowser for help on using the repository browser.