source: flair-src/trunk/lib/FlairFilter/src/Pid.h@ 10

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

lic

File size: 2.4 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 Pid.h
7 * \brief Class defining a PID
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2011/05/01
10 * \version 4.0
11 */
12
13#ifndef PID_H
14#define PID_H
15
16#include <ControlLaw.h>
17
18namespace flair
19{
20 namespace gui
21 {
22 class LayoutPosition;
23 }
24}
25
26class Pid_impl;
27
28namespace flair
29{
30namespace filter
31{
32 /*! \class Pid
33 *
34 * \brief Class defining a PID
35 */
36 class Pid : public ControlLaw
37 {
38 friend class ::Pid_impl;
39
40 public:
41 /*!
42 * \brief Constructor
43 *
44 * Construct a PID at given position. \n
45 * The PID will automatically be child of position->getLayout() Layout. After calling this function,
46 * position will be deleted as it is no longer usefull. \n
47 *
48 * \param position position to display settings
49 * \param name name
50 */
51 Pid(const gui::LayoutPosition* position,std::string name);
52
53 /*!
54 * \brief Destructor
55 *
56 */
57 ~Pid();
58
59 /*!
60 * \brief Reset integral
61 *
62 */
63 void Reset(void);
64
65 /*!
66 * \brief Set input values
67 *
68 * \param p proportional value
69 * \param d derivative value
70 */
71 void SetValues(float p,float d);
72
73 /*!
74 * \brief Use default plot
75 *
76 * Plot the output values at position. \n
77 * Plot consists of 4 curves: proportional part,
78 * derivative part, integral part and
79 * the sum of the three. \n
80 * After calling this function, position will be deleted as it is no longer usefull. \n
81 *
82 * \param position position to display plot
83 */
84 void UseDefaultPlot(const gui::LayoutPosition* position);
85
86 private:
87 /*!
88 * \brief Update using provided datas
89 *
90 * Reimplemented from IODevice.
91 *
92 * \param data data from the parent to process
93 */
94 void UpdateFrom(const core::io_data *data);
95
96 Pid_impl* pimpl_;
97 };
98} // end namespace filter
99} // end namespace flair
100#endif // PID_H
Note: See TracBrowser for help on using the repository browser.