/************************************************************************** * * Copyright (c) 2020-2023 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file UVReactors.h * * @author (last) Dara Navaei * @date (last) 17-Jan-2023 * * @author (original) Dara Navaei * @date (original) 24-Nov-2020 * ***************************************************************************/ #ifndef APP_CONTROLLERS_UVREACTORS_H_ #define APP_CONTROLLERS_UVREACTORS_H_ #include "Common.h" /** * @defgroup UV Reactors UV Reactors * @brief UV reactors driver module. * Controls the inlet and outlet of Acuva Strike II-B21 V10K L60 M UV-LED reactors. * EN: 50581:2012. The reactors have and On/Off switch and a health pin. * * @addtogroup UV Reactors * @{ */ /// UV reactors names typedef enum uv_reactors_names { INLET_UV_REACTOR = 0, ///< Inlet UV reactor OUTLET_UV_REACTOR, ///< Outlet UV reactor NUM_OF_UV_REACTORS, ///< Number of UV reactors } UV_REACTORS_T; /// List of reactor states. typedef enum Switch_States { TURN_OFF = 0, ///< Turn off TURN_ON, ///< Turn on } UV_REACTOR_STATES_T; /// UV reactors health status typedef enum uv_reactors_health_status { UV_REACTOR_NOT_HEALTHY = 0, ///< UV reactor unhealthy UV_REACTOR_HEALTHY, ///< UV reactor healthy UV_REACTOR_OFF, ///< UV reactor off NUM_OF_REACTORS_HEALTH_STATUS, ///< Number of UV reactors health status }UV_REACTORS_HEALTH_STATUS_T; /// UV reactors data publish typedef struct { U32 inletUVReactorHealthStatus; ///< Inlet UV reactor health status U32 outletUVReactorHealthStatus; ///< Outlet UV reactor health status U32 inletUVReactorState; ///< Inlet UV reactor state U32 outletUVReactorState; ///< Outlet UV reactor state } UV_REACTORS_DATA_T; void initUVReactors( void ); SELF_TEST_STATUS_T execUVReactorsSelfTest( void ); void execUVReactors( void ); UV_REACTORS_HEALTH_STATUS_T getUVReactorHealth( UV_REACTORS_T reactor ); BOOL turnOnUVReactor( UV_REACTORS_T reactor ); BOOL turnOffUVReactor( UV_REACTORS_T reactor ); void resetUVReactorsPOSTState( void ); BOOL testSetReactorsDataPublishInterval( U32 value ); BOOL testResetReactorsDataPublishInterval( void ); BOOL testSetUVReactorHealthOverride( U32 reactor, U32 health ); BOOL testResetUVReactorHealthOverride( U32 reactor ); /**@}*/ #endif