/************************************************************************** * * 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 ModeChemicalDisinfect.c * * @author (last) Sean Nash * @date (last) 26-May-2020 * * @author (original) Sean * @date (original) 04-Apr-2020 * ***************************************************************************/ #include "ModeChemicalDisinfect.h" #include "OperationModes.h" /** * @addtogroup DGChemicalDisinfectMode * @{ */ // ********** private definitions ********** // ********** private data ********** static DG_CHEM_DISINFECT_STATE_T chemState = DG_CHEM_DISINFECT_STATE_START; ///< Currently active chemical disinfect state. // ********** private function prototypes ********** /*********************************************************************//** * @brief * The initChemicalDisinfectMode function initializes the chemical disinfect Mode module. * @details * Inputs : none * Outputs : Module initialized. * @return none *************************************************************************/ void initChemicalDisinfectMode( void ) { chemState = DG_CHEM_DISINFECT_STATE_START; } /*********************************************************************//** * @brief * The transitionToChemicalDisinfectMode function prepares for transition to \n * chemical disinfect mode. * @details * Inputs : none * Outputs : none * @return none *************************************************************************/ void transitionToChemicalDisinfectMode( void ) { initChemicalDisinfectMode(); } /*********************************************************************//** * @brief * The execChemicalDisinfectMode function executes the chemical disinfect Mode state machine. * @details * Inputs : none * Outputs : none * @return current state. *************************************************************************/ U32 execChemicalDisinfectMode( void ) { // execute current chemical disinfect state switch ( chemState ) { case DG_CHEM_DISINFECT_STATE_START: break; default: // TODO - s/w fault chemState = DG_CHEM_DISINFECT_STATE_START; break; } return chemState; } /*********************************************************************//** * @brief * The getCurrentChemicalDisinfectState function returns the current state of the \n * chemical disinfect mode. * @details * Inputs : chemState * Outputs : none * @return the current state of chemical disinfect mode. *************************************************************************/ DG_CHEM_DISINFECT_STATE_T getCurrentChemicalDisinfectState( void ) { return chemState; } /**@}*/