/************************************************************************** * * 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 DDInterface.h * * @author (last) Sean * @date (last) 30-Jul-2024 * * @author (original) Sean * @date (original) 30-Jul-2024 * ***************************************************************************/ #ifndef __DD_INTERFACE_H__ #define __DD_INTERFACE_H__ #include "TDCommon.h" #include "TDDefs.h" #include "DDDefs.h" /** * @defgroup DDInterface DDInterface * @brief DD interface & monitor unit. Interfaces with and monitors the * DD (dialysate delivery) sub-system. * * @addtogroup DDInterface * @{ */ // ********** public definitions ********** /// DD command response data record structure. typedef struct { U32 commandID; ///< The command DG is responding to BOOL rejected; ///< Flag indicates if the command has been rejected U32 rejectCode; ///< Reason code for rejecting the command } DD_CMD_RESPONSE_T; // ********** public function prototypes ********** void initDDInterface( void ); void execDDInterfaceMonitor( void ); DD_OP_MODE_T getDDOpMode( void ); U32 getDDSubMode( void ); F32 getDialysatePressure( void ); BOOL setDDOpMode( MESSAGE_T *message ); BOOL setDialysatePressure( MESSAGE_T *message ); void cmdStartGenerateDialysate( F32 qd, F32 quf, F32 dialTemp, BOOL bypass, ACID_CONCENTRATE_TYPE_T acid, BICARB_CONCENTRATE_TYPE_T bicarb ); void cmdChangeQd( F32 qd ); void cmdChangeQuf( F32 quf ); void cmdBypassDialyzer( BOOL bypass ); void cmdStopGenerateDialysate( void ); void handleDDCommandResponse( DD_CMD_RESPONSE_T *ddCmdRespPtr ); BOOL getDDCommandResponse( U32 commandID, DD_CMD_RESPONSE_T *cmdRespPtr ); /**@}*/ #endif