ConOpSys V2970  P004.07
ANVILEX control operating system
P020_12_KG3_GRTD.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file P020_12_KG3_GRTD.h
3 //! @brief KG3 RTD sensor emulation board P020.12 V1 T1 hardware driver header file.
4 //! @attention No special attention requered.
5 //! @copyright (C) 2015-2020 ANVILEX LLC
6 //! $HeadURL: https://192.168.3.4:8443/svn/P004_07/ConOpSys/Hardware/P020_12_KG3_GRTD/P020_12_KG3_GRTD.h $
7 //! $Revision: 2850 $
8 //! $Date: 2021-08-20 14:07:16 +0500 (Fr, 20 Aug 2021) $
9 //! $Author: ggavrituhin $
10 //------------------------------------------------------------------------------
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 // TP020_12_KG3_GRTD_T0
41 // Emulation of the DIO board.
42 //
43 // TP020_12_KG3_GRTD_T1
44 //
45 //------------------------------------------------------------------------------
46 
47 //------------------------------------------------------------------------------
48 // Protecting header files from mutual, recursive inclusion.
49 //------------------------------------------------------------------------------
50 
51 #pragma once
52 
53 //------------------------------------------------------------------------------
54 // Include standard libraries header files
55 //------------------------------------------------------------------------------
56 
57 //------------------------------------------------------------------------------
58 // Include thrid party header files
59 //------------------------------------------------------------------------------
60 
61 //------------------------------------------------------------------------------
62 // Include ConOpSys header files
63 //------------------------------------------------------------------------------
64 
65 #include "Functional_Block_Base.h"
66 
67 //------------------------------------------------------------------------------
68 // Macros
69 //------------------------------------------------------------------------------
70 
71 //------------------------------------------------------------------------------
72 // Class definitions
73 //------------------------------------------------------------------------------
74 
75 //! @brief RTD sensor emulation P020.12 board class
76 class TP020_12_KG3_GRTD_T0 : public TFunctional_Block_Base
77 {
78 
79  //----------------------------------------------------------------------------
80  // Public methods and variables
81  //----------------------------------------------------------------------------
82 
83  public:
84 
85  //--------------------------------------------------------------------------
86  // Public methods
87  //--------------------------------------------------------------------------
88 
89  //!-------------------------------------------------------------------------
90  //! @brief Class constructor method.
91  //! @note None
92  //! \par Override
93  //! Not allowed
94  //! @attention Don't call this method directly.
95  //--------------------------------------------------------------------------
96 
98 
99  //!-------------------------------------------------------------------------
100  //! @brief Class destructor method.
101  //! @note None
102  //! \par Override
103  //! Not allowed
104  //! @attention Don't call this method directly.
105  //--------------------------------------------------------------------------
106 
108 
109 // //!-------------------------------------------------------------------------
110 // //! @brief Hardware mapping method.
111 // //! @note None
112 // //! @param [in] *struct_Registers_Base_Address - Base adress to register structure mapping
113 // //! \par Override
114 // //! Not allowed
115 // //! @attention None
116 // //--------------------------------------------------------------------------
117 
118 // VOID Map( TP020_12_KG3_GRTD_Registers *struct_Registers_Base_Address ); //!< Map method
119 
120  //!-------------------------------------------------------------------------
121  //! @brief Function block initialisation method.
122  //! @note None
123  //! \par Override
124  //! Not allowed
125  //! @attention None
126  //--------------------------------------------------------------------------
127 
128  virtual VOID Init(); //!< Block initialization method
129 
130 // //!-------------------------------------------------------------------------
131 // //! @brief Function block execution method.
132 // //! @note None
133 // //! \par Override
134 // //! Not allowed
135 // //! @attention None
136 // //--------------------------------------------------------------------------
137 
138 // virtual VOID Execute(); //!< Block execution method
139 
140 
141  //--------------------------------------------------------------------------
142  // Public variables
143  //--------------------------------------------------------------------------
144 
145  //--------------------------------------------------------------------------
146  // Function block parameter signals
147  //--------------------------------------------------------------------------
148 
149  //--------------------------------------------------------------------------
150  // Function block input signals
151  //--------------------------------------------------------------------------
152 
157 
158 // TBlock_Input_Connector u16_Digital_Outputs;
159 
160  //--------------------------------------------------------------------------
161  // Function block output signals
162  //--------------------------------------------------------------------------
163 
164  //----------------------------------------------------------------------------
165  // Protected mathods and variables
166  //----------------------------------------------------------------------------
167 
168  protected:
169 
170  //----------------------------------------------------------------------------
171  // Private mathods and variables
172  //----------------------------------------------------------------------------
173 
174  private:
175 
176 
177 
178 };
179 
180 //------------------------------------------------------------------------------
181 
182 class TP020_12_KG3_GRTD_T1 : public TFunctional_Block_Base
183 {
184 
185  //--------------------------------------------------------------------------
186  // Public methods and variables
187  //--------------------------------------------------------------------------
188 
189  public:
190 
191  // Register structure for digital I/O access
192  typedef struct
193  {
194 
195  // Unit identification registers
196  U16 u16_Unit_ID_L; //!< 0x00 : Module identification register
197  U16 u16_Unit_ID_H; //!< 0x01 : Module identification register
198 
199  // Digital inputs
200  U16 u16_RTD_Data_1; //!< 0x02 : RTD date channel 1
201  U16 u16_RTD_Data_2; //!< 0x03 : RTD date channel 2
202  U16 u16_RTD_Data_3; //!< 0x04 : RTD date channel 3
203  U16 u16_RTD_Data_4; //!< 0x05 : RTD date channel 4
204 
205  // Digital outputs
206  U16 u16_Reserve_6; //!< 0x06 : Reserved
207  U16 u16_Reserve_7; //!< 0x07 : Reserved
208  U16 u16_Reserve_8; //!< 0x08 : Reserved
209  U16 u16_Reserve_9; //!< 0x09 : Reserved
210  U16 u16_Reserve_10; //!< 0x0A : Reserved
211  U16 u16_Reserve_11; //!< 0x0B : Reserved
212  U16 u16_Reserve_12; //!< 0x0C : Reserved
213  U16 u16_Reserve_13; //!< 0x0D : Reserved
214  U16 u16_Reserve_14; //!< 0x0E : Reserved
215  U16 u16_Reserve_15; //!< 0x0F : Reserved
216 
218 
219  //--------------------------------------------------------------------------
220  // Public methods
221  //--------------------------------------------------------------------------
222 
223  //!-------------------------------------------------------------------------
224  //! @brief Class constructor method.
225  //! @note None
226  //! \par Override
227  //! Not allowed
228  //! @attention Don't call this method directly.
229  //--------------------------------------------------------------------------
230 
232 
233  //!-------------------------------------------------------------------------
234  //! @brief Class destructor method.
235  //! @note None
236  //! \par Override
237  //! Not allowed
238  //! @attention Don't call this method directly.
239  //--------------------------------------------------------------------------
240 
241  ~TP020_12_KG3_GRTD_T1(); //!< Class destructor method
242 
243  //!-------------------------------------------------------------------------
244  //! @brief Hardware mapping method.
245  //! @note None
246  //! @param [in] *struct_Registers_Base_Address - Base adress to register structure mapping
247  //! \par Override
248  //! Not allowed
249  //! @attention None
250  //--------------------------------------------------------------------------
251 
252  VOID Map( TP020_12_KG3_GRTD_Registers *struct_Registers_Base_Address );
253 
254  //!-------------------------------------------------------------------------
255  //! @brief Function block initialisation method.
256  //! @note None
257  //! \par Override
258  //! Not allowed
259  //! @attention None
260  //--------------------------------------------------------------------------
261 
262  virtual VOID Init();
263 
264  //!-------------------------------------------------------------------------
265  //! @brief Function block execution method.
266  //! @note None
267  //! \par Override
268  //! Not allowed
269  //! @attention None
270  //--------------------------------------------------------------------------
271 
272  virtual VOID Execute();
273 
274  U32 Get_Module_ID();
275 
276  //!-------------------------------------------------------------------------
277  //! @brief Send information about flow converter board driver over communication link protocol
278  //! @note This method sends information about flow converter driver over specified communication link protocol.
279  //! @param [in] *object_Protocol - Pointer to the communication link protocol
280  //! @return None
281  //! \par Override
282  //! Optional
283  //! @attention None
284  //--------------------------------------------------------------------------
285 
286  // virtual VOID Send_Information( TProtocol_Base *object_Protocol );
287 
288  //--------------------------------------------------------------------------
289  // Public variables
290  //--------------------------------------------------------------------------
291 
292  //--------------------------------------------------------------------------
293  // Function block parameters
294  //--------------------------------------------------------------------------
295 
296  //--------------------------------------------------------------------------
297  // Function block input signals
298  //--------------------------------------------------------------------------
299 
304 
305  //--------------------------------------------------------------------------
306  // Function block output signals
307  //--------------------------------------------------------------------------
308 
309 
310  //--------------------------------------------------------------------------
311  // Protected mathods and variables
312  //--------------------------------------------------------------------------
313 
314  protected:
315 
316  //----------------------------------------------------------------------------
317  // Private mathods and variables
318  //--------------------------------------------------------------------------
319 
320  private:
321 
322  //! @brief Pointer to the memory area in FPGA address space
324 
325 };
326 
327 //------------------------------------------------------------------------------
328 // End of file
329 //------------------------------------------------------------------------------
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105
unsigned long U32
Binary 32-Bit unsigned integer datatype defenition.
Definition: Defines.h:203
unsigned short U16
Binary 16-Bit unsigned integer datatype defenition.
Definition: Defines.h:193
Function block input connector class.
Definition: Block_Input_Connector.h:83
RTD sensor emulation P020.12 board class.
Definition: P020_12_KG3_GRTD.h:77
~TP020_12_KG3_GRTD_T0()
Class destructor method.
Definition: P020_12_KG3_GRTD.cpp:93
TP020_12_KG3_GRTD_T0()
Class constructor method.
Definition: P020_12_KG3_GRTD.cpp:68
TBlock_Input_Connector object_u16_Digital_Output_3
Definition: P020_12_KG3_GRTD.h:155
TBlock_Input_Connector object_u16_Digital_Output_2
Definition: P020_12_KG3_GRTD.h:154
TBlock_Input_Connector object_u16_Digital_Output_1
Definition: P020_12_KG3_GRTD.h:153
TBlock_Input_Connector object_u16_Digital_Output_4
Definition: P020_12_KG3_GRTD.h:156
virtual VOID Init()
Function block initialisation method.
Definition: P020_12_KG3_GRTD.cpp:112
Definition: P020_12_KG3_GRTD.h:183
TBlock_Input_Connector object_u16_Digital_Output_1
Send information about flow converter board driver over communication link protocol.
Definition: P020_12_KG3_GRTD.h:300
TBlock_Input_Connector object_u16_Digital_Output_3
Definition: P020_12_KG3_GRTD.h:302
TBlock_Input_Connector object_u16_Digital_Output_4
Definition: P020_12_KG3_GRTD.h:303
TP020_12_KG3_GRTD_T1()
Class constructor method.
Definition: P020_12_KG3_GRTD.cpp:125
TBlock_Input_Connector object_u16_Digital_Output_2
Definition: P020_12_KG3_GRTD.h:301
virtual VOID Init()
Function block initialisation method.
Definition: P020_12_KG3_GRTD.cpp:179
virtual VOID Execute()
Function block execution method.
Definition: P020_12_KG3_GRTD.cpp:194
volatile TP020_12_KG3_GRTD_Registers * struct_Registers
Pointer to the memory area in FPGA address space.
Definition: P020_12_KG3_GRTD.h:323
U32 Get_Module_ID()
Definition: P020_12_KG3_GRTD.cpp:208
~TP020_12_KG3_GRTD_T1()
Class destructor method.
Definition: P020_12_KG3_GRTD.cpp:156
VOID Map(TP020_12_KG3_GRTD_Registers *struct_Registers_Base_Address)
Hardware mapping method.
Definition: P020_12_KG3_GRTD.cpp:164
Definition: P020_12_KG3_GRTD.h:193
U16 u16_RTD_Data_4
0x05 : RTD date channel 4
Definition: P020_12_KG3_GRTD.h:203
U16 u16_Unit_ID_L
0x00 : Module identification register
Definition: P020_12_KG3_GRTD.h:196
U16 u16_Reserve_11
0x0B : Reserved
Definition: P020_12_KG3_GRTD.h:211
U16 u16_Reserve_10
0x0A : Reserved
Definition: P020_12_KG3_GRTD.h:210
U16 u16_RTD_Data_1
0x02 : RTD date channel 1
Definition: P020_12_KG3_GRTD.h:200
U16 u16_Reserve_8
0x08 : Reserved
Definition: P020_12_KG3_GRTD.h:208
U16 u16_Reserve_9
0x09 : Reserved
Definition: P020_12_KG3_GRTD.h:209
U16 u16_Reserve_14
0x0E : Reserved
Definition: P020_12_KG3_GRTD.h:214
U16 u16_Unit_ID_H
0x01 : Module identification register
Definition: P020_12_KG3_GRTD.h:197
U16 u16_RTD_Data_3
0x04 : RTD date channel 3
Definition: P020_12_KG3_GRTD.h:202
U16 u16_Reserve_7
0x07 : Reserved
Definition: P020_12_KG3_GRTD.h:207
U16 u16_RTD_Data_2
0x03 : RTD date channel 2
Definition: P020_12_KG3_GRTD.h:201
U16 u16_Reserve_13
0x0D : Reserved
Definition: P020_12_KG3_GRTD.h:213
U16 u16_Reserve_15
0x0F : Reserved
Definition: P020_12_KG3_GRTD.h:215
U16 u16_Reserve_6
0x06 : Reserved
Definition: P020_12_KG3_GRTD.h:206
U16 u16_Reserve_12
0x0C : Reserved
Definition: P020_12_KG3_GRTD.h:212