[10] | 1 | // %flair:license{
|
---|
[15] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[10] | 4 | // %flair:license}
|
---|
[7] | 5 | /*!
|
---|
| 6 | * \file ButterworthLowPass.h
|
---|
| 7 | * \brief Class defining a Butterworth low pass filter
|
---|
| 8 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
| 9 | * \date 2013/12/10
|
---|
| 10 | * \version 4.0
|
---|
| 11 | */
|
---|
| 12 |
|
---|
| 13 | #ifndef BUTTERWORTHLOWPASS_H
|
---|
| 14 | #define BUTTERWORTHLOWPASS_H
|
---|
| 15 |
|
---|
| 16 | #include <IODevice.h>
|
---|
| 17 |
|
---|
[15] | 18 | namespace flair {
|
---|
| 19 | namespace core {
|
---|
[214] | 20 | class Matrix;
|
---|
[7] | 21 | }
|
---|
[15] | 22 | namespace gui {
|
---|
| 23 | class LayoutPosition;
|
---|
| 24 | }
|
---|
| 25 | }
|
---|
[7] | 26 |
|
---|
| 27 | class ButterworthLowPass_impl;
|
---|
| 28 |
|
---|
[15] | 29 | namespace flair {
|
---|
| 30 | namespace filter {
|
---|
| 31 | /*! \class ButterworthLowPass
|
---|
| 32 | *
|
---|
| 33 | * \brief Class defining a Butterworth low pass filter
|
---|
| 34 | */
|
---|
| 35 | class ButterworthLowPass : public core::IODevice {
|
---|
| 36 | public:
|
---|
| 37 | /*!
|
---|
| 38 | * \brief Constructor
|
---|
| 39 | *
|
---|
| 40 | * Construct a ButterworthLowPass at position. \n
|
---|
| 41 | * After calling this function, position will be deleted as it is no longer
|
---|
| 42 | *usefull. \n
|
---|
| 43 | * The filter is automatically updated when parent's
|
---|
| 44 | * IODevice::ProcessUpdate is called.
|
---|
| 45 | *
|
---|
| 46 | * \param parent parent
|
---|
| 47 | * \param position position to display settings
|
---|
| 48 | * \param name name
|
---|
| 49 | * \param order order of the filter
|
---|
[162] | 50 | * \param nbRow number of rows of input/output
|
---|
| 51 | * \param nbCol number of cols of input/output
|
---|
[15] | 52 | */
|
---|
| 53 | ButterworthLowPass(const IODevice *parent,
|
---|
| 54 | const gui::LayoutPosition *position, std::string name,
|
---|
[162] | 55 | uint32_t order,uint32_t nbRow=1,uint32_t nbCol=1);
|
---|
[7] | 56 |
|
---|
[15] | 57 | /*!
|
---|
| 58 | * \brief Constructor
|
---|
| 59 | *
|
---|
| 60 | * Construct a ButterworthLowPass at position. \n
|
---|
| 61 | * The ButterworthLowPass will automatically be child of position->getLayout()
|
---|
| 62 | *Layout. After calling this function,
|
---|
| 63 | * position will be deleted as it is no longer usefull. \n
|
---|
| 64 | * The filter is updated manually with UpdateFrom method. \n
|
---|
| 65 | *
|
---|
| 66 | * \param position position to display settings
|
---|
| 67 | * \param name name
|
---|
| 68 | * \param order order of the filter
|
---|
[162] | 69 | * \param nbRow number of rows of input/output
|
---|
| 70 | * \param nbCol number of cols of input/output
|
---|
[15] | 71 | */
|
---|
| 72 | ButterworthLowPass(const gui::LayoutPosition *position, std::string name,
|
---|
[162] | 73 | uint32_t order,uint32_t nbRow,uint32_t nbCol);
|
---|
[7] | 74 |
|
---|
[15] | 75 | /*!
|
---|
| 76 | * \brief Destructor
|
---|
| 77 | *
|
---|
| 78 | */
|
---|
| 79 | ~ButterworthLowPass();
|
---|
[7] | 80 |
|
---|
[15] | 81 | /*!
|
---|
| 82 | * \brief Output value
|
---|
| 83 | *
|
---|
| 84 | * \return filtered output
|
---|
| 85 | */
|
---|
| 86 | float Output(void) const;
|
---|
[7] | 87 |
|
---|
[15] | 88 | /*!
|
---|
| 89 | * \brief Output matrix
|
---|
| 90 | *
|
---|
| 91 | * \return filtered output
|
---|
| 92 | */
|
---|
[214] | 93 | core::Matrix *GetMatrix(void) const;
|
---|
[7] | 94 |
|
---|
[15] | 95 | /*!
|
---|
| 96 | * \brief Update using provided datas
|
---|
| 97 | *
|
---|
| 98 | * Reimplemented from IODevice.
|
---|
| 99 | *
|
---|
| 100 | * \param data data from the parent to process
|
---|
| 101 | */
|
---|
| 102 | void UpdateFrom(const core::io_data *data);
|
---|
[7] | 103 |
|
---|
[15] | 104 | private:
|
---|
| 105 | class ButterworthLowPass_impl *pimpl_;
|
---|
| 106 | };
|
---|
[7] | 107 | } // end namespace filter
|
---|
| 108 | } // end namespace flair
|
---|
| 109 | #endif // BUTTERWORTHLOWPASS_H
|
---|