Index: firmware/App/Modes/ModeTreatmentParams.h =================================================================== diff -u -rc84daa1f07003427fc5cdde8f5651434478f7313 -rc6f3b01d1b0a5e3fdf480a7ee205ca349e10d6d2 --- firmware/App/Modes/ModeTreatmentParams.h (.../ModeTreatmentParams.h) (revision c84daa1f07003427fc5cdde8f5651434478f7313) +++ firmware/App/Modes/ModeTreatmentParams.h (.../ModeTreatmentParams.h) (revision c6f3b01d1b0a5e3fdf480a7ee205ca349e10d6d2) @@ -54,30 +54,88 @@ TREATMENT_PARAM_FIRST_F32 = TREATMENT_PARAM_HEPARIN_DISPENSE_RATE, ///< First floating point treatment parameter TREATMENT_PARAM_HEPARIN_BOLUS_VOLUME, ///< Heparin bolus volume (in mL) TREATMENT_PARAM_DIALYSATE_TEMPERATURE, ///< Dialysate temperature (in degC) - TREATMENT_PARAM_UF_VOLUME, ///< Ultrafiltration volume (in liters) + TREATMENT_PARAM_UF_VOLUME, ///< Ultrafiltration volume (in liters) - provided separately by UI NUM_OF_TREATMENT_PARAMS ///< Total number of treatment parameters } TREATMENT_PARAM_T; +/// Enumeration of dialyzer types. +typedef enum Dialyzer_Types +{ + DIALYZER_TYPE_NIPRO_ELISIO_H_17 = 0, ///< Nipro Elisio H17 dialyzer + DIALYZER_TYPE_NIPRO_ELISIO_H_19, ///< Nipro Elisio H19 dialyzer + DIALYZER_TYPE_FRESENIUS_OPTIFLUX_F160NRE, ///< Fresenius Optiflux F160NRe + DIALYZER_TYPE_FRESENIUS_OPTIFLUX_F180NRE, ///< Fresenius Optiflux F180NRe + NUM_OF_DIALYZER_TYPES ///< Number of dialyzer types +} DIALYZER_TYPE_T; + +/// Enumeration of acid concentrates. +typedef enum Acid_Concentrates +{ + ACID_CONC_TYPE_FRESENIUS_08_1251_1 = 0, ///< Fresensius Naturalyte Acid Concentrate 08-1251-1 + ACID_CONC_TYPE_FRESENIUS_08_2251_0, ///< Fresensius Naturalyte Acid Concentrate 08-1251-1 + ACID_CONC_TYPE_FRESENIUS_08_3251_9, ///< Fresensius Naturalyte Acid Concentrate 08-1251-1 + NUM_OF_ACID_CONC_TYPES ///< Number of acid concentrates +} ACID_CONCENTRATE_TYPE_T; + +/// Enumeration of bicarbonate concentrates. +typedef enum Bicarb_Concentrates +{ + BICARB_CONC_TYPE_FRESENIUS_CENTRISOL = 0, ///< Fresenius Centrisol Liquid Bicarbonate + NUM_OF_BICARB_CONC_TYPES ///< Number of bicarbonate concentrates +} BICARB_CONCENTRATE_TYPE_T; + +/// Record structure for a treatment parameters payload. +typedef struct +{ + U32 bloodFlowRate_mL_min; + U32 dialysateFlowRate_mL_min; + U32 treatmentDuration_min; + U32 heparinPreStop_min; + U32 salineBolusVolume_mL; + U32 acidConcentrate; + U32 bicarbConcentrate; + U32 dialyzerType; + S32 arterialPressureLowLimit_mmHg; + S32 arterialPressureHighLimit_mmHg; + S32 venousPressureLowLimit_mmHg; + S32 venousPressureHighLimit_mmHg; + U32 bloodPressureMeasurementInterval_min; + U32 rinsebackFlowRate_mL_min; + F32 heparinDispenseRate_mL_hr; + F32 heparinBolusVolume_mL; + F32 dialysateTemperature_degC; +} TREATMENT_PARAMS_DATA_PAYLOAD_T; + +/// Record structure for adjustable treatment parameters +typedef struct +{ + U32 bloodFlowRate_mL_min; + U32 dialysateFlowRate_mL_min; + U32 treatmentDuration_min; + S32 arterialPressureLowLimit_mmHg; + S32 arterialPressureHighLimit_mmHg; + S32 venousPressureLowLimit_mmHg; + S32 venousPressureHighLimit_mmHg; + F32 uFVolume_L; +} ADJ_TREATMENT_PARAMS_T; + // ********** private function prototypes ********** -void initTreatParamsMode( void ); // initialize this module -void transitionToTreatParamsMode( void ); // prepares for transition to treatment parameters mode -U32 execTreatParamsMode( void ); // execute the treatment parameters mode state machine (call from OperationModes) +void initTreatParamsMode( void ); // initialize this module +void transitionToTreatParamsMode( void ); // prepares for transition to treatment parameters mode +U32 execTreatParamsMode( void ); // execute the treatment parameters mode state machine (call from OperationModes) -void setTreatmentParameterU32( TREATMENT_PARAM_T param, U32 value ); // Set a specified integer treatment parameter value +BOOL validateAndSetTreatmentParameters( TREATMENT_PARAMS_DATA_PAYLOAD_T params ); // user provided treatment params to be set and validated +BOOL signalUserConfirmationOfTreatmentParameters( void ); // User has confirmed treatment parameters +BOOL signalUserCancelTreatment( void ); // User has cancelled treatment + +void setTreatmentParameterU32( TREATMENT_PARAM_T param, U32 value ); // Set a specified unsigned integer treatment parameter value +void setTreatmentParameterS32( TREATMENT_PARAM_T param, S32 value ); // Set a specified signed integer treatment parameter value void setTreatmentParameterF32( TREATMENT_PARAM_T param, F32 value ); // Set a specified floating point treatment parameter value -U32 getTreatmentParameterU32( TREATMENT_PARAM_T param ); // Get a specified 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 -U32 getOrigBloodFlowRate_mL_min( void ); // Get originally set (before treatment) blood flow rate (in mL/min). -U32 getOrigDialysateFlowRate_mL_min( void ); // Get originally set (before treatment) dialysate flow rate (in mL/min). -U32 getOrigTreatmentDuration_min( void ); // Get originally set (before treatment) treatment duration (in min). -U32 getOrigArterialPressureLowLimit_mmHg( void ); // Get originally set (before treatment) arterial pressure lower alarm limit (in mmHg). -U32 getOrigArterialPressureHighLimit_mmHg( void ); // Get originally set (before treatment) arterial pressure upper alarm limit (in mmHg). -U32 getOrigVenousPressureLowLimit_mmHg( void ); // Get originally set (before treatment) venous pressure lower alarm limit (in mmHg). -U32 getOrigVenousPressureHighLimit_mmHg( void ); // Get originally set (before treatment) venous pressure upper alarm limit (in mmHg). -F32 getOrigUFVolume_L( void ); // Get originally set (before treatment) ultrafiltration volume (in liters). - /**@}*/ #endif