/************************************************************************** * * Copyright (c) 2025-2025 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 SpentChamberFill.h * * @author (last) Vinayakam Mani * @date (last) 26-Aug-2025 * * @author (original) Vinayakam Mani * @date (original) 21-Aug-2025 * ***************************************************************************/ #ifndef __SPENT_CHAMBER_FILL_H__ #define __SPENT_CHAMBER_FILL_H__ #include "DDCommon.h" #include "DDDefs.h" /** * @defgroup SpentChamberFill SpentChamberFill * @brief Spent Chamber Fill unit. Performs filling/degassing the spent chamber via a state machine. * * @addtogroup SpentChamberFill * @{ */ // ********** public definitions ********** #define FRESH_DIAL_FILL_PRESSURE_MIN_PSIG 22.0F ///< Minimum fresh dialysate pressure (D18) limit for spent chamber fill operations. #define FRESH_DIAL_FILL_PRESSURE_MAX_PSIG 30.0F ///< Maximum fresh dialysate pressure (D18) limit for spent chamber fill operations. #define SPENT_DIAL_FILL_PRESSURE_MIN_PSIG 24.0F ///< Minimum spent dialysate pressure (D51) limit for spent chamber fill operations. #define SPENT_DIAL_FILL_PRESSURE_MAX_PSIG 30.0F ///< Maximum spent dialysate pressure (D51) limit for spent chamber fill operations. /// spent chamber fill data structure typedef struct { U32 spentChamberFillExecState; ///< Spent chamber fill execution state U32 spentChamberFillSwPeriod; ///< Spent chamber fill switching period U32 totalSpentChamberfillCounter; ///< Total number of spent chamber fills } SPENT_CHAMBER_FILL_DATA_T; // ********** public function prototypes ********** void initSpentChamberFill( void ); // Initialize spent chamber fill unit void transitionToSpentChamberFill( void ); // Prepares for transition to spent chamber fill execution U32 execSpentChamberFillControl( void ); // Execute the spent chamber fill state machine U32 getTotalSpentChamberFillCounts( void ); // Get the total number of spent chamber fill counts SPENT_CHAMBER_FILL_EXEC_STATE_T getCurrentSpentChamberFillExecState( void ); // Get the current state of the spent chamber fill execution BOOL testDDSpentChamberFillDataPublishIntervalOverride( MESSAGE_T *message ); // To override the spent chamber fill data publish interval /**@}*/ #endif