ConOpSys V2970  P004.07
ANVILEX control operating system
Function_Block_FPGA_Trip_Controller.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file Function_Block_FPGA_Trip_Controller.h
3 //! @brief Function block FPGA trip request manager class header file.
4 //! @copyright ANVILEX LLC
5 //! @attention No special attention requered.
6 //! $HeadURL: https://192.168.3.4:8443/svn/P004_07/ConOpSys/Blocks/Hardware/Function_Block_FPGA_Trip_Controller.h $
7 //! $Revision: 2904 $
8 //! $Date: 2021-12-02 02:39:23 +0500 (Do, 02 Dez 2021) $
9 //! $Author: minch $
10 //
11 // Copyright(C) 2008-2020 ANVILEX LLC
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 // TFunction_Block_FPGA_Trip_Controller_T0
42 // TFunction_Block_FPGA_Trip_Controller_T1
43 //
44 //------------------------------------------------------------------------------
45 
46 //------------------------------------------------------------------------------
47 // Protecting header files from mutual, recursive inclusion.
48 //------------------------------------------------------------------------------
49 
50 #pragma once
51 
52 //------------------------------------------------------------------------------
53 // Include standard libraries header files
54 //------------------------------------------------------------------------------
55 
56 //------------------------------------------------------------------------------
57 // Include thrid party header files
58 //------------------------------------------------------------------------------
59 
60 //------------------------------------------------------------------------------
61 // Include ConOpSys header files
62 //------------------------------------------------------------------------------
63 
64 #include "Function_Block_Base.h"
65 
66 //------------------------------------------------------------------------------
67 // Include ConOpSys application header files
68 //------------------------------------------------------------------------------
69 
70 //------------------------------------------------------------------------------
71 // Macros
72 //------------------------------------------------------------------------------
73 
74 //! @brief Function block FPGA trip request manager type 0 class
76 {
77 
78  //----------------------------------------------------------------------------
79  // Public defines, methods and variables
80  //----------------------------------------------------------------------------
81 
82  public:
83 
84  //! @brief Register structure for generic access
85  typedef struct
86  {
87 
88  //! @brief 0x00 : Unit identification L registers
90 
91  //! @brief 0x01 : Unit identification H registers
93 
94  //! @brief 0x02 : Control register
96 
97  //! @brief 0x03 : Status register
99 
100  //! @brief 0x04 : Trip request latch register 1
102 
103  //! @brief 0x05 : Trip request latch register 2
105 
106  //! @brief 0x06 : Trip request latch register 3
108 
109  //! @brief 0x07 : Trip request latch register 4
111 
112  //! @brief 0x08 : Trip request register 1
114 
115  //! @brief 0x09 : Trip request register 2
117 
118  //! @brief 0x0A : Trip request register 3
120 
121  //! @brief 0x0B : Trip request register 4
123 
124  //! @brief 0x0C : Not used
126 
127  //! @brief 0x0D : Not used
129 
130  //! @brief 0x0E : Not used
132 
133  //! @brief 0x0F : Not used
135 
137 
138  //--------------------------------------------------------------------------
139  // Public methods
140  //--------------------------------------------------------------------------
141 
142  //!-------------------------------------------------------------------------
143  //! @brief Class constructor method.
144  //! @note None
145  //! \par Override
146  //! Not allowed
147  //! @attention Don't call this method directly.
148  //--------------------------------------------------------------------------
149 
151 
152  //!-------------------------------------------------------------------------
153  //! @brief Class destructor method.
154  //! @note None
155  //! \par Override
156  //! Not allowed
157  //! @attention Don't call this method directly.
158  //--------------------------------------------------------------------------
159 
161 
162  //!-------------------------------------------------------------------------
163  //! @brief Hardware mapping method
164  //! @note This method map function block to the hardware.
165  //! @param [in] *struct_Registers_Base_Address - Pointer to the base address of the hardware registers
166  //! @return None
167  //! \par Override
168  //! Not allowed
169  //! @attention None
170  //--------------------------------------------------------------------------
171 
172  VOID Map( TFPGA_Trip_Controller_Registers *struct_Registers_Base_Address );
173 
174  //!-------------------------------------------------------------------------
175  //! @brief Function block initialisation method
176  //! @note None
177  //! @return None
178  //! \par Override
179  //! Not allowed
180  //! @attention None
181  //--------------------------------------------------------------------------
182 
183  virtual VOID Init();
184 
185  //!-------------------------------------------------------------------------
186  //! @brief Function block execution method
187  //! @note None
188  //! @return None
189  //! \par Override
190  //! Not allowed
191  //! @attention None
192  //--------------------------------------------------------------------------
193 
194  virtual VOID Execute();
195 
196  //!-------------------------------------------------------------------------
197  //! @brief Send detailed information about finction block
198  //! @note This method sends detailed information function block.
199  //! @param [in] *object_Protocol - Pointer to the communication link protocol
200  //! @return None
201  //! \par Override
202  //! Not allowed
203  //! @attention None
204  //--------------------------------------------------------------------------
205 
206  virtual VOID Send_Information( TProtocol_Base *object_Protocol );
207 
208  //--------------------------------------------------------------------------
209  // Public variables
210  //--------------------------------------------------------------------------
211 
212  //--------------------------------------------------------------------------
213  // Function block parameters
214  //--------------------------------------------------------------------------
215 
216  //--------------------------------------------------------------------------
217  // Function block input
218  //--------------------------------------------------------------------------
219 
220  //! @brief Reset signal input
222 
223  //--------------------------------------------------------------------------
224  // Function block outputs
225  //--------------------------------------------------------------------------
226 
227  //! @brief Error output
229 
230  //! @brief Trip request latch status output 1
232 
233  //! @brief Trip request latch status output 2
235 
236  //! @brief Trip request status output 1
238 
239  //! @brief Trip request status output 2
241 
242  //----------------------------------------------------------------------------
243  // Protected variables and methods
244  //----------------------------------------------------------------------------
245 
246  protected:
247 
248  //----------------------------------------------------------------------------
249  // Private defines, variables and methods
250  //----------------------------------------------------------------------------
251 
252  private:
253 
254  //! @brief FPGA mapped registers
256 
257  //! @brief Trip request latch value 1
259 
260  //! @brief Trip request latch value 2
262 
263  //! @brief Trip request latch value 3
265 
266  //! @brief Trip request latch value 4
268 
269  //! @brief Trip request value 1
271 
272  //! @brief Trip request value 2
274 
275  //! @brief Trip request value 3
277 
278  //! @brief Trip request value 4
280 
281 };
282 
283 //------------------------------------------------------------------------------
284 
285 //! @brief Function block FPGA trip request manager type 1 class
287 {
288 
289  //----------------------------------------------------------------------------
290  // Public defines, methods and variables
291  //----------------------------------------------------------------------------
292 
293  public:
294 
295  // Register structure for generic access
296  typedef struct
297  {
298 
299  //! @brief 0x00 : Unit identification L registers
301 
302  //! @brief 0x01 : Unit identification H registers
304 
305  //! @brief 0x02 : Control register
307 
308  //! @brief 0x03 : Status register
310 
311  //! @brief 0x04 : Trip request latch register 1
313 
314  //! @brief 0x05 : Trip request latch register 2
316 
317  //! @brief 0x06 : Trip request latch register 3
319 
320  //! @brief 0x07 : Trip request latch register 4
322 
323  //! @brief 0x08 : Trip request register 1
325 
326  //! @brief 0x09 : Trip request register 2
328 
329  //! @brief 0x0A : Trip request register 3
331 
332  //! @brief 0x0B : Trip request register 4
334 
335  //! @brief 0x0C : Not used
337 
338  //! @brief 0x0D : Not used
340 
341  //! @brief 0x0E : Not used
343 
344  //! @brief 0x0F : Not used
346 
348 
349  //--------------------------------------------------------------------------
350  // Public methods
351  //--------------------------------------------------------------------------
352 
353  //!-------------------------------------------------------------------------
354  //! @brief Class constructor method.
355  //! @note None
356  //! \par Override
357  //! Not allowed
358  //! @attention Don't call this method directly.
359  //--------------------------------------------------------------------------
360 
362 
363  //!-------------------------------------------------------------------------
364  //! @brief Class destructor method.
365  //! @note None
366  //! \par Override
367  //! Not allowed
368  //! @attention Don't call this method directly.
369  //--------------------------------------------------------------------------
370 
372 
373  //!-------------------------------------------------------------------------
374  //! @brief Hardware mapping method
375  //! @note This method map function block to the hardware.
376  //! @param [in] *struct_Registers_Base_Address - Pointer to the base address of the hardware registers
377  //! @return None
378  //! \par Override
379  //! Not allowed
380  //! @attention None
381  //--------------------------------------------------------------------------
382 
383  VOID Map( TFPGA_Trip_Controller_Registers *struct_Registers_Base_Address );
384 
385  //!-------------------------------------------------------------------------
386  //! @brief Function block initialisation method
387  //! @note None
388  //! @return None
389  //! \par Override
390  //! Not allowed
391  //! @attention None
392  //--------------------------------------------------------------------------
393 
394  virtual VOID Init();
395 
396  //!-------------------------------------------------------------------------
397  //! @brief Function block execution method
398  //! @note None
399  //! @return None
400  //! \par Override
401  //! Not allowed
402  //! @attention None
403  //--------------------------------------------------------------------------
404 
405  virtual VOID Execute();
406 
407  //!-------------------------------------------------------------------------
408  //! @brief Send detailed information about finction block
409  //! @note This method sends detailed information function block.
410  //! @param [in] *object_Protocol - Pointer to the communication link protocol
411  //! @return None
412  //! \par Override
413  //! Not allowed
414  //! @attention None
415  //--------------------------------------------------------------------------
416 
417  virtual VOID Send_Information( TProtocol_Base *object_Protocol );
418 
419  //--------------------------------------------------------------------------
420  // Public variables
421  //--------------------------------------------------------------------------
422 
423  //--------------------------------------------------------------------------
424  // Function block parameters
425  //--------------------------------------------------------------------------
426 
427  //--------------------------------------------------------------------------
428  // Function block inputs
429  //--------------------------------------------------------------------------
430 
431  //! @brief Reset signal input
433 
434  //--------------------------------------------------------------------------
435  // Function block outputs
436  //--------------------------------------------------------------------------
437 
438  //! @brief Trip request output
440 
441  //! @brief Trip request latch status output 1
443 
444  //! @brief Trip request latch status output 2
446 
447  //! @brief Trip request status output 1
449 
450  //! @brief Trip request status output 2
452 
453  //----------------------------------------------------------------------------
454  // Protected defines, variables and methods
455  //----------------------------------------------------------------------------
456 
457  protected:
458 
459  //----------------------------------------------------------------------------
460  // Private defines, variables and methods
461  //----------------------------------------------------------------------------
462 
463  private:
464 
465  //! @brief FPGA mapped registers
467 
468  //! @brief Trip request latch value 1
470 
471  //! @brief Trip request latch value 2
473 
474  //! @brief Trip request latch value 3
476 
477  //! @brief Trip request latch value 4
479 
480  //! @brief Trip request value 1
482 
483  //! @brief Trip request value 2
485 
486  //! @brief Trip request value 3
488 
489  //! @brief Trip request value 4
491 
492 };
493 
494 //------------------------------------------------------------------------------
495 // End of file
496 //------------------------------------------------------------------------------
void VOID
Datatypesess datatype definition.
Definition: Defines.h:105
unsigned short U16
Binary 16-Bit unsigned integer datatype defenition.
Definition: Defines.h:193
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
Function block FPGA trip request manager type 0 class.
Definition: Function_Block_FPGA_Trip_Controller.h:76
U16 u16_Trip_Request_2
Trip request value 2.
Definition: Function_Block_FPGA_Trip_Controller.h:273
U16 u16_Trip_Request_3
Trip request value 3.
Definition: Function_Block_FPGA_Trip_Controller.h:276
VOID Map(TFPGA_Trip_Controller_Registers *struct_Registers_Base_Address)
Hardware mapping method.
virtual ~TFunction_Block_FPGA_Trip_Controller_T0()
Class destructor method.
Definition: Function_Block_FPGA_Trip_Controller.cpp:125
U16 u16_Trip_Request_Latch_1
Trip request latch value 1.
Definition: Function_Block_FPGA_Trip_Controller.h:258
virtual VOID Send_Information(TProtocol_Base *object_Protocol)
Send detailed information about finction block.
Definition: Function_Block_FPGA_Trip_Controller.cpp:232
U16 u16_Trip_Request_1
Trip request value 1.
Definition: Function_Block_FPGA_Trip_Controller.h:270
virtual VOID Init()
Function block initialisation method.
Definition: Function_Block_FPGA_Trip_Controller.cpp:133
virtual VOID Execute()
Function block execution method.
Definition: Function_Block_FPGA_Trip_Controller.cpp:141
TBlock_Output_Connector object_u32_Trip_Request_1
Trip request status output 1.
Definition: Function_Block_FPGA_Trip_Controller.h:237
TBlock_Input_Connector object_bool_Reset
Reset signal input.
Definition: Function_Block_FPGA_Trip_Controller.h:221
U16 u16_Trip_Request_Latch_3
Trip request latch value 3.
Definition: Function_Block_FPGA_Trip_Controller.h:264
U16 u16_Trip_Request_Latch_4
Trip request latch value 4.
Definition: Function_Block_FPGA_Trip_Controller.h:267
TBlock_Output_Connector object_u32_Trip_Request_Latch_2
Trip request latch status output 2.
Definition: Function_Block_FPGA_Trip_Controller.h:234
TBlock_Output_Connector object_bool_Trip_Request_Output
Error output.
Definition: Function_Block_FPGA_Trip_Controller.h:228
TBlock_Output_Connector object_u32_Trip_Request_2
Trip request status output 2.
Definition: Function_Block_FPGA_Trip_Controller.h:240
TFunction_Block_FPGA_Trip_Controller_T0()
Class constructor method.
Definition: Function_Block_FPGA_Trip_Controller.cpp:71
TBlock_Output_Connector object_u32_Trip_Request_Latch_1
Trip request latch status output 1.
Definition: Function_Block_FPGA_Trip_Controller.h:231
U16 u16_Trip_Request_4
Trip request value 4.
Definition: Function_Block_FPGA_Trip_Controller.h:279
U16 u16_Trip_Request_Latch_2
Trip request latch value 2.
Definition: Function_Block_FPGA_Trip_Controller.h:261
TFPGA_Trip_Controller_Registers * struct_Registers
FPGA mapped registers.
Definition: Function_Block_FPGA_Trip_Controller.h:255
Function block FPGA trip request manager type 1 class.
Definition: Function_Block_FPGA_Trip_Controller.h:287
U16 u16_Trip_Request_3
Trip request value 3.
Definition: Function_Block_FPGA_Trip_Controller.h:487
U16 u16_Trip_Request_1
Trip request value 1.
Definition: Function_Block_FPGA_Trip_Controller.h:481
virtual VOID Send_Information(TProtocol_Base *object_Protocol)
Send detailed information about finction block.
Definition: Function_Block_FPGA_Trip_Controller.cpp:468
TBlock_Output_Connector object_u32_Trip_Request_Latch_1
Trip request latch status output 1.
Definition: Function_Block_FPGA_Trip_Controller.h:442
U16 u16_Trip_Request_Latch_1
Trip request latch value 1.
Definition: Function_Block_FPGA_Trip_Controller.h:469
virtual VOID Init()
Function block initialisation method.
Definition: Function_Block_FPGA_Trip_Controller.cpp:367
TBlock_Input_Connector object_bool_Reset
Reset signal input.
Definition: Function_Block_FPGA_Trip_Controller.h:432
U16 u16_Trip_Request_Latch_4
Trip request latch value 4.
Definition: Function_Block_FPGA_Trip_Controller.h:478
TBlock_Output_Connector object_u32_Trip_Request_1
Trip request status output 1.
Definition: Function_Block_FPGA_Trip_Controller.h:448
TFunction_Block_FPGA_Trip_Controller_T1()
Class constructor method.
Definition: Function_Block_FPGA_Trip_Controller.cpp:292
VOID Map(TFPGA_Trip_Controller_Registers *struct_Registers_Base_Address)
Hardware mapping method.
Definition: Function_Block_FPGA_Trip_Controller.cpp:355
U16 u16_Trip_Request_Latch_2
Trip request latch value 2.
Definition: Function_Block_FPGA_Trip_Controller.h:472
virtual ~TFunction_Block_FPGA_Trip_Controller_T1()
Class destructor method.
Definition: Function_Block_FPGA_Trip_Controller.cpp:347
U16 u16_Trip_Request_4
Trip request value 4.
Definition: Function_Block_FPGA_Trip_Controller.h:490
U16 u16_Trip_Request_Latch_3
Trip request latch value 3.
Definition: Function_Block_FPGA_Trip_Controller.h:475
virtual VOID Execute()
Function block execution method.
Definition: Function_Block_FPGA_Trip_Controller.cpp:379
TBlock_Output_Connector object_u32_Trip_Request_Latch_2
Trip request latch status output 2.
Definition: Function_Block_FPGA_Trip_Controller.h:445
U16 u16_Trip_Request_2
Trip request value 2.
Definition: Function_Block_FPGA_Trip_Controller.h:484
TBlock_Output_Connector object_u32_Trip_Request_2
Trip request status output 2.
Definition: Function_Block_FPGA_Trip_Controller.h:451
TFPGA_Trip_Controller_Registers * struct_Registers
FPGA mapped registers.
Definition: Function_Block_FPGA_Trip_Controller.h:466
TBlock_Output_Connector object_bool_Trip_Request_Output
Trip request output.
Definition: Function_Block_FPGA_Trip_Controller.h:439
Definition: Protocol_Base.h:57
Register structure for generic access.
Definition: Function_Block_FPGA_Trip_Controller.h:86
U16 u16_Reserve_C
0x0C : Not used
Definition: Function_Block_FPGA_Trip_Controller.h:125
U16 u16_Reserve_D
0x0D : Not used
Definition: Function_Block_FPGA_Trip_Controller.h:128
U16 u16_Trip_Request_2
0x09 : Trip request register 2
Definition: Function_Block_FPGA_Trip_Controller.h:116
U16 u16_Trip_Request_1
0x08 : Trip request register 1
Definition: Function_Block_FPGA_Trip_Controller.h:113
U16 u16_Trip_Request_Latch_4
0x07 : Trip request latch register 4
Definition: Function_Block_FPGA_Trip_Controller.h:110
U16 u16_Trip_Request_Latch_3
0x06 : Trip request latch register 3
Definition: Function_Block_FPGA_Trip_Controller.h:107
U16 u16_Unit_ID_L
0x00 : Unit identification L registers
Definition: Function_Block_FPGA_Trip_Controller.h:89
U16 u16_Control
0x02 : Control register
Definition: Function_Block_FPGA_Trip_Controller.h:95
U16 u16_Status
0x03 : Status register
Definition: Function_Block_FPGA_Trip_Controller.h:98
U16 u16_Trip_Request_Latch_2
0x05 : Trip request latch register 2
Definition: Function_Block_FPGA_Trip_Controller.h:104
U16 u16_Reserve_F
0x0F : Not used
Definition: Function_Block_FPGA_Trip_Controller.h:134
U16 u16_Trip_Request_Latch_1
0x04 : Trip request latch register 1
Definition: Function_Block_FPGA_Trip_Controller.h:101
U16 u16_Trip_Request_4
0x0B : Trip request register 4
Definition: Function_Block_FPGA_Trip_Controller.h:122
U16 u16_Reserve_E
0x0E : Not used
Definition: Function_Block_FPGA_Trip_Controller.h:131
U16 u16_Trip_Request_3
0x0A : Trip request register 3
Definition: Function_Block_FPGA_Trip_Controller.h:119
U16 u16_Unit_ID_H
0x01 : Unit identification H registers
Definition: Function_Block_FPGA_Trip_Controller.h:92
Definition: Function_Block_FPGA_Trip_Controller.h:297
U16 u16_Reserve_D
0x0D : Not used
Definition: Function_Block_FPGA_Trip_Controller.h:339
U16 u16_Trip_Request_Latch_4
0x07 : Trip request latch register 4
Definition: Function_Block_FPGA_Trip_Controller.h:321
U16 u16_Reserve_F
0x0F : Not used
Definition: Function_Block_FPGA_Trip_Controller.h:345
U16 u16_Trip_Request_Latch_1
0x04 : Trip request latch register 1
Definition: Function_Block_FPGA_Trip_Controller.h:312
U16 u16_Trip_Request_3
0x0A : Trip request register 3
Definition: Function_Block_FPGA_Trip_Controller.h:330
U16 u16_Trip_Request_2
0x09 : Trip request register 2
Definition: Function_Block_FPGA_Trip_Controller.h:327
U16 u16_Unit_ID_H
0x01 : Unit identification H registers
Definition: Function_Block_FPGA_Trip_Controller.h:303
U16 u16_Reserve_E
0x0E : Not used
Definition: Function_Block_FPGA_Trip_Controller.h:342
U16 u16_Control
0x02 : Control register
Definition: Function_Block_FPGA_Trip_Controller.h:306
U16 u16_Trip_Request_Latch_3
0x06 : Trip request latch register 3
Definition: Function_Block_FPGA_Trip_Controller.h:318
U16 u16_Trip_Request_1
0x08 : Trip request register 1
Definition: Function_Block_FPGA_Trip_Controller.h:324
U16 u16_Reserve_C
0x0C : Not used
Definition: Function_Block_FPGA_Trip_Controller.h:336
U16 u16_Unit_ID_L
0x00 : Unit identification L registers
Definition: Function_Block_FPGA_Trip_Controller.h:300
U16 u16_Trip_Request_4
0x0B : Trip request register 4
Definition: Function_Block_FPGA_Trip_Controller.h:333
U16 u16_Status
0x03 : Status register
Definition: Function_Block_FPGA_Trip_Controller.h:309
U16 u16_Trip_Request_Latch_2
0x05 : Trip request latch register 2
Definition: Function_Block_FPGA_Trip_Controller.h:315