/************************************************************************** * * Copyright (c) 2021-2025 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 BloodPrime.h * * @author (last) Varshini Nagabooshanam * @date (last) 26-Dec-2025 * * @author (original) Varshini Nagabooshanam * @date (original) 22-Dec-2025 * ***************************************************************************/ #ifndef __BLOOD_PRIME_H__ #define __BLOOD_PRIME_H__ #include "TDCommon.h" #include "TDDefs.h" /** * @defgroup StateTxBloodPrime StateTxBloodPrime * @brief Blood prime sub-mode of treatment mode. * The blood prime state is where we go when treatment is first started or * when returning to treatment after a rinseback. * In this state, there is no Heparin delivery nor ultrafiltration. * In this state, treatment timer is not running. No dialysis. Dialyzer is bypassed. * In this state, blood pump is slowly ramped to set rate until the prime volume is delivered. * * @addtogroup StateTxBloodPrime * @{ */ // ********** public definitions ****************** #define TUBING_BLOOD_PRIME_VOLUME_ML 106.6F ///< Tubing portion of blood prime volume to prime the blood side circuit (in mL). /// Payload record structure for a blood prime data broadcast message. typedef struct { F32 targetBloodPrimeVolumeMl; ///< Target blood prime volume in mL. F32 deliveredBloodPrimeVolumeMl; ///< Delivered blood prime volume in mL. } BLOOD_PRIME_DATA_PAYLOAD_T; // ********** public function prototypes ********** void initBloodPrime( void ); // Initialize this unit void transitionToBloodPrime( void ); // Prepares for transition to treatment blood prime sub-mode void execBloodPrime( void ); // Execute the blood prime sub-mode state machine BLOOD_PRIME_STATE_T getCurrentBloodPrimeState( void ); // Get the current treatment sub-mode state BOOL testBloodPrimePublishIntervalOverride( MESSAGE_T *message ); BOOL testBloodPrimeVolumeOverride( MESSAGE_T *message ); /**@}*/ #endif