source: flair-dev/trunk/include/FlairFilter/Pid.h@ 50

Last change on this file since 50 was 13, checked in by Bayard Gildas, 9 years ago

formatting script + include reformatted

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