/************************************************************************** * * Copyright (c) 2021-2023 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) Dara Navaei * @date (last) 25-May-2022 * * @author (original) Sean Nash * @date (original) 06-Feb-2021 * ***************************************************************************/ #ifndef __BLOOD_PRIME_H__ #define __BLOOD_PRIME_H__ #include "HDCommon.h" #include "HDDefs.h" /** * @defgroup BloodPrime BloodPrime * @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 BloodPrime * @{ */ // ********** 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; F32 deliveredBloodPrimeVolumeMl; } BLOOD_PRIME_DATA_PAYLOAD_T; // ********** public function prototypes ********** void initBloodPrime( void ); void transitionToBloodPrime( void ); void execBloodPrime( void ); BLOOD_PRIME_STATE_T getCurrentBloodPrimeState( void ); BOOL testSetBloodPrimeVolumeOverride( F32 vol ); BOOL testResetBloodPrimeVolumeOverride( void ); BOOL testSetBloodPrimePublishIntervalOverride( U32 ms ); BOOL testResetBloodPrimePublishIntervalOverride( void ); /**@}*/ #endif