Index: firmware/App/Modes/ModeTreatment.c =================================================================== diff -u -rc92e2b5ae61f359e5633b32b2d5b691347d0d293 -r1e8f1e33b885d6b5d64efa37525fa4ea6720b4d5 --- firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision c92e2b5ae61f359e5633b32b2d5b691347d0d293) +++ firmware/App/Modes/ModeTreatment.c (.../ModeTreatment.c) (revision 1e8f1e33b885d6b5d64efa37525fa4ea6720b4d5) @@ -923,6 +923,23 @@ /*********************************************************************//** * @brief + * The updateTreatmentBroadcastData function updates treatment broadcast + * data values used for treatment time and ultrafiltration broadcasts. + * @details \b Inputs: treatment duration, UF volume treatment parameters. + * @details \b Outputs: presTreatmentTimeSecs, presUFVolumeL, presUFRateLHr. + * @return none + *************************************************************************/ +void updateTreatmentBroadcastData( void ) +{ + presTreatmentTimeSecs = getTreatmentParameterU32( TREATMENT_PARAM_TREATMENT_DURATION ) * SEC_PER_MIN; + + presUFVolumeL = getTreatmentParameterF32( TREATMENT_PARAM_UF_VOLUME ); + + presUFRateLHr = presUFVolumeL / ( (F32)getTreatmentParameterU32( TREATMENT_PARAM_TREATMENT_DURATION ) / (F32)MIN_PER_HOUR ); +} + +/*********************************************************************//** + * @brief * The broadcastTreatmentSettingsRanges function computes and broadcasts * updated treatment parameter ranges that the user may change during treatment. * It is assumed that prescription settings have already been set prior to calling Index: firmware/App/Modes/ModeTreatment.h =================================================================== diff -u -rc92e2b5ae61f359e5633b32b2d5b691347d0d293 -r1e8f1e33b885d6b5d64efa37525fa4ea6720b4d5 --- firmware/App/Modes/ModeTreatment.h (.../ModeTreatment.h) (revision c92e2b5ae61f359e5633b32b2d5b691347d0d293) +++ firmware/App/Modes/ModeTreatment.h (.../ModeTreatment.h) (revision 1e8f1e33b885d6b5d64efa37525fa4ea6720b4d5) @@ -113,6 +113,7 @@ void signalBloodPrimeToDialysis( void ); // Blood prime sub-mode is signaling to move on to dialysis sub-mode void broadcastTreatmentTimeAndState( void ); // Broadcast the times and states of this treatment +void updateTreatmentBroadcastData( void ); // Update treatment broadcast data from current treatment parameters TREATMENT_STATE_T getTreatmentState( void ); // Determine the current treatment sub-mode (state) BOOL isTreatmentCompleted( void ); // Determine whether the treatment has completed Index: firmware/App/Monitors/Pressures.c =================================================================== diff -u -re9e339870c5ed01230963f00d400331ab879c91f -r1e8f1e33b885d6b5d64efa37525fa4ea6720b4d5 --- firmware/App/Monitors/Pressures.c (.../Pressures.c) (revision e9e339870c5ed01230963f00d400331ab879c91f) +++ firmware/App/Monitors/Pressures.c (.../Pressures.c) (revision 1e8f1e33b885d6b5d64efa37525fa4ea6720b4d5) @@ -628,7 +628,7 @@ BOOL bpRampComplete = TRUE; //isBloodPumpRampComplete(); TD_OP_MODE_T currMode = getCurrentOperationMode(); TREATMENT_STATE_T currTxState = TREATMENT_DIALYSIS_STATE; //getTreatmentState(); - U32 stabilizeTime = PRES_LIMIT_STABILIZATION_TIME_MS; + U32 stabilizeTime = PRES_LIMIT_STABILIZATION_TIME_MS; if ( currMode != MODE_TREA ) { Index: firmware/App/Services/Messaging.c =================================================================== diff -u -r4644222ff44fd3fc588bd071e794aabad9780bae -r1e8f1e33b885d6b5d64efa37525fa4ea6720b4d5 --- firmware/App/Services/Messaging.c (.../Messaging.c) (revision 4644222ff44fd3fc588bd071e794aabad9780bae) +++ firmware/App/Services/Messaging.c (.../Messaging.c) (revision 1e8f1e33b885d6b5d64efa37525fa4ea6720b4d5) @@ -108,8 +108,8 @@ { MSG_ID_DD_OP_MODE_DATA, &setDDOpMode }, { MSG_ID_DD_PRESSURES_DATA, &setDialysatePressure }, { MSG_ID_UI_TREATMENT_PARAMS_TO_VALIDATE, &validateAndSetTreatmentParameters }, - { MSG_ID_UI_ULTRAFILTRATION_VOLUME_TO_VALIDATE, &validateAndSetUFVolume }, - { MSG_ID_UI_ULTRAFILTRATION_CHANGE_VALIDATE_REQUEST, &signalUserConfirmationOfUFVolume }, + { MSG_ID_UI_TREATMENT_UF_VOLUME_VALIDATE_REQUEST, &validateAndSetUFVolume }, + { MSG_ID_UI_ULTRAFILTRATION_CHANGE_CONFIRM_REQUEST, &signalUserConfirmationOfUFVolume }, { MSG_ID_UI_DURATION_VALIDATE_REQUEST, &validateAndSetTreatmentDuration }, { MSG_ID_UI_DURATION_CONFIRM_REQUEST, &signalUserConfirmationOfTreatmentDuration }, { MSG_ID_UI_BOLUS_VOLUME_CHANGE_REQUEST, &validateAndSetBolusVolume }, @@ -121,7 +121,7 @@ { MSG_ID_UI_TREATMENT_SET_POINTS_CHANGE_REQUEST, &validateAndSetTreatmentSetPoints }, { MSG_ID_UI_TREATMENT_SET_POINT_BLOOD_FLOW_CHANGE_REQUEST, &validateAndSetBloodFlowRate }, { MSG_ID_UI_TREATMENT_SET_POINT_DIALYSATE_FLOW_CHANGE_REQUEST, &validateAndSetDialysateFlowRate }, - { MSG_ID_UI_TREATMENT_SET_POINT_DIALYSATE_TEMPERATURE_CHANGE_REQUEST,&validateAndSetDialysateTemperature }, + { MSG_ID_UI_TREATMENT_SET_POINT_DIALYSATE_TEMP_CHANGE_REQUEST, &validateAndSetDialysateTemperature }, { MSG_ID_UI_BLOOD_PRIME_CMD_REQUEST, &bloodPrimeHandleCmdRequest }, { MSG_ID_UI_TREATMENT_SET_POINT_BLOOD_FLOW_CHANGE_REQUEST, &bloodPrimeHandleBloodFlowChangeRequest }, { MSG_ID_TD_SOFTWARE_RESET_REQUEST, &testTDSoftwareResetRequest }, Index: firmware/App/Services/Messaging.h =================================================================== diff -u -r8cceda439faa23a1e927721c6a9ef8e4ee30c5be -r1e8f1e33b885d6b5d64efa37525fa4ea6720b4d5 --- firmware/App/Services/Messaging.h (.../Messaging.h) (revision 8cceda439faa23a1e927721c6a9ef8e4ee30c5be) +++ firmware/App/Services/Messaging.h (.../Messaging.h) (revision 1e8f1e33b885d6b5d64efa37525fa4ea6720b4d5) @@ -51,13 +51,6 @@ } UI_OFF_BUTTON_RESPONSE_PAYLOAD_T; #pragma pack(pop) -/// Payload record structure for UI response. -typedef struct -{ - BOOL accepted; ///< Accepted/Rejected - U32 rejectionReason; ///< Rejection reason if not accepted. -} UI_RESPONSE_PAYLOAD_T; - /// Payload record structure for treatment parameter broadcast messages. typedef struct { Index: firmware/App/Services/TxParams.c =================================================================== diff -u -r41a1b7a822a45813af610292a9af90e1a0f83763 -r1e8f1e33b885d6b5d64efa37525fa4ea6720b4d5 --- firmware/App/Services/TxParams.c (.../TxParams.c) (revision 41a1b7a822a45813af610292a9af90e1a0f83763) +++ firmware/App/Services/TxParams.c (.../TxParams.c) (revision 1e8f1e33b885d6b5d64efa37525fa4ea6720b4d5) @@ -1475,7 +1475,8 @@ * @brief * The validateAndSetTreatmentDuration function handles the UI treatment * duration validation request during Treatment mode. - * @details \b Message \b Sent: MSG_ID_TD_DURATION_VALIDATE_RESPONSE including acceptance status, rejection reason, requested duration, UF volume goal (L), and calculated UF rate (L/hr). + * @details \b Message \b Sent: MSG_ID_TD_DURATION_VALIDATE_RESPONSE including acceptance status, rejection reason, requested duration, UF volume goal (L), + * calculated UF rate (L/hr) and heparin delivery duration (minutes). * @details \b Inputs: none. * @details \b Outputs: validTreatmentDurationReceived, validatedTreatmentDuration_min, validatedUFRateLhr, validatedHeparinDeliveryDuration_min. * @param message set message from UI which includes the requested treatment duration in minutes. @@ -1504,6 +1505,7 @@ response.duration = 0U; response.ufVolumeGoal = 0.0F; response.ufRate = 0.0F; + response.heparinDuration = 0U; // Clear previously validated values. validTreatmentDurationReceived = FALSE; @@ -1552,13 +1554,15 @@ validatedHeparinDeliveryDuration_min = 0U; } + response.heparinDuration = validatedHeparinDeliveryDuration_min; response.accepted = TRUE; response.rejectionReason = REQUEST_REJECT_REASON_NONE; // Store validated values for confirmation step. validTreatmentDurationReceived = TRUE; validatedTreatmentDuration_min = response.duration; validatedUFRateLhr = response.ufRate; + validatedHeparinDeliveryDuration_min = response.heparinDuration; } else { @@ -1595,7 +1599,7 @@ { BOOL result = FALSE; BOLUS_VOLUME_CHANGE_REQUEST_PAYLOAD_T request; - BOLUS_VOLUME_CHANGE_RESPONSE_PAYLOAD_T response; + UI_RESPONSE_PAYLOAD_T response; U32 minBolusVolume_mL = getU32TreatmentParamLowerRangeLimit( TREATMENT_PARAM_FLUID_BOLUS_VOLUME ); U32 maxBolusVolume_mL = getU32TreatmentParamUpperRangeLimit( TREATMENT_PARAM_FLUID_BOLUS_VOLUME ); @@ -1620,7 +1624,7 @@ } } - result = sendMessage( MSG_ID_TD_BOLUS_VOLUME_CHANGE_RESPONSE, COMM_BUFFER_OUT_CAN_TD_2_UI, (U08 *)&response, sizeof( BOLUS_VOLUME_CHANGE_RESPONSE_PAYLOAD_T ) ); + result = sendMessage( MSG_ID_TD_BOLUS_VOLUME_CHANGE_RESPONSE, COMM_BUFFER_OUT_CAN_TD_2_UI, (U08 *)&response, sizeof( UI_RESPONSE_PAYLOAD_T ) ); return result; } @@ -1811,7 +1815,7 @@ * @brief * The validateAndSetUFVolume function handles the UI ultrafiltration * volume validation request during Treatment mode. - * @details \b Message \b Sent: MSG_ID_TD_RESP_ULTRAFILTRATION_VOLUME_TO_VALIDATE including acceptance status, rejection reason, UF volume goal (L), duration (minutes), and UF rate (L/hr). + * @details \b Message \b Sent: MSG_ID_TD_RESP_ULTRAFILTRATION_VOLUME_TO_VALIDATE including acceptance status, rejection reason, UF volume goal (L), and UF rate (L/hr). * @details \b Inputs: none. * @details \b Outputs: validUFVolumeReceived, validatedUFVolumeGoalL, validatedUFRateLhr. * @param message set message from UI which includes the requested UF volume in L. @@ -1837,7 +1841,6 @@ response.accepted = FALSE; response.rejectionReason = REQUEST_REJECT_REASON_INVALID_REQUEST_FORMAT; response.ufVolumeGoal = 0.0F; - response.duration = 0U; response.ufRate = 0.0F; // Clear previously validated values. @@ -1855,7 +1858,6 @@ // Send UF volume to UI in L. response.ufVolumeGoal = requestedUFVolumeL; - response.duration = (U32)treatmentDurationMin; if ( ( requestedUFVolumeL >= minUFVolumeL ) && ( requestedUFVolumeL <= maxUFVolumeL ) ) { @@ -1902,7 +1904,7 @@ } } - result = sendMessage( MSG_ID_TD_RESP_ULTRAFILTRATION_VOLUME_TO_VALIDATE, COMM_BUFFER_OUT_CAN_TD_2_UI, (U08 *)&response, sizeof( UF_VOLUME_RESPONSE_PAYLOAD_T ) ); + result = sendMessage( MSG_ID_TD_TREATMENT_UF_VOLUME_VALIDATE_RESPONSE, COMM_BUFFER_OUT_CAN_TD_2_UI, (U08 *)&response, sizeof( UF_VOLUME_RESPONSE_PAYLOAD_T ) ); return result; } @@ -2043,7 +2045,7 @@ BOOL result = FALSE; CRITICAL_DATAS_T requestedValue; BLOOD_FLOW_RATE_CHANGE_REQUEST_PAYLOAD_T request; - BLOOD_FLOW_RATE_CHANGE_RESPONSE_PAYLOAD_T response; + UI_RESPONSE_PAYLOAD_T response; memset( &requestedValue, 0, sizeof( requestedValue ) ); memset( &request, 0, sizeof( request ) ); @@ -2060,6 +2062,7 @@ if ( TRUE == isTreatmentParamInRange( TREATMENT_PARAM_BLOOD_FLOW, requestedValue ) ) { setTreatmentParameterU32( TREATMENT_PARAM_BLOOD_FLOW, request.flowRate ); + setDialysisBloodPumpFlowRate( request.flowRate ); response.accepted = TRUE; response.rejectionReason = REQUEST_REJECT_REASON_NONE; @@ -2070,7 +2073,7 @@ } } - result = sendMessage( MSG_ID_TD_TREATMENT_SET_POINT_BLOOD_FLOW_CHANGE_RESPONSE, COMM_BUFFER_OUT_CAN_TD_2_UI, (U08 *)&response, sizeof( BLOOD_FLOW_RATE_CHANGE_RESPONSE_PAYLOAD_T ) ); + result = sendMessage( MSG_ID_TD_TREATMENT_SET_POINT_BLOOD_FLOW_CHANGE_RESPONSE, COMM_BUFFER_OUT_CAN_TD_2_UI, (U08 *)&response, sizeof( UI_RESPONSE_PAYLOAD_T ) ); return result; } @@ -2090,7 +2093,7 @@ BOOL result = FALSE; CRITICAL_DATAS_T requestedValue; DIALYSATE_FLOW_RATE_CHANGE_REQUEST_PAYLOAD_T request; - DIALYSATE_FLOW_RATE_CHANGE_RESPONSE_PAYLOAD_T response; + UI_RESPONSE_PAYLOAD_T response; memset( &requestedValue, 0, sizeof( requestedValue ) ); memset( &request, 0, sizeof( request ) ); @@ -2117,7 +2120,7 @@ } } - result = sendMessage( MSG_ID_TD_TREATMENT_SET_POINT_DIALYSATE_FLOW_CHANGE_RESPONSE, COMM_BUFFER_OUT_CAN_TD_2_UI, (U08 *)&response, sizeof( DIALYSATE_FLOW_RATE_CHANGE_RESPONSE_PAYLOAD_T ) ); + result = sendMessage( MSG_ID_TD_TREATMENT_SET_POINT_DIALYSATE_FLOW_CHANGE_RESPONSE, COMM_BUFFER_OUT_CAN_TD_2_UI, (U08 *)&response, sizeof( UI_RESPONSE_PAYLOAD_T ) ); return result; } @@ -2137,7 +2140,7 @@ BOOL result = FALSE; CRITICAL_DATAS_T requestedValue; DIALYSATE_TEMPERATURE_CHANGE_REQUEST_PAYLOAD_T request; - DIALYSATE_TEMPERATURE_CHANGE_RESPONSE_PAYLOAD_T response; + UI_RESPONSE_PAYLOAD_T response; memset( &requestedValue, 0, sizeof( requestedValue ) ); memset( &request, 0, sizeof( request ) ); @@ -2164,7 +2167,7 @@ } } - result = sendMessage( MSG_ID_TD_TREATMENT_SET_POINT_DIALYSATE_TEMPERATURE_CHANGE_RESPONSE, COMM_BUFFER_OUT_CAN_TD_2_UI, (U08 *)&response, sizeof( DIALYSATE_TEMPERATURE_CHANGE_RESPONSE_PAYLOAD_T ) ); + result = sendMessage( MSG_ID_TD_TREATMENT_SET_POINT_DIALYSATE_TEMP_CHANGE_RESPONSE, COMM_BUFFER_OUT_CAN_TD_2_UI, (U08 *)&response, sizeof( UI_RESPONSE_PAYLOAD_T ) ); return result; } @@ -2173,41 +2176,35 @@ * @brief * The signalUserConfirmationOfTreatmentDuration function handles the UI * treatment duration confirmation request during Treatment mode. - * @details \b Message \b Sent: MSG_ID_TD_DURATION_CONFIRM_RESPONSE including acceptance status, rejection reason, duration (minutes), UF volume goal (L), and UF rate (L/hr). + * @details \b Message \b Sent: MSG_ID_TD_DURATION_CONFIRM_RESPONSE including acceptance status and rejection reason. * @details \b Inputs: validTreatmentDurationReceived, validatedTreatmentDuration_min, validatedUFRateLhr, validatedHeparinDeliveryDuration_min. * @details \b Outputs: validTreatmentDurationReceived, validatedTreatmentDuration_min, validatedUFRateLhr, validatedHeparinDeliveryDuration_min. - * @param message set message from UI which includes the confirmed treatment duration and UF rate. + * @param message set message from UI which includes the confirmed treatment duration, UF rate and heparin delivery duration. * @return TRUE if response message is sent successfully, FALSE otherwise. *************************************************************************/ BOOL signalUserConfirmationOfTreatmentDuration( MESSAGE_T *message ) { BOOL result = FALSE; DURATION_CONFIRM_REQUEST_PAYLOAD_T request; - DURATION_VALIDATE_RESPONSE_PAYLOAD_T response; + UI_RESPONSE_PAYLOAD_T response; F32 presUFVolumeMl = getTreatmentParameterF32( TREATMENT_PARAM_UF_VOLUME ) * (F32)ML_PER_LITER; F32 validatedUFRateMlMin = ( validatedUFRateLhr * (F32)ML_PER_LITER ) / (F32)MIN_PER_HOUR; response.accepted = FALSE; response.rejectionReason = REQUEST_REJECT_REASON_INVALID_REQUEST_FORMAT; - response.duration = 0U; - response.ufVolumeGoal = 0.0F; - response.ufRate = 0.0F; if ( message->hdr.payloadLen == sizeof( DURATION_CONFIRM_REQUEST_PAYLOAD_T ) ) { memcpy( &request, &message->payload[ 0 ], sizeof( DURATION_CONFIRM_REQUEST_PAYLOAD_T ) ); - // Echo values for confirmation screen. - response.duration = request.duration; - response.ufVolumeGoal = presUFVolumeMl / (F32)ML_PER_LITER; - response.ufRate = validatedUFRateLhr; - // Verify confirmed duration and UF rate match previously validated values. if ( ( TRUE == validTreatmentDurationReceived ) && ( request.duration == validatedTreatmentDuration_min ) && - ( fabs( request.ufRate - validatedUFRateLhr ) < NEARLY_ZERO ) ) + ( fabs( request.ufRate - validatedUFRateLhr ) < NEARLY_ZERO ) && + ( request.heparinDuration == validatedHeparinDeliveryDuration_min ) ) { setTreatmentParameterU32( TREATMENT_PARAM_TREATMENT_DURATION, validatedTreatmentDuration_min ); setTreatmentParameterU32( TREATMENT_PARAM_HEPARIN_DELIVERY_DURATION, validatedHeparinDeliveryDuration_min ); + updateTreatmentBroadcastData(); setDialysisDDParams( getTreatmentParameterU32( TREATMENT_PARAM_DIALYSATE_FLOW ), presUFVolumeMl, validatedUFRateMlMin ); response.accepted = TRUE; @@ -2229,7 +2226,7 @@ } } - result = sendMessage( MSG_ID_TD_DURATION_CONFIRM_RESPONSE, COMM_BUFFER_OUT_CAN_TD_2_UI, (U08 *)&response, sizeof( DURATION_VALIDATE_RESPONSE_PAYLOAD_T ) ); + result = sendMessage( MSG_ID_TD_DURATION_CONFIRM_RESPONSE, COMM_BUFFER_OUT_CAN_TD_2_UI, (U08 *)&response, sizeof( UI_RESPONSE_PAYLOAD_T ) ); return result; } @@ -2238,7 +2235,7 @@ * @brief * The signalUserConfirmationOfUFVolume function handles the UI * ultrafiltration volume confirmation request during Treatment mode. - * @details \b Message \b Sent: MSG_ID_TD_ULTRAFILTRATION_CHANGE_VALIDATE_RESPONSE including acceptance status, rejection reason, UF volume goal (L), duration (minutes), and UF rate (L/hr). + * @details \b Message \b Sent: MSG_ID_TD_ULTRAFILTRATION_CHANGE_CONFIRM_RESPONSE including acceptance status and rejection reason. * @details \b Inputs: validUFVolumeReceived, validatedUFVolumeGoalL, validatedUFRateLhr. * @details \b Outputs: validUFVolumeReceived, validatedUFVolumeGoalL, validatedUFRateLhr. * @param message set message from UI which includes the confirmed UF volume and UF rate. @@ -2248,34 +2245,26 @@ { BOOL result = FALSE; UF_VOLUME_CONFIRM_REQUEST_PAYLOAD_T request; - UF_VOLUME_RESPONSE_PAYLOAD_T response; + UI_RESPONSE_PAYLOAD_T response; F32 validatedUFVolumeGoalMl = 0.0F; F32 validatedUFRateMlMin = 0.0F; response.accepted = FALSE; response.rejectionReason = REQUEST_REJECT_REASON_INVALID_REQUEST_FORMAT; - response.ufVolumeGoal = 0.0F; - response.duration = 0U; - response.ufRate = 0.0F; if ( message->hdr.payloadLen == sizeof( UF_VOLUME_CONFIRM_REQUEST_PAYLOAD_T ) ) { memcpy( &request, &message->payload[ 0 ], sizeof( UF_VOLUME_CONFIRM_REQUEST_PAYLOAD_T ) ); - // Echo values for confirmation screen. - response.ufVolumeGoal = request.ufVolume; - response.duration = getTreatmentParameterU32( TREATMENT_PARAM_TREATMENT_DURATION ); - response.ufRate = validatedUFRateLhr; - validatedUFVolumeGoalMl = validatedUFVolumeGoalL * (F32)ML_PER_LITER; validatedUFRateMlMin = ( validatedUFRateLhr * (F32)ML_PER_LITER ) / (F32)MIN_PER_HOUR; // Verify confirmed UF volume and UF rate match previously validated values. - if ( ( TRUE == validUFVolumeReceived ) && ( fabs( request.ufVolume - validatedUFVolumeGoalL ) < NEARLY_ZERO ) && - ( fabs( request.ufRate - validatedUFRateLhr ) < NEARLY_ZERO ) ) + if ( ( TRUE == validUFVolumeReceived ) && ( fabs( request.ufVolume - validatedUFVolumeGoalL ) < NEARLY_ZERO ) && + ( fabs( request.ufRate - validatedUFRateLhr ) <= 0.01F ) ) { setTreatmentParameterF32( TREATMENT_PARAM_UF_VOLUME, validatedUFVolumeGoalL ); - + updateTreatmentBroadcastData(); setDialysisDDParams( getTreatmentParameterU32( TREATMENT_PARAM_DIALYSATE_FLOW ), validatedUFVolumeGoalMl, validatedUFRateMlMin ); response.accepted = TRUE; @@ -2296,7 +2285,7 @@ } } - result = sendMessage( MSG_ID_TD_ULTRAFILTRATION_CHANGE_VALIDATE_RESPONSE, COMM_BUFFER_OUT_CAN_TD_2_UI, (U08 *)&response, sizeof( UF_VOLUME_RESPONSE_PAYLOAD_T ) ); + result = sendMessage( MSG_ID_TD_ULTRAFILTRATION_CHANGE_CONFIRM_RESPONSE, COMM_BUFFER_OUT_CAN_TD_2_UI, (U08 *)&response, sizeof( UI_RESPONSE_PAYLOAD_T ) ); return result; } Index: firmware/App/Services/TxParams.h =================================================================== diff -u -r41a1b7a822a45813af610292a9af90e1a0f83763 -r1e8f1e33b885d6b5d64efa37525fa4ea6720b4d5 --- firmware/App/Services/TxParams.h (.../TxParams.h) (revision 41a1b7a822a45813af610292a9af90e1a0f83763) +++ firmware/App/Services/TxParams.h (.../TxParams.h) (revision 1e8f1e33b885d6b5d64efa37525fa4ea6720b4d5) @@ -96,6 +96,7 @@ typedef struct { U32 duration; ///< Confirmed treatment duration in minutes. + U32 heparinDuration; ///< Confirmed heparin delivery duration in minutes. F32 ufRate; ///< Confirmed UF rate in L/hr. } DURATION_CONFIRM_REQUEST_PAYLOAD_T; @@ -105,23 +106,24 @@ BOOL accepted; ///< Accepted/Rejected. U32 rejectionReason; ///< Rejection reason if not accepted. U32 duration; ///< Treatment duration in minutes. + U32 heparinDuration; ///< Heparin delivery duration in minutes. F32 ufVolumeGoal; ///< UF volume goal in L. F32 ufRate; ///< UF rate in L/hr. } DURATION_VALIDATE_RESPONSE_PAYLOAD_T; +/// Payload record structure for UI response. +typedef struct +{ + BOOL accepted; ///< Accepted/Rejected + U32 rejectionReason; ///< Rejection reason if not accepted. +} UI_RESPONSE_PAYLOAD_T; + /// Payload record structure for bolus volume change request. typedef struct { U32 bolusVolume; ///< Requested bolus volume (in mL). } BOLUS_VOLUME_CHANGE_REQUEST_PAYLOAD_T; -/// Payload record structure for bolus volume change response. -typedef struct -{ - BOOL accepted; ///< Accepted/Rejected. - U32 rejectionReason; ///< Rejection reason if not accepted -} BOLUS_VOLUME_CHANGE_RESPONSE_PAYLOAD_T; - /// Payload record structure for pressure limit change request. typedef struct { @@ -160,7 +162,6 @@ BOOL accepted; ///< Accepted/Rejected. U32 rejectionReason; ///< Rejection reason if not accepted. F32 ufVolumeGoal; ///< UF Volume in L. - U32 duration; ///< new Treatment duration in minutes. F32 ufRate; ///< new UF rate in L/hr. } UF_VOLUME_RESPONSE_PAYLOAD_T; @@ -170,47 +171,26 @@ U32 flowRate; ///< Blood flow rate in mL/min. } BLOOD_FLOW_RATE_CHANGE_REQUEST_PAYLOAD_T; -/// Payload record structure for blood flow rate change response. -typedef struct -{ - BOOL accepted; ///< Accepted/Rejected. - U32 rejectionReason; ///< Rejection reason if not accepted. -} BLOOD_FLOW_RATE_CHANGE_RESPONSE_PAYLOAD_T; - /// Payload record structure for dialysate flow rate change request. typedef struct { U32 flowRate; ///< Dialysate flow rate in mL/min. } DIALYSATE_FLOW_RATE_CHANGE_REQUEST_PAYLOAD_T; -/// Payload record structure for dialysate flow rate change response. -typedef struct -{ - BOOL accepted; ///< Accepted/Rejected. - U32 rejectionReason; ///< Rejection reason if not accepted. -} DIALYSATE_FLOW_RATE_CHANGE_RESPONSE_PAYLOAD_T; - /// Payload record structure for dialysate temperature change request. typedef struct { F32 temperature; ///< Dialysate temperature in degrees Celsius. } DIALYSATE_TEMPERATURE_CHANGE_REQUEST_PAYLOAD_T; -/// Payload record structure for dialysate temperature change response. -typedef struct -{ - BOOL accepted; ///< Accepted/Rejected. - U32 rejectionReason; ///< Rejection reason if not accepted. -} DIALYSATE_TEMPERATURE_CHANGE_RESPONSE_PAYLOAD_T; - /// Payload record structure for treatment set points change request. typedef struct { U32 bloodFlowRate; ///< Blood flow rate. U32 dialysateFlowRate; ///< Dialysate flow rate. F32 dialysateTemperature; ///< Dialysate temperature. U32 acidConcentrate; ///< Acid concentrate. - U32 acidConcentrateConversionFactor; ///< Acid concentrate conversion factor. + F32 acidConcentrateConversionFactor; ///< Acid concentrate conversion factor. U32 bicarbonateConcentrate; ///< Bicarbonate concentrate. U32 treatmentModality; ///< Treatment modality. U32 hepatitis; ///< Hepatitis status.