/************************************************************************** * * 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 d6Level; ///< Floater level (low, medium and high) U32 d63Level; ///< BiCarb Chamber level U32 d46Level; ///< Spent dialysate chamber level F32 d9Pressure; ///< Hydraulics chamber negative pressure F32 d18Pressure; ///< Hydraulics chamber positive pressure F32 d51Pressure; ///< 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 void setTreatmentParamUpdate( void ); // To indicate one or more treatment parameters updated void updateTreatmentSettings( void ); // Process the recent treatment parameters changes 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