/************************************************************************** * * Copyright (c) 2024-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 ModeGenDialysate.h * * @author (last) Vinayakam Mani * @date (last) 30-Oct-2024 * * @author (original) Vinayakam Mani * @date (original) 30-Oct-2024 * ***************************************************************************/ #ifndef __MODE_GEN_DIALYSATE_H__ #define __MODE_GEN_DIALYSATE_H__ #include "DDCommon.h" #include "DDDefs.h" /** * @defgroup DDGenDialysateMode DDGenDialysateMode * @brief Generate Dialysate unit. Manages dialysate generation functions via a state machine. * * @addtogroup DDGenDialysateMode * @{ */ // ********** public definitions ********** /// Generate dialysate mode data structure typedef struct { U32 genDialysateExecState; ///< Generate dialysate execution state BOOL isDialDelInProgress; ///< Whether Dialysate Delivery in progress or not U32 floaterLevel1; ///< Floater level 1 (low or medium) U32 floaterLevel2; ///< Floater level 2 (medium or high) U32 BiCarbLevel; ///< BiCarb Chamber level U32 SpentChamberLevel; ///< Spent dialysate chamber level F32 hydNegativePressure; ///< Hydraulics chamber negative pressure F32 hydPositivePressure; ///< Hydraulics chamber positive pressure F32 spentDialysatePressure; ///< Spent Dialysate positive pressure BOOL isDialysateGoodtoDeliver; ///< Ready to deliver dialysate or not } GEN_DIALYSATE_MODE_DATA_T; // ********** public function prototypes ********** void initGenDialysateMode( void ); // Initialize this gen dialysate mode unit U32 transitionToGenDialysateMode( void ); // Prepares for transition to gen dialysate mode U32 execGenDialysateMode( void ); // Execute the gen dialysate mode state machine (call from OperationModes) void execGenDialysateMonitor( void ); // Dialysate generation monitor DD_GEND_MODE_STATE_T getCurrentGenDialysateState( void ); // Get the current state of the gen dialysate mode. U32 getDialGoodToDeliverStatus( void ); // Get the dialysate good to deliver status BOOL testDDGenDialysateDataPublishIntervalOverride( MESSAGE_T *message ); // GenD Mode data publish interval override BOOL testDialDeliveryInProgressOverride( MESSAGE_T *message ); // To override the dialysate delivery in progress flag BOOL testDialGoodToDeliverStatusOverride( MESSAGE_T *message ); // To override the dialysate good to deliver status flag BOOL testGenDHydChamberFluidTempOverride( MESSAGE_T *message ); // Override the hydraulics chamber fluid temperature /**@}*/ #endif