Changeset 15 in flair-src for trunk/lib/FlairFilter/src/Pid.h
- Timestamp:
- Apr 8, 2016, 3:40:57 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FlairFilter/src/Pid.h
r10 r15 16 16 #include <ControlLaw.h> 17 17 18 namespace flair 19 { 20 namespace gui 21 { 22 class LayoutPosition; 23 } 18 namespace flair { 19 namespace gui { 20 class LayoutPosition; 21 } 24 22 } 25 23 26 24 class Pid_impl; 27 25 28 namespace flair 29 { 30 namespace filter 31 { 32 /*! \class Pid 33 * 34 * \brief Class defining a PID 35 */ 36 class Pid : public ControlLaw 37 { 38 friend class ::Pid_impl; 26 namespace flair { 27 namespace filter { 28 /*! \class Pid 29 * 30 * \brief Class defining a PID 31 */ 32 class Pid : public ControlLaw { 33 friend class ::Pid_impl; 39 34 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); 35 public: 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); 52 48 53 54 55 56 57 49 /*! 50 * \brief Destructor 51 * 52 */ 53 ~Pid(); 58 54 59 60 61 62 63 55 /*! 56 * \brief Reset integral 57 * 58 */ 59 void Reset(void); 64 60 65 66 67 68 69 70 71 void SetValues(float p,float d);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); 72 68 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); 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); 85 82 86 87 88 89 90 91 92 93 94 83 private: 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); 95 92 96 Pid_impl*pimpl_;97 93 Pid_impl *pimpl_; 94 }; 98 95 } // end namespace filter 99 96 } // end namespace flair
Note:
See TracChangeset
for help on using the changeset viewer.