/************************************************************************** * * Copyright (c) 2019-2020 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 ModeHeatDisinfect.c * * @author (last) Quang Nguyen * @date (last) 01-Sep-2020 * * @author (original) Sean * @date (original) 20-Apr-2020 * ***************************************************************************/ #include "ModeHeatDisinfect.h" #include "OperationModes.h" #include "Pressures.h" /** * @addtogroup DGHeatDisinfectMode * @{ */ // ********** private definitions ********** // ********** private data ********** static DG_HEAT_DISINFECT_STATE_T heatState = DG_HEAT_DISINFECT_STATE_START; ///< Currently active heat disinfect state. // ********** private function prototypes ********** /*********************************************************************//** * @brief * The initHeatDisinfectMode function initializes the heat disinfect mode module. * @details Inputs: none * @details Outputs: Initialized heat disinfect mode module * @return none *************************************************************************/ void initHeatDisinfectMode( void ) { heatState = DG_HEAT_DISINFECT_STATE_START; } /*********************************************************************//** * @brief * The transitionToHeatDisinfectMode function prepares for transition to heat disinfect mode. * @details Inputs: none * @details Outputs: Prepare for transition to heat disinfect mode * @return none *************************************************************************/ void transitionToHeatDisinfectMode( void ) { initHeatDisinfectMode(); } /*********************************************************************//** * @brief * The execHeatDisinfectMode function executes the heat disinfect mode state machine. * @details Inputs: none * @details Outputs: Heat disinfect mode state machine executed * @return current state *************************************************************************/ U32 execHeatDisinfectMode( void ) { checkInletPressureFault(); // execute current heat disinfect state switch ( heatState ) { case DG_HEAT_DISINFECT_STATE_START: break; default: // TODO - s/w fault heatState = DG_HEAT_DISINFECT_STATE_START; break; } return heatState; } /*********************************************************************//** * @brief * The getCurrentHeatDisinfectState function returns the current state of the * heat disinfect mode. * @details Inputs: heatState * @details Outputs: none * @return the current state of heat disinfect mode. *************************************************************************/ DG_HEAT_DISINFECT_STATE_T getCurrentHeatDisinfectState( void ) { return heatState; } /**@}*/