Index: firmware/App/Modes/ModeTreatment.h =================================================================== diff -u -r395522dffef1348e176564925656012f529c1910 -r21de8b3dd16fe60299f5bfa5f85b38ee562b7cfb --- firmware/App/Modes/ModeTreatment.h (.../ModeTreatment.h) (revision 395522dffef1348e176564925656012f529c1910) +++ firmware/App/Modes/ModeTreatment.h (.../ModeTreatment.h) (revision 21de8b3dd16fe60299f5bfa5f85b38ee562b7cfb) @@ -7,8 +7,8 @@ * * @file ModeTreatment.h * -* @author (last) Varshini Nagabooshanam -* @date (last) 09-Jan-2026 +* @author (last) Raghu Kallala +* @date (last) 06-Apr-2026 * * @author (original) Sean Nash * @date (original) 21-Apr-2025 @@ -85,36 +85,50 @@ U32 ufState; ///< Ultrafiltration state. } UF_DATA_PAYLOAD_T; +/// Payload record structure for the in-line pressure limits change response. +typedef struct +{ + BOOL accepted; ///< Accepted. + U32 rejReasonCode; ///< Rejection reason code number. + U32 artPresLimitWindowmmHg; ///< Arterial pressure limit window in mmHg. + U32 venPresLimitWindowmmHg; ///< Venous pressure limit window in mmHg. + U32 venPresLimitAsymmetricmmHg; ///< Venous pressure limit asymmetric in mmHg. + U32 tmpPresLimitWindowmmHg; ///< TMP pressure limit window in mmHg. +} PRESSURE_LIMIT_CHANGE_RESPONSE_T; +#pragma pack(pop) + /// Maximum time in this mode before blood sitting alarm given (in general task intervals). #define MAX_TIME_BLOOD_SITTING ( ( 5 * SEC_PER_MIN * MS_PER_SECOND ) / TASK_GENERAL_INTERVAL ) /// Maximum time in this mode before blood sitting warning given (in general task intervals). #define WARN_TIME_BLOOD_SITTING ( ( 4 * SEC_PER_MIN * MS_PER_SECOND ) / TASK_GENERAL_INTERVAL ) -#pragma pack(pop) - // ********** public function prototypes ********** -void initTreatmentMode( void ); // Initialize this unit -U32 transitionToTreatmentMode( void ); // Prepares for transition to treatment mode -U32 execTreatmentMode( void ); // Execute the treatment mode state machine (call from OperationModes) +void initTreatmentMode( void ); // Initialize this unit +U32 transitionToTreatmentMode( void ); // Prepares for transition to treatment mode +U32 execTreatmentMode( void ); // Execute the treatment mode state machine (call from OperationModes) -void signalAlarmActionToTreatmentMode( ALARM_ACTION_T action ); // Execute alarm action as appropriate for treatment mode -void signalEndTreatment( void ); // Requesting transition to post-treatment mode -void signalBloodPrimeToDialysis( void ); // Blood prime sub-mode is signaling to move on to dialysis sub-mode +void signalAlarmActionToTreatmentMode( ALARM_ACTION_T action ); // Execute alarm action as appropriate for treatment mode +void signalEndTreatment( void ); // Requesting transition to post-treatment mode +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 broadcastTreatmentTimeAndState( void ); // Broadcast the times and states of this treatment +void updateTreatmentBroadcastData( F32 ufRateLhr ); // 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 -BOOL isTreatmentResumeBlocked( void ); // Determine whether the treatment is not allowed to be resumed. -U32 getTreatmentTimeRemainingSecs( void ); // Determine number of seconds remaining in the treatment -U32 getActualTreatmentTimeSecs( void ); // Determine the actual treatment duration in seconds -void setBloodIsPrimed( BOOL flag ); // Set whether the blood-side circuit of the dialyzer has been primed with blood (F causes Tx start/resume to do blood prime first) -BOOL getBloodIsPrimed( void ); // Determine whether the blood-side circuit of the dialyzer has been primed with blood +TREATMENT_STATE_T getTreatmentState( void ); // Determine the current treatment sub-mode (state) +BOOL isTreatmentCompleted( void ); // Determine whether the treatment has completed +BOOL isTreatmentResumeBlocked( void ); // Determine whether the treatment is not allowed to be resumed. +U32 getTreatmentTimeRemainingSecs( void ); // Determine number of seconds remaining in the treatment +U32 getActualTreatmentTimeSecs( void ); // Determine the actual treatment duration in seconds +void setBloodIsPrimed( BOOL flag ); // Set whether the blood-side circuit of the dialyzer has been primed with blood (F causes Tx start/resume to do blood prime first) +BOOL getBloodIsPrimed( void ); // Determine whether the blood-side circuit of the dialyzer has been primed with blood -U32 getTreatmentStartTimeStamp( void ); // Get the treatment start time stamp -U32 getTreatmentEndTimeStamp( void ); // Get the treatment end time stamp +U32 getTreatmentStartTimeStamp( void ); // Get the treatment start time stamp +U32 getTreatmentEndTimeStamp( void ); // Get the treatment end time stamp +// MSG_ID_TD_PRESSURE_LIMITS_CHANGE_RESPONSE +BOOL sendPressureLimitsChangeResponse( PRESSURE_LIMIT_CHANGE_RESPONSE_T *data ); + /**@}*/ #endif