ConOpSys V2970  P004.07
ANVILEX control operating system
Function_Block_AM_Moving_Average_Filter_128_F32_1C_T2.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file Function_Block_AM_Moving_Average_Filter_128_F32_1C_T2.h
3 //! @brief Ariphmetic moddle moving average filter (fast implementation) class header file.
4 //! @copyright ANVILEX GmbH
5 //! @attention No special attention requered.
6 //! $HeadURL: https://192.168.3.4:8443/svn/P004_07/ConOpSys/Blocks/Function_Block_AM_Moving_Average_Filter.h $
7 //! $Revision: 2904 $
8 //! $Date: 2021-12-02 02:39:23 +0500 (Чт, 02 дек 2021) $
9 //! $Author: minch $
10 //
11 // Copyright(C) 2004-2022 ANVILEX GmbH
12 //
13 // Redistribution and use in source and binary forms, with or without
14 // modification, are permitted provided that the following conditions are met:
15 //
16 // 1. Redistributions of source code must retain the above copyright notice,
17 // this list of conditions and the following disclaimer.
18 //
19 // 2. Redistributions in binary form must reproduce the above copyright notice,
20 // this list of conditions and the following disclaimer in the documentation
21 // and/or other materials provided with the distribution.
22 //
23 // 3. Neither the name of ANVILEX nor the names of its contributors may be
24 // used to endorse or promote products derived from this software without
25 // specific prior written permission.
26 //
27 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
31 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37 // POSSIBILITY OF SUCH DAMAGE.
38 //
39 //------------------------------------------------------------------------------
40 
41 //------------------------------------------------------------------------------
42 // Protecting header files from mutual, recursive inclusion.
43 //------------------------------------------------------------------------------
44 
45 #pragma once
46 
47 //------------------------------------------------------------------------------
48 // Include standard libraries header files
49 //------------------------------------------------------------------------------
50 
51 //------------------------------------------------------------------------------
52 // Include thrid party header files
53 //------------------------------------------------------------------------------
54 
55 //------------------------------------------------------------------------------
56 // Include ConOpSys header files
57 //------------------------------------------------------------------------------
58 
59 #include "Function_Block_Base.h"
60 
61 //------------------------------------------------------------------------------
62 // Include ConOpSys application header files
63 //------------------------------------------------------------------------------
64 
65 //------------------------------------------------------------------------------
66 // Macros
67 //------------------------------------------------------------------------------
68 
69 //------------------------------------------------------------------------------
70 //! @brief Class declaration description
71 //------------------------------------------------------------------------------
72 
73 
74 //! @note ANVILEX: This Function block is not work properly.
76 {
77 
78  //----------------------------------------------------------------------------
79  // Public defines, methods and variables
80  //----------------------------------------------------------------------------
81 
82  public:
83 
84  //!-------------------------------------------------------------------------
85  //! @brief Class constructor method.
86  //! @note None
87  //! \par Override
88  //! Not allowed
89  //! @attention Don't call this method directly.
90  //--------------------------------------------------------------------------
91 
93 
94  //!-------------------------------------------------------------------------
95  //! @brief Class destructor method.
96  //! @note None
97  //! \par Override
98  //! Not allowed
99  //! @attention Don't call this method directly.
100  //--------------------------------------------------------------------------
101 
103 
104  //!-------------------------------------------------------------------------
105  //! @brief Function block initialisation method.
106  //! @note None
107  //! \par Override
108  //! Not allowed
109  //! @attention Don't call this method directly.
110  //--------------------------------------------------------------------------
111 
112  virtual VOID Init();
113 
114  //!-------------------------------------------------------------------------
115  //! @brief Function block execution method.
116  //! @note None
117  //! \par Override
118  //! Not allowed
119  //! @attention None
120  //--------------------------------------------------------------------------
121 
122  virtual VOID Execute();
123 
124  //--------------------------------------------------------------------------
125  // Function block parameter connectors
126  //--------------------------------------------------------------------------
127 
129  TBlock_Input_Connector object_f32_Sample_Time; //!< Sample time parameter
130 
131  //--------------------------------------------------------------------------
132  // Function block input connectors
133  //--------------------------------------------------------------------------
134 
136 
137  //--------------------------------------------------------------------------
138  // Function block output connectors
139  //--------------------------------------------------------------------------
140 
141  TBlock_Output_Connector object_f32_Output; //!< Moving average block output
142 
143  //----------------------------------------------------------------------------
144  // Protected defines, methods and variables
145  //----------------------------------------------------------------------------
146 
147  protected:
148 
149  //----------------------------------------------------------------------------
150  // Private defines, methods and variables
151  //----------------------------------------------------------------------------
152 
153  private:
154 
158  F32 f32_Buffer[ 128 ];
160 
161 };
162 
163 //------------------------------------------------------------------------------
164 // End of file
165 //------------------------------------------------------------------------------
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105
unsigned long U32
Binary 32-Bit unsigned integer datatype defenition.
Definition: Defines.h:203
float F32
IEEE-754 32-Bit single presession floating point numbers datatype defenition.
Definition: Defines.h:324
Function block base class header file.
Function block input connector class.
Definition: Block_Input_Connector.h:83
Function block output connector class.
Definition: Block_Output_Connector.h:59
Function block base class for device.
Definition: Function_Block_Base.h:96
Class declaration description.
Definition: Function_Block_AM_Moving_Average_Filter_128_F32_1C_T2.h:76
virtual VOID Execute()
Function block execution method.
Definition: Function_Block_AM_Moving_Average_Filter_128_F32_1C_T2.cpp:163
virtual ~TFunction_Block_Moving_Average_128_F32_1C_T2()
Class destructor method.
Definition: Function_Block_AM_Moving_Average_Filter_128_F32_1C_T2.cpp:115
F32 f32_Buffer[128]
Definition: Function_Block_AM_Moving_Average_Filter_128_F32_1C_T2.h:158
virtual VOID Init()
Function block initialisation method.
Definition: Function_Block_AM_Moving_Average_Filter_128_F32_1C_T2.cpp:123
F32 f32_Sector[8]
Definition: Function_Block_AM_Moving_Average_Filter_128_F32_1C_T2.h:159
TBlock_Input_Connector object_f32_Averaging_Time
Averaging time.
Definition: Function_Block_AM_Moving_Average_Filter_128_F32_1C_T2.h:128
TBlock_Output_Connector object_f32_Output
Moving average block output.
Definition: Function_Block_AM_Moving_Average_Filter_128_F32_1C_T2.h:141
U32 u32_Buffer_Index
Definition: Function_Block_AM_Moving_Average_Filter_128_F32_1C_T2.h:157
TBlock_Input_Connector object_f32_Sample_Time
Sample time parameter.
Definition: Function_Block_AM_Moving_Average_Filter_128_F32_1C_T2.h:129
TFunction_Block_Moving_Average_128_F32_1C_T2()
Class constructor method.
Definition: Function_Block_AM_Moving_Average_Filter_128_F32_1C_T2.cpp:66
F32 f32_1_Div_Averaging_Buffer_Size
Definition: Function_Block_AM_Moving_Average_Filter_128_F32_1C_T2.h:156
TBlock_Input_Connector object_f32_Input
Input signal.
Definition: Function_Block_AM_Moving_Average_Filter_128_F32_1C_T2.h:135
U32 u32_Averaging_Buffer_Size
Definition: Function_Block_AM_Moving_Average_Filter_128_F32_1C_T2.h:155