ConOpSys V2970  P004.07
ANVILEX control operating system
Function_Block_Temperature_Monitor.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 //! @file Function_Block_Temperature_Monitor.h
3 //! @URL $HeadURL: https://192.168.3.4:8443/svn/P004_07/ConOpSys/Blocks/Function_Block_Temperature_Monitor.h $
4 //! @author $Author: minch $ (ANVILEX GmbH)
5 //! @version $Revision: 2904 $
6 //! @date $Date: 2021-12-02 02:39:23 +0500 (Do, 02 Dez 2021) $
7 //! @brief Temperature monitor class header file.
8 //! @attention
9 //!
10 //! COPYRIGHT(C) 2015 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 
59 //------------------------------------------------------------------------------
60 // Include ConOpSys application header files
61 //------------------------------------------------------------------------------
62 
63 //------------------------------------------------------------------------------
64 // Class definitions
65 //------------------------------------------------------------------------------
66 
67 //! @brief Temperature monitor class
69 {
70 
71  //----------------------------------------------------------------------------
72  // Public defines, methods and variables
73  //----------------------------------------------------------------------------
74 
75  public:
76 
77  //!-------------------------------------------------------------------------
78  //! @brief Class constructor method.
79  //! @note None
80  //! \par Override
81  //! Not allowed
82  //! @attention Don't call this method directly.
83  //--------------------------------------------------------------------------
84 
86 
87  //!-------------------------------------------------------------------------
88  //! @brief Function block class destructor method.
89  //! @note None
90  //! \par Override
91  //! Not allowed
92  //! @attention Don't call this method directly.
93  //--------------------------------------------------------------------------
94 
96 
97  //!-------------------------------------------------------------------------
98  //! @brief Function block initialisation method.
99  //! @note None
100  //! \par Override
101  //! Not allowed
102  //! @attention None
103  //--------------------------------------------------------------------------
104 
105  virtual VOID Init();
106 
107  //!-------------------------------------------------------------------------
108  //! @brief Function block execution method.
109  //! @note None
110  //! \par Override
111  //! Not allowed
112  //! @attention None
113  //--------------------------------------------------------------------------
114 
115  virtual VOID Execute();
116 
117  //!-------------------------------------------------------------------------
118  //! @brief Send information about Function block over communication link protocol
119  //! @note This method sends information about Function block over specified communication link protocol.
120  //! @param [in] *object_Protocol - Pointer to the communication link protocol
121  //! @return None
122  //! \par Override
123  //! Not allowed
124  //! @attention None
125  //--------------------------------------------------------------------------
126 
127  virtual VOID Send_Information( TProtocol_Base *object_Protocol );
128 
129  //--------------------------------------------------------------------------
130  // Function block parameter connectors
131  //--------------------------------------------------------------------------
132 
133  //! @brief Function block sample time input parameter
135 
136  //! @brief Low temperature warning level input parameter
138 
139  //! @brief Low temperature trip level input parameter
141 
142  //! @brief Low temperature trip delay input parameter
144 
145  //! @brief High temperature warning level input parameter
147 
148  //! @brief High temperature trip level input parameter
150 
151  //! @brief High temperature trip delay input parameter
153 
154  //--------------------------------------------------------------------------
155  // Function block input connectors
156  //--------------------------------------------------------------------------
157 
158  //! @brief Actual ambient temperature input connector
160 
161  //! @brief Invalid temperature status flag
163 
164  //--------------------------------------------------------------------------
165  // Function block output connectors
166  //--------------------------------------------------------------------------
167 
168 // ANVILEX KM: Not used now.
169 // //! @brief Enable fan
170 // TBlock_Output_Connector object_bool_Fan_Enable;
171 
172  //! @brief Low temperature warning output connector
174 
175  //! @brief Low temperature alarm output connector
177 
178  //! @brief Low temperature trip output connector
180 
181  //! @brief High temperature warning output connector
183 
184  //! @brief High temperature alarm output connector
186 
187  //! @brief High temperature trip output connector
189 
190  //! @brief Low or high temperature warning output connector
192 
193  //! @brief Low or high temperature alarm output connector
195 
196  //! @brief Low or high temperature trip output connector
198 
199  //! @brief Status output connector
201 
202  //----------------------------------------------------------------------------
203  // Protected defines, methods and variables
204  //----------------------------------------------------------------------------
205 
206  protected:
207 
208  //----------------------------------------------------------------------------
209  // Private defines, methods and variables
210  //----------------------------------------------------------------------------
211 
212  private:
213 
214  //--------------------------------------------------------------------------
215  // Private defines
216  //--------------------------------------------------------------------------
217 
218  //! @brief Status word register structure
219  typedef union
220  {
221 
222  //! @brief Status word register raw data
224 
225  //! @brief Status word register as bit structure
226  struct
227  {
228 
229  //! @brief Bit 0 : Invalid temperature
231 
232  //! @brief Bit 1 : Low temperature warning
234 
235  //! @brief Bit 2 : Low temperature alarm
237 
238  //! @brief Bit 3 : Low temperature trip
240 
241  //! @brief Bit 4 : High temperature warning
243 
244  //! @brief Bit 5 : High temperature alarm
246 
247  //! @brief Bit 6 : High temperature trip
249 
250  //!< Bits 7-15 : Not used bits
251  U16 :9;
252 
253  };
254 
255  } TStatus_Word;
256 
257  //--------------------------------------------------------------------------
258  // Private variables
259  //--------------------------------------------------------------------------
260 
261  //! @brief Low temperature trip delay
263 
264  //! @brief High temperature trip delay
266 
267  //! @brief Low temperature trip delay counter
269 
270  //! @brief High temperature trip delay counter
272 
273 };
274 
275 //------------------------------------------------------------------------------
276 // End of file
277 //------------------------------------------------------------------------------
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 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
Temperature monitor class.
Definition: Function_Block_Temperature_Monitor.h:69
TBlock_Output_Connector object_bool_Temperature_Warning
Low or high temperature warning output connector.
Definition: Function_Block_Temperature_Monitor.h:191
TBlock_Output_Connector object_bool_High_Temperature_Warning
High temperature warning output connector.
Definition: Function_Block_Temperature_Monitor.h:182
TBlock_Input_Connector object_f32_High_Temperature_Trip_Delay
High temperature trip delay input parameter.
Definition: Function_Block_Temperature_Monitor.h:152
TBlock_Output_Connector object_bool_Low_Temperature_Warning
Low temperature warning output connector.
Definition: Function_Block_Temperature_Monitor.h:173
U32 u32_Low_Temperature_Trip_Delay_Counter
Low temperature trip delay counter.
Definition: Function_Block_Temperature_Monitor.h:268
TBlock_Output_Connector object_bool_Temperature_Alarm
Low or high temperature alarm output connector.
Definition: Function_Block_Temperature_Monitor.h:194
TBlock_Input_Connector object_f32_High_Temperature_Trip_Level
High temperature trip level input parameter.
Definition: Function_Block_Temperature_Monitor.h:149
virtual VOID Init()
Function block initialisation method.
Definition: Function_Block_Temperature_Monitor.cpp:119
TBlock_Output_Connector object_bool_High_Temperature_Trip
High temperature trip output connector.
Definition: Function_Block_Temperature_Monitor.h:188
virtual ~TFunction_Block_Temperature_Monitor()
Function block class destructor method.
Definition: Function_Block_Temperature_Monitor.cpp:111
virtual VOID Execute()
Function block execution method.
Definition: Function_Block_Temperature_Monitor.cpp:164
TBlock_Input_Connector object_f32_Actual_Temperature
Actual ambient temperature input connector.
Definition: Function_Block_Temperature_Monitor.h:159
TBlock_Output_Connector object_bool_High_Temperature_Alarm
High temperature alarm output connector.
Definition: Function_Block_Temperature_Monitor.h:185
TBlock_Input_Connector object_f32_Low_Temperature_Trip_Delay
Low temperature trip delay input parameter.
Definition: Function_Block_Temperature_Monitor.h:143
TBlock_Input_Connector object_f32_Sample_Time
Function block sample time input parameter.
Definition: Function_Block_Temperature_Monitor.h:134
U32 u32_High_Temperature_Trip_Delay_Counter
High temperature trip delay counter.
Definition: Function_Block_Temperature_Monitor.h:271
TBlock_Input_Connector object_bool_Invalid_Temperature
Invalid temperature status flag.
Definition: Function_Block_Temperature_Monitor.h:162
TBlock_Input_Connector object_f32_Low_Temperature_Trip_Level
Low temperature trip level input parameter.
Definition: Function_Block_Temperature_Monitor.h:140
TBlock_Output_Connector object_bool_Temperature_Trip
Low or high temperature trip output connector.
Definition: Function_Block_Temperature_Monitor.h:197
U32 u32_Low_Temperature_Trip_Delay
Low temperature trip delay.
Definition: Function_Block_Temperature_Monitor.h:262
TBlock_Output_Connector object_bool_Low_Temperature_Trip
Low temperature trip output connector.
Definition: Function_Block_Temperature_Monitor.h:179
TBlock_Input_Connector object_f32_High_Temperature_Warning_Level
High temperature warning level input parameter.
Definition: Function_Block_Temperature_Monitor.h:146
TFunction_Block_Temperature_Monitor()
Class constructor method.
Definition: Function_Block_Temperature_Monitor.cpp:64
TBlock_Output_Connector object_bool_Low_Temperature_Alarm
Low temperature alarm output connector.
Definition: Function_Block_Temperature_Monitor.h:176
U32 u32_High_Temperature_Trip_Delay
High temperature trip delay.
Definition: Function_Block_Temperature_Monitor.h:265
TBlock_Output_Connector object_u16_Status
Status output connector.
Definition: Function_Block_Temperature_Monitor.h:200
virtual VOID Send_Information(TProtocol_Base *object_Protocol)
Send information about Function block over communication link protocol.
Definition: Function_Block_Temperature_Monitor.cpp:328
TBlock_Input_Connector object_f32_Low_Temperature_Warning_Level
Low temperature warning level input parameter.
Definition: Function_Block_Temperature_Monitor.h:137
Definition: Protocol_Base.h:57
U16 bit_High_Temperature_Trip
Bit 6 : High temperature trip.
Definition: Function_Block_Temperature_Monitor.h:248
U16 bit_Invalid_Temperature
Bit 0 : Invalid temperature.
Definition: Function_Block_Temperature_Monitor.h:230
U16 bit_Low_Temperature_Alarm
Bit 2 : Low temperature alarm.
Definition: Function_Block_Temperature_Monitor.h:236
U16 bit_High_Temperature_Alarm
Bit 5 : High temperature alarm.
Definition: Function_Block_Temperature_Monitor.h:245
U16 bit_Low_Temperature_Trip
Bit 3 : Low temperature trip.
Definition: Function_Block_Temperature_Monitor.h:239
U16 bit_High_Temperature_Warning
Bit 4 : High temperature warning.
Definition: Function_Block_Temperature_Monitor.h:242
U16 bit_Low_Temperature_Warning
Bit 1 : Low temperature warning.
Definition: Function_Block_Temperature_Monitor.h:233
U16 u16_Word
Status word register raw data.
Definition: Function_Block_Temperature_Monitor.h:223