Stima V4 Slave RAIN  4.2
sensors_config.h
Go to the documentation of this file.
1 
3 /*********************************************************************
4 <h2><center>&copy; Stimav4 is Copyright (C) 2023 ARPAE-SIMC urpsim@arpae.it</center></h2>
5 authors:
6 Marco Baldinetti <marco.baldinetti@digiteco.it>
7 Paolo patruno <p.patruno@iperbole.bologna.it>
8 
9 This program is free software; you can redistribute it and/or
10 modify it under the terms of the GNU General Public License
11 as published by the Free Software Foundation; either version 2
12 of the License, or (at your option) any later version.
13 
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 <http://www.gnu.org/licenses/>.
23 **********************************************************************/
24 
25 #ifndef _SENSORS_CONFIG_H
26 #define _SENSORS_CONFIG_H
27 
32 #define USE_REDUNDANT_SENSOR (false)
33 
38 #define USE_JSON (false)
39 
40 #define USE_D_TEMPLATE (false)
41 
46 #define USE_THR (false)
47 
52 #define USE_SENSOR_ADT (false)
53 
58 #define USE_SENSOR_HIH (false)
59 
64 #define USE_SENSOR_HYT (false)
65 
70 #define USE_SENSOR_SHT (false)
71 
76 #define USE_SENSOR_B28 (false)
77 
82 #define USE_SENSOR_DEP (false)
83 
88 #define USE_SENSOR_DES (false)
89 
94 #define USE_SENSOR_DED (false)
95 
100 #define USE_SENSOR_GWS (false)
101 
106 #define USE_SENSOR_DSR (false)
107 
112 #define USE_SENSOR_VSR (false)
113 
118 #define USE_SENSOR_DSA (false)
119 
124 #define USE_SENSOR_DWA (false)
125 
130 #define USE_SENSOR_DWB (false)
131 
136 #define USE_SENSOR_DWC (false)
137 
142 #define USE_SENSOR_DWD (false)
143 
148 #define USE_SENSOR_DWE (false)
149 
154 #define USE_SENSOR_DWF (false)
155 
160 #define USE_SENSOR_OA2 (false)
161 #define USE_SENSOR_OA3 (false)
162 
167 #define USE_SENSOR_OB2 (false)
168 #define USE_SENSOR_OB3 (false)
169 
174 #define USE_SENSOR_OCX_ODX_FULL_BIN (false)
175 #define USE_SENSOR_OC2 (false)
176 #define USE_SENSOR_OC3 (false)
177 
182 #define USE_SENSOR_OD2 (false)
183 #define USE_SENSOR_OD3 (false)
184 
189 #define USE_SENSOR_OE3 (false)
190 
191 #define USE_SENSOR_GAS (false)
196 #define USE_SENSOR_CO2 (false)
197 
202 #define USE_SENSOR_NO2 (false)
203 
208 #define USE_SENSOR_O3 (false)
209 
214 #define USE_SENSOR_CO (false)
215 
220 #define USE_SENSOR_EX (false)
221 
226 #define USE_SENSOR_LWT (false)
227 
232 #define USE_SENSOR_HI7 (false)
233 
238 #define USE_SENSOR_BMP (false)
239 
244 #define USE_SENSOR_DW1 (false)
245 
250 #define USE_SENSOR_TBS (false)
251 
256 #define USE_SENSOR_TBR (true)
257 
262 #define USE_SENSOR_STH (false)
263 
268 #define USE_SENSOR_ITH (false)
269 
274 #define USE_SENSOR_NTH (false)
275 
280 #define USE_SENSOR_MTH (false)
281 
286 #define USE_SENSOR_XTH (false)
287 
292 #define USE_SENSOR_SSD (false)
293 
298 #define USE_SENSOR_ISD (false)
299 
304 #define USE_SENSOR_NSD (false)
305 
310 #define USE_SENSOR_MSD (false)
311 
316 #define USE_SENSOR_XSD (false)
317 
322 #define USE_SENSOR_SMI (false)
323 
328 #define USE_SENSOR_IMI (false)
329 
334 #define USE_SENSOR_NMI (false)
335 
340 #define USE_SENSOR_MMI (false)
341 
346 #define USE_SENSOR_XMI (false)
347 
352 #define USE_SENSOR_RF24 (false)
353 
354 // OPC
355 #define VALUES_TO_READ_FROM_SENSOR_COUNT (2)
356 #define JSONS_TO_READ_FROM_SENSOR_COUNT (2)
357 
358 // OPC
359 // #define VALUES_TO_READ_FROM_SENSOR_COUNT (24)
360 // #define JSONS_TO_READ_FROM_SENSOR_COUNT (1)
361 
362 #define USE_TH_SENSORS (USE_SENSOR_ADT + USE_SENSOR_HIH + USE_SENSOR_HYT + USE_SENSOR_SHT + USE_SENSOR_STH + USE_SENSOR_ITH + USE_SENSOR_MTH + USE_SENSOR_NTH + USE_SENSOR_XTH)
363 #define USE_RAIN_SENSORS (USE_SENSOR_TBR + USE_SENSOR_TBS)
364 #define USE_RADIAITION_SENSORS (USE_SENSOR_DSR + USE_SENSOR_VSR + USE_SENSOR_DSA)
365 #define USE_WIND_SENSORS (USE_SENSOR_DWA + USE_SENSOR_DWB + USE_SENSOR_DWC + USE_SENSOR_DWD + USE_SENSOR_DWE + USE_SENSOR_DWF)
366 #define USE_POWER_MPPT_SENSORS (USE_SENSOR_DEP)
367 
368 #if (USE_TH_SENSORS && (USE_RAIN_SENSORS == 0))
369 #define USE_MODULE_TH (true)
370 #elif ((USE_TH_SENSORS == 0) && USE_RAIN_SENSORS)
371 #define USE_MODULE_RAIN (true)
372 #elif (USE_TH_SENSORS && USE_RAIN_SENSORS && USE_THR)
373 #define USE_MODULE_THR (true)
374 #elif (USE_RADIAITION_SENSORS)
375 #define USE_MODULE_SOLAR_RADIATION (true)
376 #elif (USE_WIND_SENSORS)
377 #define USE_MODULE_WIND (true)
378 #elif (USE_POWER_MPPT_SENSORS)
379 #define USE_MODULE_POWER_MPPT (true)
380 #endif
381 
382 #if USE_TH_SENSORS
383 #define SENSORS_COUNT_MAX (USE_SENSOR_HYT + USE_SENSOR_SHT + USE_REDUNDANT_SENSOR)
384 #else
385 #define SENSORS_COUNT_MAX 1
386 #endif
387 
392 #define SENSORS_MAX (SENSORS_COUNT_MAX)
393 
399 #define SENSORS_UNIQUE_MAX (1)
400 
401 #endif