Index: firmware/App/Modes/ModeTreatmentParams.h =================================================================== diff -u -r8cdd4c1f2945181d31659605fb3777a967b753de -r37a9fd8f15e413db5337371a7d1a1cb65567af7c --- firmware/App/Modes/ModeTreatmentParams.h (.../ModeTreatmentParams.h) (revision 8cdd4c1f2945181d31659605fb3777a967b753de) +++ firmware/App/Modes/ModeTreatmentParams.h (.../ModeTreatmentParams.h) (revision 37a9fd8f15e413db5337371a7d1a1cb65567af7c) @@ -1,14 +1,14 @@ /************************************************************************** * -* Copyright (c) 2019-2021 Diality Inc. - All Rights Reserved. +* Copyright (c) 2020-2022 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 ModeTreatmentParams.h * -* @author (last) Dara Navaei -* @date (last) 12-Nov-2021 +* @author (last) Darren Cox +* @date (last) 10-Mar-2022 * * @author (original) Sean Nash * @date (original) 29-May-2020 @@ -72,6 +72,17 @@ F32 uFVolume_L; ///< Original ultrafiltration volume (in L) set by user before treatment start } ADJ_TREATMENT_PARAMS_T; + +/// Record structure for current treatment parameters +typedef struct +{ + U32 accepted; ///< Accepted or rejected based on if critical data has been set. + TREATMENT_PARAMS_DATA_PAYLOAD_T treatment_parameters; ///< Record structure of treatment parameters + F32 uFVolume_L; ///< Current ultrafiltration volume (in L). + +} CURRENT_TREATMENT_PARAMS_DATA_PAYLOAD_T; + + // ********** Public function prototypes ********** void initTreatParamsMode( void ); // Initialize this module @@ -89,14 +100,17 @@ BOOL setTreatmentParameterU32( TREATMENT_PARAM_T param, U32 value ); // Set a specified unsigned integer treatment parameter value BOOL setTreatmentParameterS32( TREATMENT_PARAM_T param, S32 value ); // Set a specified signed integer treatment parameter value BOOL setTreatmentParameterF32( TREATMENT_PARAM_T param, F32 value ); // Set a specified floating point treatment parameter value -U32 getTreatmentParameterU32( TREATMENT_PARAM_T param ); // Get a specified unsigned integer treatment parameter -S32 getTreatmentParameterS32( TREATMENT_PARAM_T param ); // Get a specified signed integer treatment parameter -F32 getTreatmentParameterF32( TREATMENT_PARAM_T param ); // Get a specified floating point treatment parameter +U32 getTreatmentParameterU32( TREATMENT_PARAM_T param ); // Get a specified unsigned integer treatment parameter +S32 getTreatmentParameterS32( TREATMENT_PARAM_T param ); // Get a specified signed integer treatment parameter +F32 getTreatmentParameterF32( TREATMENT_PARAM_T param ); // Get a specified floating point treatment parameter BOOL isTreatmentParamInRange( TREATMENT_PARAM_T param, CRITICAL_DATAS_T value ); // Check range for a proposed treatment parameter value -F32 getUltrafiltrationVolumeOriginal( void ); // Get the original ultrafiltration volume, set in pre-treatment mode by user. -F32 getUltrafiltrationRateOriginal( void ); // Get/calculate the original ultrafiltration rate, by ultrafiltration volume and treatment duration set in pre-treatment mode by user. +S32 getS32TreatmentParamLowerRangeLimit( TREATMENT_PARAM_T param ); // Get the lower range limit for a signed integer treatment parameter +S32 getS32TreatmentParamUpperRangeLimit( TREATMENT_PARAM_T param ); // Get the upper range limit for a signed integer treatment parameter +F32 getUltrafiltrationVolumeOriginal( void ); // Get the original ultrafiltration volume, set in pre-treatment mode by user. +F32 getUltrafiltrationRateOriginal( void ); // Get/calculate the original ultrafiltration rate, by ultrafiltration volume and treatment duration set in pre-treatment mode by user. BOOL testSetTreatmentParameter( TREATMENT_PARAM_T param, CRITICAL_DATAS_T value ); // Set a specific treatment parameter value +BOOL testSendCurrentTreatmentParameters(); // Update current treatment parameters /**@}*/