Index: firmware/App/Services/TxParams.h =================================================================== diff -u -rc92e2b5ae61f359e5633b32b2d5b691347d0d293 -r4644222ff44fd3fc588bd071e794aabad9780bae --- firmware/App/Services/TxParams.h (.../TxParams.h) (revision c92e2b5ae61f359e5633b32b2d5b691347d0d293) +++ firmware/App/Services/TxParams.h (.../TxParams.h) (revision 4644222ff44fd3fc588bd071e794aabad9780bae) @@ -89,90 +89,142 @@ /// Payload record structure for treatment duration validate request. typedef struct { - U32 duration; ///< Requested treatment duration in minutes. + U32 duration; ///< Requested treatment duration in minutes. } DURATION_VALIDATE_REQUEST_PAYLOAD_T; /// Payload record structure for treatment duration confirm request. typedef struct { - U32 duration; ///< Confirmed treatment duration in minutes. - F32 ufRate; ///< Confirmed UF rate in L/hr. + U32 duration; ///< Confirmed treatment duration in minutes. + F32 ufRate; ///< Confirmed UF rate in L/hr. } DURATION_CONFIRM_REQUEST_PAYLOAD_T; /// Payload record structure for treatment duration validate response. typedef struct { - BOOL accepted; ///< Accepted/Rejected - U32 rejectionReason; ///< Rejection reason if not accepted. - U32 duration; ///< Treatment duration in minutes. - F32 ufVolumeGoal; ///< UF volume goal in L. - F32 ufRate; ///< UF rate in L/hr. + BOOL accepted; ///< Accepted/Rejected + U32 rejectionReason; ///< Rejection reason if not accepted. + U32 duration; ///< Treatment 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 bolus volume change request. typedef struct { - U32 bolusVolume; ///< Requested bolus volume (in mL) + 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 + 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 { - S32 arterialPressureLimitWindowMMHG; ///< Arterial pressure limit window in mmHg. - S32 venousPressureLimitWindowMMHG; ///< Venous pressure limit window in mmHg. - S32 venousAsymmetricPressureLimitWindowMMHG; ///< Venous asymmetric pressure limit window in mmHg. - S32 tmpPressureLimitWindowMMHG; ///< TMP pressure limit window in mmHg. + U32 arterialPressureLimitWindowMMHG; ///< Arterial pressure limit window in mmHg. + U32 venousPressureLimitWindowMMHG; ///< Venous pressure limit window in mmHg. + U32 venousAsymmetricPressureLimitWindowMMHG; ///< Venous asymmetric pressure limit window in mmHg. + U32 tmpPressureLimitWindowMMHG; ///< TMP pressure limit window in mmHg. } PRESSURE_LIMIT_CHANGE_REQUEST_T; /// Payload record structure for in-treatment pressure limit change response. typedef struct { - BOOL accepted; ///< Accepted/Rejected. - U32 arterialPressureLimitWindowRejectionReason; ///< Rejection reason for arterial pressure limit window. - U32 venousPressureLimitWindowRejectionReason; ///< Rejection reason for venous pressure limit window. - U32 venousAsymmetricPressureLimitWindowRejectionReason; ///< Rejection reason for venous asymmetric pressure limit window. - U32 tmpPressureLimitWindowRejectionReason; ///< Rejection reason for TMP pressure limit window. + BOOL accepted; ///< Accepted/Rejected. + U32 arterialPressureLimitWindowRejectionReason; ///< Rejection reason for arterial pressure limit window. + U32 venousPressureLimitWindowRejectionReason; ///< Rejection reason for venous pressure limit window. + U32 venousAsymmetricPressureLimitWindowRejectionReason; ///< Rejection reason for venous asymmetric pressure limit window. + U32 tmpPressureLimitWindowRejectionReason; ///< Rejection reason for TMP pressure limit window. } PRESSURE_LIMITS_CHANGE_RESPONSE_PAYLOAD_T; /// Payload record structure for UF volume validate request. typedef struct { - F32 ufVolume; ///< Requested UF volume in L. + F32 ufVolume; ///< Requested UF volume in L. } UF_VOLUME_VALIDATE_REQUEST_PAYLOAD_T; /// Payload record structure for UF volume confirm request. typedef struct { - F32 ufVolume; ///< Confirmed UF volume in L. - F32 ufRate; ///< Confirmed UF rate in L/hr. + F32 ufVolume; ///< Confirmed UF volume in L. + F32 ufRate; ///< Confirmed UF rate in L/hr. } UF_VOLUME_CONFIRM_REQUEST_PAYLOAD_T; /// Payload record structure for UF change response. typedef struct { - 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. + 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; -/// Payload record structure for blood / dialysate rate change response. +/// Payload record structure for blood flow rate change request. typedef struct { - BOOL accepted; ///< Accepted/Rejected - U32 rejectionReason; ///< Rejection reason if not accepted. - U32 bloodRate; ///< new blood flow rate - U32 dialRate; ///< new dialysate flow rate -} BLOOD_DIAL_RATE_CHANGE_RESPONSE_PAYLOAD_T; + 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. + U32 bicarbonateConcentrate; ///< Bicarbonate concentrate. + U32 treatmentModality; ///< Treatment modality. + U32 hepatitis; ///< Hepatitis status. + U32 sodium; ///< Sodium concentration. + U32 bicarbonate; ///< Bicarbonate concentration. +} TREATMENT_PARAMETER_EDIT_REQUEST_T; + +/// Payload record structure for treatment parameter edit response. +typedef struct +{ + BOOL accepted; ///< Accepted/Rejected. + U32 rejectionReason[ NUM_OF_TREATMENT_SETPOINT_PARAMS ]; ///< Rejection reason for each set point. +} TREATMENT_SET_POINTS_CHANGE_RESPONSE_T; + // ********** public function prototypes **************** BOOL setTreatmentParameterU32( TREATMENT_PARAM_T param, U32 value ); // Set a specified unsigned integer treatment parameter value @@ -187,6 +239,10 @@ BOOL validateAndSetBolusVolume( MESSAGE_T *message ); // User provided bolus volume to be set and validated BOOL pressureLimitHandleChangeRequest( MESSAGE_T *message ); // User provided pressure limit window values to be validated and applied BOOL validateAndSetUFVolume( MESSAGE_T *message ); // User provided ultrafiltration volume to be set and validated +BOOL validateAndSetTreatmentSetPoints( MESSAGE_T *message ); // User provided treatment set point values to be validated and applied +BOOL validateAndSetBloodFlowRate( MESSAGE_T *message ); // Validates and applies blood flow rate change from UI button request +BOOL validateAndSetDialysateFlowRate( MESSAGE_T *message ); // Validates and applies dialysate flow rate change from UI button request +BOOL validateAndSetDialysateTemperature( MESSAGE_T *message ); // Validates and applies temperature change from UI button request BOOL signalUserConfirmationOfTreatmentDuration( MESSAGE_T *message ); // Process UI confirm/reject treatment duration BOOL signalUserConfirmationOfUFVolume( MESSAGE_T *message ); // Process UI confirm/reject ultrafiltration volume change @@ -209,6 +265,7 @@ U32 getU32DefaultSysConfigTreatmentParamEdge( SYS_CONFIG_TREATMENT_PARAM_T param, BOOL isMin ); // Get default min/max edge for unsigned integer system configured treatment parameter U32 getSysConfigTreatmentParameterU32( SYS_CONFIG_TREATMENT_PARAM_T param ); // Get a specified unsigned integer system configured treatment parameter U32 getSysConfigTreatmentParameterU32DefaultValue( SYS_CONFIG_TREATMENT_PARAM_T param ); // Get the default value for a specified unsigned integer system configured treatment parameter +BOOL setSysConfigTreatmentParameterU32( SYS_CONFIG_TREATMENT_PARAM_T param, U32 value ); // Set a specified unsigned integer system configured treatment parameter U32 getDialyzerBloodVolume( DIALYZER_TYPE_T dialyzer ); // Get the blood side volume for a given dialyzer type U32 getDialyzerDialysateVolume( DIALYZER_TYPE_T dialyzer ); // Get the dialysate side volume for a given dialyzer type