ConOpSys V2970  P004.07
ANVILEX control operating system
KG3_LCSI.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file KG3_LCSI.h
3 //! @author ANVILEX GmbH
4 //! @version V1.0
5 //! @date 30.04.2021
6 //! @brief Function block KG3_LCSI_T1 class header file.
7 //! @attention No special attention requered.
8 //! @copyright (C) 2015-2021 ANVILEX LLC
9 //!
10 //! COPYRIGHT(C) 2021 ANVILEX GmbH
11 //!
12 //! Redistribution and use in source and binary forms, with or without
13 //! modification, are permitted provided that the following conditions are met:
14 //!
15 //! 1. Redistributions of source code must retain the above copyright notice,
16 //! this list of conditions and the following disclaimer.
17 //!
18 //! 2. Redistributions in binary form must reproduce the above copyright notice,
19 //! this list of conditions and the following disclaimer in the documentation
20 //! and/or other materials provided with the distribution.
21 //!
22 //! 3. Neither the name of ANVILEX nor the names of its contributors may be
23 //! used to endorse or promote products derived from this software without
24 //! specific prior written permission.
25 //!
26 //! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
27 //! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 //! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 //! ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
30 //! LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 //! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 //! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 //! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 //! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 //! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 //! POSSIBILITY OF SUCH DAMAGE.
37 //------------------------------------------------------------------------------
38 
39 //------------------------------------------------------------------------------
40 // Protecting header files from mutual, recursive inclusion.
41 //------------------------------------------------------------------------------
42 
43 #pragma once
44 
45 //------------------------------------------------------------------------------
46 // Include standard libraries header files
47 //------------------------------------------------------------------------------
48 
49 //------------------------------------------------------------------------------
50 // Include thrid party header files
51 //------------------------------------------------------------------------------
52 
53 //------------------------------------------------------------------------------
54 // Include ConOpSys header files
55 //------------------------------------------------------------------------------
56 
57 #include "Function_Block_Base.h"
58 #include "PRT_Sensor.h"
59 
60 //------------------------------------------------------------------------------
61 // Include ConOpSys application header files
62 //------------------------------------------------------------------------------
63 
64 //------------------------------------------------------------------------------
65 // Macros
66 //------------------------------------------------------------------------------
67 
68 //------------------------------------------------------------------------------
69 //! @brief Function block class declaration
70 //------------------------------------------------------------------------------
71 
73 {
74 
75  //----------------------------------------------------------------------------
76  // Public defines, variables and methods
77  //----------------------------------------------------------------------------
78 
79  public:
80 
81  //--------------------------------------------------------------------------
82  // Public defines
83  //--------------------------------------------------------------------------
84 
85  //! @brief Register structure for generic access
86  typedef struct
87  {
88 
89  //! @brief 0x00 : Module identification register
91 
92  //! @brief 0x01 : Module identification register
94 
95  //! @brief 0x02 : Status register
97 
98  //! @brief 0x03 : Inlet filtred temperature register
100 
101  //! @brief 0x04 : Outlet filtred temperature register
103 
104  //! @brief 0x05 : Inlet filtred pressure register
106 
107  //! @brief 0x06 : Outlet filtred pressure register
109 
110  //! @brief 0x07 : Inlet pure temperature register
112 
113  //! @brief 0x08 : Outlet pure temperature register
115 
116  //! @brief 0x09 : Inlet pure pressure register
118 
119  //! @brief 0x0A : Outlet pure pressure register
121 
123 
124  //--------------------------------------------------------------------------
125  // Public methods
126  //--------------------------------------------------------------------------
127 
128  //!-------------------------------------------------------------------------
129  //! @brief Function block class constructor method.
130  //! @note None
131  //! \par Override
132  //! Not allowed
133  //! @attention Don't call this method directly.
134  //--------------------------------------------------------------------------
135 
136  TKG3_LCSI_T1();
137 
138  //!-------------------------------------------------------------------------
139  //! @brief Function block class desstructor method.
140  //! @note None
141  //! \par Override
142  //! Not allowed
143  //! @attention Don't call this method directly.
144  //--------------------------------------------------------------------------
145 
146  ~TKG3_LCSI_T1();
147 
148  //!-------------------------------------------------------------------------
149  //! @brief Hardware mapping method.
150  //! @note None
151  //! @param [in] *struct_Registers_Base_Address - Base adress to register structure mapping
152  //! \par Override
153  //! Not allowed
154  //! @attention None
155  //--------------------------------------------------------------------------
156 
157  VOID Map( TKG3_LCSI_T1_Registers *struct_Registers_Base_Address );
158 
159  //!-------------------------------------------------------------------------
160  //! @brief Function block initialisation method.
161  //! @note None
162  //! \par Override
163  //! Not allowed
164  //! @attention None
165  //--------------------------------------------------------------------------
166 
167  virtual VOID Init();
168 
169  //!-------------------------------------------------------------------------
170  //! @brief Function block execution method.
171  //! @note None
172  //! \par Override
173  //! Not allowed
174  //! @attention None
175  //--------------------------------------------------------------------------
176 
177  virtual VOID Execute();
178 
179  //!-------------------------------------------------------------------------
180  //! @brief Send information about driver over communication link protocol
181  //! @note This method sends information driver over specified communication link protocol.
182  //! @param [in] *object_Protocol - Pointer to the communication link protocol
183  //! @return None
184  //! \par Override
185  //! Not allowed
186  //! @attention None
187  //--------------------------------------------------------------------------
188 
189  virtual VOID Send_Information( TProtocol_Base *object_Protocol );
190 
191  //--------------------------------------------------------------------------
192  // Function block parameters
193  //--------------------------------------------------------------------------
194 
195  //--------------------------------------------------------------------------
196  // Function block inputs
197  //--------------------------------------------------------------------------
198 
199  //! @brief 32-bit floating point input
201 
202  //! @brief 32-bit floating point input
204 
205  //! @brief 32-bit floating point input
207 
208  //! @brief 32-bit floating point input
210 
211  //! @brief Outlet pressure gain
213 
214  //! @brief Intlet pressure gain
216 
217  //! @brief 32-bit floating point input
219 
220  //! @brief 32-bit floating point input
222 
223  //! @brief High inlet pressure bound
225 
226  //! @brief Low inlet pressure bound
228 
229  //! @brief High outlet pressure bound
231 
232  //! @brief Low outlet pressure bound
234 
235  //! @brief 32-bit floating point input
237 
238  //! @brief 32-bit floating point input
240 
241  //--------------------------------------------------------------------------
242  // Function block outputs
243  //--------------------------------------------------------------------------
244 
245  //! @brief 16-bit unsigned integer output
247 
248  //! @brief 16-bit unsigned integer output
250 
251  //! @brief 16-bit unsigned integer output
253 
254  //! @brief 16-bit unsigned integer output
256 
257  //! @brief 32-bit floating point output
259 
260  //! @brief 32-bit floating point output
262 
263  //! @brief 32-bit floating point output
265 
266  //! @brief 32-bit floating point output
268 
269  //----------------------------------------------------------------------------
270  // Protected variables and methods
271  //----------------------------------------------------------------------------
272 
273  protected:
274 
275  //----------------------------------------------------------------------------
276  // Private variables and methods
277  //----------------------------------------------------------------------------
278 
279  private:
280 
281  //--------------------------------------------------------------------------
282  // Private variables
283  //--------------------------------------------------------------------------
284 
285  //! @brief object PRT
287 
288  //! @brief Inlet temperature raw data
290 
291  //! @brief Outlet temperature raw data
293 
294  //! @brief Inlet pressue raw data
296 
297  //! @brief Outlet pressue raw data
299 
300  //! @brief Inlet temperature value
302 
303  //! @brief Outlet temperature value
305 
306  //! @brief Inlet pressue value
308 
309  //! @brief Outlet pressue value
311 
312  //! @brief Inlet temperature sensor valid data count
314 
315  //! @brief Inlet temperature open sensor error count
317 
318  //! @brief Inlet temperature short sensor error count
320 
321  //! @brief Inlet temperature sensor valid data count
323 
324  //! @brief Inlet temperature open sensor error count
326 
327  //! @brief Inlet temperature short sensor error count
329 
330  //! @brief Coefficient for inlet pressure
332 
333  //! @brief Coefficient for outlet pressure
335 
336  //! @brief Offset for inlet pressure
338 
339  //! @brief Offset for outlet pressure
341 
342  //! @brief Inlet pressure sensor current value
344 
345  //! @brief Outlet pressure sensor current value
347 
348  //! @brief Inlet pressure range
350 
351  //! @brief Outlet pressure range
353 
354  //! @brief Pointer to the memory area in FPGA address space
356 
357 };
358 
359 //------------------------------------------------------------------------------
360 // End of file
361 //------------------------------------------------------------------------------
#define NULL
Definition: Defines.h:388
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
unsigned short U16
Binary 16-Bit unsigned integer datatype defenition.
Definition: Defines.h:193
Function block base class header file.
Platinum resistance thermometers 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
Function block class declaration.
Definition: KG3_LCSI.h:73
TBlock_Output_Connector object_u16_Outlet_Pressure_Raw_Data
16-bit unsigned integer output
Definition: KG3_LCSI.h:255
TBlock_Input_Connector object_f32_Low_Bound_Outlet_Pressure
Low outlet pressure bound.
Definition: KG3_LCSI.h:233
U32 u32_Sensor_Short_Error_Count_Inlet_Temperature
Inlet temperature short sensor error count.
Definition: KG3_LCSI.h:319
TBlock_Output_Connector object_u16_Inlet_Pressure_Raw_Data
16-bit unsigned integer output
Definition: KG3_LCSI.h:252
F32 f32_K_Outlet_Pressure
Coefficient for outlet pressure.
Definition: KG3_LCSI.h:334
U32 u32_Sensor_Short_Error_Count_Outlet_Temperature
Inlet temperature short sensor error count.
Definition: KG3_LCSI.h:328
virtual VOID Execute()
Function block execution method.
Definition: KG3_LCSI.cpp:251
TBlock_Output_Connector object_u16_Outlet_Temperature_Raw_Data
16-bit unsigned integer output
Definition: KG3_LCSI.h:249
virtual VOID Send_Information(TProtocol_Base *object_Protocol)
Send information about driver over communication link protocol.
Definition: KG3_LCSI.cpp:481
U16 u16_Outlet_Temperature_Raw_Data
Outlet temperature raw data.
Definition: KG3_LCSI.h:292
TBlock_Input_Connector object_f32_Inlet_Temperature_Gain
32-bit floating point input
Definition: KG3_LCSI.h:200
F32 f32_Outlet_Temperature_Value
Outlet temperature value.
Definition: KG3_LCSI.h:304
U32 u32_Sensor_Valid_Data_Count_Outlet_Temperature
Inlet temperature sensor valid data count.
Definition: KG3_LCSI.h:322
TBlock_Input_Connector object_f32_Inlet_Pressure_Gain
Outlet pressure gain.
Definition: KG3_LCSI.h:212
TBlock_Output_Connector object_f32_Outlet_Temperature_Value
32-bit floating point output
Definition: KG3_LCSI.h:267
F32 f32_Inlet_Pressure_Sensor_Current
Inlet pressure sensor current value.
Definition: KG3_LCSI.h:343
TBlock_Input_Connector object_f32_Inlet_Pressure_Offset
32-bit floating point input
Definition: KG3_LCSI.h:218
U16 u16_Inlet_Pressure_Raw_Data
Inlet pressue raw data.
Definition: KG3_LCSI.h:295
F32 f32_Outlet_Pressure_Value
Outlet pressue value.
Definition: KG3_LCSI.h:310
TBlock_Input_Connector object_f32_Outlet_Temperature_Gain
32-bit floating point input
Definition: KG3_LCSI.h:203
TBlock_Output_Connector object_f32_Inlet_Temperature_Value
32-bit floating point output
Definition: KG3_LCSI.h:264
F32 f32_Range_Inlet_Pressure
Inlet pressure range.
Definition: KG3_LCSI.h:349
TKG3_LCSI_T1()
Function block class constructor method.
Definition: KG3_LCSI.cpp:74
F32 f32_Outlet_Pressure_Sensor_Current
Outlet pressure sensor current value.
Definition: KG3_LCSI.h:346
U16 u16_Inlet_Temperature_Raw_Data
Inlet temperature raw data.
Definition: KG3_LCSI.h:289
F32 f32_Inlet_Pressure_Value
Inlet pressue value.
Definition: KG3_LCSI.h:307
U32 u32_Sensor_Open_Error_Count_Inlet_Temperature
Inlet temperature open sensor error count.
Definition: KG3_LCSI.h:316
F32 f32_Range_Outlet_Pressure
Outlet pressure range.
Definition: KG3_LCSI.h:352
TBlock_Output_Connector object_u16_Inlet_Temperature_Raw_Data
16-bit unsigned integer output
Definition: KG3_LCSI.h:246
U32 u32_Sensor_Open_Error_Count_Outlet_Temperature
Inlet temperature open sensor error count.
Definition: KG3_LCSI.h:325
TBlock_Input_Connector object_f32_Outlet_Pressure_Gain
Intlet pressure gain.
Definition: KG3_LCSI.h:215
U16 u16_Outlet_Pressure_Raw_Data
Outlet pressue raw data.
Definition: KG3_LCSI.h:298
TBlock_Output_Connector object_f32_Outlet_Pressure_Value
32-bit floating point output
Definition: KG3_LCSI.h:261
F32 f32_Offset_Outlet_Pressure
Offset for outlet pressure.
Definition: KG3_LCSI.h:340
VOID Map(TKG3_LCSI_T1_Registers *struct_Registers_Base_Address)
Hardware mapping method.
Definition: KG3_LCSI.cpp:167
TPRT object_PRT
object PRT
Definition: KG3_LCSI.h:286
TBlock_Input_Connector object_f32_Inlet_Temperature_Offset
32-bit floating point input
Definition: KG3_LCSI.h:236
U32 u32_Sensor_Valid_Data_Count_Inlet_Temperature
Inlet temperature sensor valid data count.
Definition: KG3_LCSI.h:313
TBlock_Input_Connector object_f32_Outlet_Temperature_Offset
32-bit floating point input
Definition: KG3_LCSI.h:239
F32 f32_Inlet_Temperature_Value
Inlet temperature value.
Definition: KG3_LCSI.h:301
TBlock_Input_Connector object_f32_Low_Bound_Inlet_Pressure
Low inlet pressure bound.
Definition: KG3_LCSI.h:227
TBlock_Input_Connector object_f32_Analog_Input_Full_Scale_Inlet_Pressure_Current
32-bit floating point input
Definition: KG3_LCSI.h:206
TBlock_Input_Connector object_f32_High_Bound_Outlet_Pressure
High outlet pressure bound.
Definition: KG3_LCSI.h:230
virtual VOID Init()
Function block initialisation method.
Definition: KG3_LCSI.cpp:182
~TKG3_LCSI_T1()
Function block class desstructor method.
Definition: KG3_LCSI.cpp:159
volatile TKG3_LCSI_T1_Registers * struct_Registers
Pointer to the memory area in FPGA address space.
Definition: KG3_LCSI.h:355
F32 f32_Offset_Inlet_Pressure
Offset for inlet pressure.
Definition: KG3_LCSI.h:337
TBlock_Input_Connector object_f32_Outlet_Pressure_Offset
32-bit floating point input
Definition: KG3_LCSI.h:221
TBlock_Input_Connector object_f32_High_Bound_Inlet_Pressure
High inlet pressure bound.
Definition: KG3_LCSI.h:224
TBlock_Output_Connector object_f32_Inlet_Pressure_Value
32-bit floating point output
Definition: KG3_LCSI.h:258
TBlock_Input_Connector object_f32_Analog_Input_Full_Scale_Outlet_Pressure_Current
32-bit floating point input
Definition: KG3_LCSI.h:209
F32 f32_K_Inlet_Pressure
Coefficient for inlet pressure.
Definition: KG3_LCSI.h:331
Platinum resistance thermometers (PRT) class.
Definition: PRT_Sensor.h:74
Definition: Protocol_Base.h:57
Register structure for generic access.
Definition: KG3_LCSI.h:87
U16 u16_Outlet_Pure_Temperature
0x08 : Outlet pure temperature register
Definition: KG3_LCSI.h:114
U16 u16_Unit_ID_L
0x00 : Module identification register
Definition: KG3_LCSI.h:90
U16 u16_Inlet_Pure_Temperature
0x07 : Inlet pure temperature register
Definition: KG3_LCSI.h:111
U16 u16_Outlet_Filtred_Pressure
0x06 : Outlet filtred pressure register
Definition: KG3_LCSI.h:108
U16 u16_Inlet_Filtred_Pressure
0x05 : Inlet filtred pressure register
Definition: KG3_LCSI.h:105
U16 u16_Inlet_Filtred_Temperature
0x03 : Inlet filtred temperature register
Definition: KG3_LCSI.h:99
U16 u16_Unit_ID_H
0x01 : Module identification register
Definition: KG3_LCSI.h:93
U16 u16_Outlet_Pure_Pressure
0x0A : Outlet pure pressure register
Definition: KG3_LCSI.h:120
U16 u16_Outlet_Filtred_Temperature
0x04 : Outlet filtred temperature register
Definition: KG3_LCSI.h:102
U16 u16_Status_Register
0x02 : Status register
Definition: KG3_LCSI.h:96
U16 u16_Inlet_Pure_Pressure
0x09 : Inlet pure pressure register
Definition: KG3_LCSI.h:117