Index: firmware/App/Modes/ModeHeatDisinfectActiveCool.h =================================================================== diff -u -r73c6b6fb7bbb934277157ce1e218358c573a6af1 -r7d4711edd7b40cd3e29f43e766f79a8a09586fe9 --- firmware/App/Modes/ModeHeatDisinfectActiveCool.h (.../ModeHeatDisinfectActiveCool.h) (revision 73c6b6fb7bbb934277157ce1e218358c573a6af1) +++ firmware/App/Modes/ModeHeatDisinfectActiveCool.h (.../ModeHeatDisinfectActiveCool.h) (revision 7d4711edd7b40cd3e29f43e766f79a8a09586fe9) @@ -1,3 +1,19 @@ +/************************************************************************** +* +* Copyright (c) 2022-2024 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 ModeHeatDisinfectActiveCool.h +* +* @author (last) Dara Navaei +* @date (last) 13-Mar-2023 +* +* @author (original) Dara Navaei +* @date (original) 18-Dec-2022 +* +***************************************************************************/ #ifndef APP_MODES_MODEHEATDISINFECTACTIVECOOL_H_ @@ -16,15 +32,34 @@ // ********** public definitions ********** +#define RSRVRS_FULL_STABLE_TIME_COUNT ( ( 4 * MS_PER_SECOND ) / TASK_GENERAL_INTERVAL ) ///< Reservoirs 1 & 2 full stable time in counts. + /// Heat disinfect active cool data publish struct typedef struct { - U32 heatDisinfectActivCoolState; ///< Heat disinfect active cool state. - U32 overallElapsedTime; ///< Overall elapsed time in heat disinfect active cool mode. - U32 stateElapsedTime; ///< Current heat disinfect active cool elapsed time. - U32 cancellationMode; ///< Heat disinfect active cool cancellation mode. + U32 heatDisinfectActivCoolState; ///< Heat disinfect active cool state. + U32 overallElapsedTime; ///< Overall elapsed time in heat disinfect active cool mode. + U32 stateElapsedTime; ///< Current heat disinfect active cool elapsed time. + U32 cancellationMode; ///< Heat disinfect active cool cancellation mode. } MODE_HEAT_DISINFECT_ACTIVE_COOL_DATA_T; +/// Disinfect reservoir structure +typedef struct +{ + LOAD_CELL_ID_T loadCell; ///< Load cell ID. + BOOL drainInit; ///< Boolean flag to indicate drain has been initialized. + DG_RESERVOIR_STATUS_T rStatus; ///< Disinfect reservoir status. +} DIS_MODE_RSRVR_T; + +/// Disinfect reservoir status structure +typedef struct +{ + DIS_MODE_RSRVR_T rsrvr[ NUM_OF_DG_RESERVOIRS ]; ///< Disinfect mode reservoir status array. + U32 rsrvrFillStableTime; ///< Reservoir fill stable status time counter. + U32 rsrvrFillStableTimeoutMS; ///< Reservoir fill stable time out in milliseconds. + BOOL isThisInitialDrain; ///< Boolean flag to indicate whether this is the initial drain or not. +} DIS_RSRVR_STATUS_T; + // ********** public function prototypes ********** void initHeatDisinfectActiveCoolMode( void ); // Initialize this module @@ -35,6 +70,10 @@ BOOL stopDGHeatDisinfectActiveCool( void ); // Stop DG heat disinfect +// Public functions for fill and drain. These functions should be used for filling and draining in other disinfect modes in the future +DG_RESERVOIR_STATUS_T getDisinfectRsrvrFillStatus( DG_RESERVOIR_ID_T rsrvrID, DIS_RSRVR_STATUS_T *rsrvrStatus, F32 targetVolML, U32 fillTimeoutMS, U32 stateTimerMS ); +DG_RESERVOIR_STATUS_T getDisinfectRsrvrDrainStatus( DG_RESERVOIR_ID_T rsrvrID, DIS_RSRVR_STATUS_T *rsrvrStatus, U32 drainSteadyTimeoutMS, U32 drainStateTimeoutMS, U32 stateTimerMS ); + /**@}*/ #endif