Index: firmware/App/Modes/Dialysis.h =================================================================== diff -u -r2df21d2472a8d79d78af7e359518acf3614accc5 -r8e7158d8231435496fcf1d5649e51babf859ccc7 --- firmware/App/Modes/Dialysis.h (.../Dialysis.h) (revision 2df21d2472a8d79d78af7e359518acf3614accc5) +++ firmware/App/Modes/Dialysis.h (.../Dialysis.h) (revision 8e7158d8231435496fcf1d5649e51babf859ccc7) @@ -1,18 +1,19 @@ -/**********************************************************************//** - * - * Copyright (c) 2019-2020 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 Dialysis.h - * - * @date 15-Jan-2020 - * @author S. Nash - * - * @brief Header file for Dialysis sub-mode. - * - **************************************************************************/ +/************************************************************************** +* +* Copyright (c) 2019-2021 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 Dialysis.h +* +* @author (last) Sean Nash +* @date (last) 01-Oct-2020 +* +* @author (original) Sean +* @date (original) 15-Jan-2020 +* +***************************************************************************/ #ifndef __DIALYSIS_H__ #define __DIALYSIS_H__ @@ -30,18 +31,35 @@ // ********** public definitions ********** -// ********** private function prototypes ********** +#pragma pack(push,1) +/// Payload record structure for a saline bolus data broadcast message. +typedef struct +{ + U32 maxSalineVolumeMl; + F32 cumSalineVolumeMl; + F32 bolSalineVolumeMl; +} SALINE_BOLUS_DATA_PAYLOAD_T; + +#pragma pack(pop) + +// ********** public function prototypes ********** + void initDialysis( void ); +void resetSalineBolus( void ); void transitionToDialysis( void ); void execDialysis( void ); void setDialysisParams( U32 bPFlow, U32 dPFlow, F32 maxUFVol, F32 uFRate ); void startDialysis( void ); void stopDialysis( void ); +void signalStartSalineBolus( void ); +void signalAbortSalineBolus( void ); + DIALYSIS_STATE_T getDialysisState( void ); UF_STATE_T getUltrafiltrationState( void ); +SALINE_BOLUS_STATE_T getSalineBolusState( void ); F32 getUltrafiltrationVolumeCollected( void ); BOOL pauseUF( void );