ConOpSys V2970  P004.07
ANVILEX control operating system
KG3_PLC.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file KG3_PLC.h
3 //! @author ANVILEX GmbH
4 //! @version V1.0
5 //! @date 02.11.2018
6 //! @brief Function block template class header file.
7 //! @attention
8 //!
9 //! COPYRIGHT(C) 2018 ANVILEX GmbH
10 //!
11 //! Redistribution and use in source and binary forms, with or without
12 //! modification, are permitted provided that the following conditions are met:
13 //!
14 //! 1. Redistributions of source code must retain the above copyright notice,
15 //! this list of conditions and the following disclaimer.
16 //!
17 //! 2. Redistributions in binary form must reproduce the above copyright notice,
18 //! this list of conditions and the following disclaimer in the documentation
19 //! and/or other materials provided with the distribution.
20 //!
21 //! 3. Neither the name of ANVILEX nor the names of its contributors may be
22 //! used to endorse or promote products derived from this software without
23 //! specific prior written permission.
24 //!
25 //! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 //! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 //! IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 //! ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
29 //! LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 //! CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 //! SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 //! INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 //! CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 //! ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 //! POSSIBILITY OF SUCH DAMAGE.
36 //------------------------------------------------------------------------------
37 
38 //------------------------------------------------------------------------------
39 // Protecting header files from mutual, recursive inclusion.
40 //------------------------------------------------------------------------------
41 
42 #pragma once
43 
44 //------------------------------------------------------------------------------
45 // Include standard libraries header files
46 //------------------------------------------------------------------------------
47 
48 //------------------------------------------------------------------------------
49 // Include thrid party header files
50 //------------------------------------------------------------------------------
51 
52 //------------------------------------------------------------------------------
53 // Include ConOpSys header files
54 //------------------------------------------------------------------------------
55 
56 #include "Function_Block_Base.h"
57 
58 //------------------------------------------------------------------------------
59 // Include ConOpSys application header files
60 //------------------------------------------------------------------------------
61 
62 //------------------------------------------------------------------------------
63 // Macros
64 //------------------------------------------------------------------------------
65 
66 //------------------------------------------------------------------------------
67 // Class declarations
68 //------------------------------------------------------------------------------
69 
70 //! @brief Power line communication class, type 0 declaration
72 {
73 
74  //----------------------------------------------------------------------------
75  // Public defines, variables and methods
76  //----------------------------------------------------------------------------
77 
78  public:
79 
80  //--------------------------------------------------------------------------
81  // Public defines
82  //--------------------------------------------------------------------------
83 
84  //! @brief Register structure for generic access
85  typedef struct
86  {
87 
88  //! @brief 0x00 : Module identification register
90 
91  //! @brief 0x01 : Module identification register
93 
94  //! @brief 0x02 : Module carrier halfperiod register
96 
97  //! @brief 0x03 : Module modulation halfperiod register
99 
101 
102  //!-------------------------------------------------------------------------
103  //! @brief Function block class constructor method.
104  //! @note None
105  //! \par Override
106  //! Not allowed
107  //! @attention Don't call this method directly.
108  //--------------------------------------------------------------------------
109 
110  TKG3_PLC_T0();
111 
112  //!-------------------------------------------------------------------------
113  //! @brief Function block class desstructor method.
114  //! @note None
115  //! \par Override
116  //! Not allowed
117  //! @attention Don't call this method directly.
118  //--------------------------------------------------------------------------
119 
120  ~TKG3_PLC_T0();
121 
122  //!-------------------------------------------------------------------------
123  //! @brief Hardware mapping method.
124  //! @note None
125  //! @param [in] *struct_Registers_Base_Address - Base adress to register structure mapping
126  //! \par Override
127  //! Not allowed
128  //! @attention None
129  //--------------------------------------------------------------------------
130 
131  VOID Map( TKG3_PLC_Registers *struct_Registers_Base_Address );
132 
133  //!-------------------------------------------------------------------------
134  //! @brief Function block initialisation method.
135  //! @note None
136  //! \par Override
137  //! Not allowed
138  //! @attention None
139  //--------------------------------------------------------------------------
140 
141  virtual VOID Init();
142 
143  //!-------------------------------------------------------------------------
144  //! @brief Function block execution method.
145  //! @note None
146  //! \par Override
147  //! Not allowed
148  //! @attention None
149  //--------------------------------------------------------------------------
150 
151  virtual VOID Execute();
152 
153  //!-------------------------------------------------------------------------
154  //! @brief Send information about driver over communication link protocol
155  //! @note This method sends information about driver over specified communication link protocol.
156  //! @param [in] *object_Protocol - Pointer to the communication link protocol
157  //! @return None
158  //! \par Override
159  //! Not allowed
160  //! @attention None
161  //--------------------------------------------------------------------------
162 
163  virtual VOID Send_Information( TProtocol_Base *object_Protocol );
164 
165  //--------------------------------------------------------------------------
166  // Function block parameters
167  //--------------------------------------------------------------------------
168 
169  //--------------------------------------------------------------------------
170  // Function block inputs
171  //--------------------------------------------------------------------------
172 
173  //! @brief Carrier halfperiod
175 
176  //! @brief Modulation halfperiod
178 
179  //--------------------------------------------------------------------------
180  // Function block outputs
181  //--------------------------------------------------------------------------
182 
183  //----------------------------------------------------------------------------
184  // Protected defines, variables and methods
185  //----------------------------------------------------------------------------
186 
187  protected:
188 
189  //----------------------------------------------------------------------------
190  // Private defines, variables and methods
191  //----------------------------------------------------------------------------
192 
193  private:
194 
195  //! @brief Pointer to the memory area in FPGA address space
197 
198 };
199 
200 //------------------------------------------------------------------------------
201 
202 //! @brief Power line communication class, type 1 declaration
204 {
205 
206  //----------------------------------------------------------------------------
207  // Public defines, variables and methods
208  //----------------------------------------------------------------------------
209 
210  public:
211 
212  //--------------------------------------------------------------------------
213  // Public defines
214  //--------------------------------------------------------------------------
215 
216  //! @brief Register structure for generic access
217  typedef struct
218  {
219 
220  //! @brief 0x00 : Module identification register
222 
223  //! @brief 0x01 : Module identification register
225 
227 
228  //!-------------------------------------------------------------------------
229  //! @brief Function block class constructor method.
230  //! @note None
231  //! \par Override
232  //! Not allowed
233  //! @attention Don't call this method directly.
234  //--------------------------------------------------------------------------
235 
236  TKG3_PLC_T1();
237 
238  //!-------------------------------------------------------------------------
239  //! @brief Function block class desstructor method.
240  //! @note None
241  //! \par Override
242  //! Not allowed
243  //! @attention Don't call this method directly.
244  //--------------------------------------------------------------------------
245 
246  ~TKG3_PLC_T1();
247 
248  //!-------------------------------------------------------------------------
249  //! @brief Hardware mapping method.
250  //! @note None
251  //! @param [in] *struct_Registers_Base_Address - Base adress to register structure mapping
252  //! \par Override
253  //! Not allowed
254  //! @attention None
255  //--------------------------------------------------------------------------
256 
257  VOID Map( TKG3_PLC_Registers *struct_Registers_Base_Address );
258 
259  //!-------------------------------------------------------------------------
260  //! @brief Function block initialisation method.
261  //! @note None
262  //! \par Override
263  //! Not allowed
264  //! @attention None
265  //--------------------------------------------------------------------------
266 
267  virtual VOID Init();
268 
269  //!-------------------------------------------------------------------------
270  //! @brief Function block execution method.
271  //! @note None
272  //! \par Override
273  //! Not allowed
274  //! @attention None
275  //--------------------------------------------------------------------------
276 
277  virtual VOID Execute();
278 
279  //!-------------------------------------------------------------------------
280  //! @brief Send information driver over communication link protocol
281  //! @note This method sends information about driver over specified communication link protocol.
282  //! @param [in] *object_Protocol - Pointer to the communication link protocol
283  //! @return None
284  //! \par Override
285  //! Not allowed
286  //! @attention None
287  //--------------------------------------------------------------------------
288 
289  virtual VOID Send_Information( TProtocol_Base *object_Protocol );
290 
291  //--------------------------------------------------------------------------
292  // Function block parameters
293  //--------------------------------------------------------------------------
294 
295  //--------------------------------------------------------------------------
296  // Function block inputs
297  //--------------------------------------------------------------------------
298 
299  //--------------------------------------------------------------------------
300  // Function block outputs
301  //--------------------------------------------------------------------------
302 
303  //----------------------------------------------------------------------------
304  // Protected defines, variables and methods
305  //----------------------------------------------------------------------------
306 
307  protected:
308 
309  //----------------------------------------------------------------------------
310  // Private defines, variables and methods
311  //----------------------------------------------------------------------------
312 
313  private:
314 
315  //! @brief Pointer to the memory area in FPGA address space
317 
318 };
319 
320 //------------------------------------------------------------------------------
321 // End of file
322 //------------------------------------------------------------------------------
#define NULL
Definition: Defines.h:388
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 base class for device.
Definition: Function_Block_Base.h:96
Power line communication class, type 0 declaration.
Definition: KG3_PLC.h:72
TBlock_Input_Connector object_u16_Set_Point_Modulation_Halfperiod
Modulation halfperiod.
Definition: KG3_PLC.h:177
virtual VOID Send_Information(TProtocol_Base *object_Protocol)
Send information about driver over communication link protocol.
Definition: KG3_PLC.cpp:144
TKG3_PLC_T0()
Function block class constructor method.
Definition: KG3_PLC.cpp:64
TBlock_Input_Connector object_u16_Set_Point_Carrier_Halfperiod
Carrier halfperiod.
Definition: KG3_PLC.h:174
VOID Map(TKG3_PLC_Registers *struct_Registers_Base_Address)
Hardware mapping method.
Definition: KG3_PLC.cpp:103
volatile TKG3_PLC_Registers * struct_Registers
Pointer to the memory area in FPGA address space.
Definition: KG3_PLC.h:196
virtual VOID Execute()
Function block execution method.
Definition: KG3_PLC.cpp:131
~TKG3_PLC_T0()
Function block class desstructor method.
Definition: KG3_PLC.cpp:95
virtual VOID Init()
Function block initialisation method.
Definition: KG3_PLC.cpp:118
Power line communication class, type 1 declaration.
Definition: KG3_PLC.h:204
~TKG3_PLC_T1()
Function block class desstructor method.
Definition: KG3_PLC.cpp:193
volatile TKG3_PLC_Registers * struct_Registers
Pointer to the memory area in FPGA address space.
Definition: KG3_PLC.h:316
virtual VOID Send_Information(TProtocol_Base *object_Protocol)
Send information driver over communication link protocol.
Definition: KG3_PLC.cpp:232
VOID Map(TKG3_PLC_Registers *struct_Registers_Base_Address)
Hardware mapping method.
Definition: KG3_PLC.cpp:201
TKG3_PLC_T1()
Function block class constructor method.
Definition: KG3_PLC.cpp:168
virtual VOID Init()
Function block initialisation method.
Definition: KG3_PLC.cpp:216
virtual VOID Execute()
Function block execution method.
Definition: KG3_PLC.cpp:224
Definition: Protocol_Base.h:57
Register structure for generic access.
Definition: KG3_PLC.h:86
U16 u16_Unit_ID_L
0x00 : Module identification register
Definition: KG3_PLC.h:89
U16 u16_Carrier_Halfperiod
0x02 : Module carrier halfperiod register
Definition: KG3_PLC.h:95
U16 u16_Modulation_Halfperiod
0x03 : Module modulation halfperiod register
Definition: KG3_PLC.h:98
U16 u16_Unit_ID_H
0x01 : Module identification register
Definition: KG3_PLC.h:92
Register structure for generic access.
Definition: KG3_PLC.h:218
U16 u16_Unit_ID_H
0x01 : Module identification register
Definition: KG3_PLC.h:224
U16 u16_Unit_ID_L
0x00 : Module identification register
Definition: KG3_PLC.h:221