Index: firmware/App/Controllers/PresOccl.h =================================================================== diff -u -rca238a4fc2400ffaf3c2a90c6e923a87b8dac4d2 -r28792ebd1efc85c71523e9cbf4164e4cd4eb2ba6 --- firmware/App/Controllers/PresOccl.h (.../PresOccl.h) (revision ca238a4fc2400ffaf3c2a90c6e923a87b8dac4d2) +++ firmware/App/Controllers/PresOccl.h (.../PresOccl.h) (revision 28792ebd1efc85c71523e9cbf4164e4cd4eb2ba6) @@ -14,39 +14,39 @@ * @date (original) 15-Jan-2020 * ***************************************************************************/ - -#ifndef __PRESSURE_OCCLUSION_H__ -#define __PRESSURE_OCCLUSION_H__ - -#include "HDCommon.h" - -/** - * @defgroup PressureOcclusion PressureOcclusion - * @brief Pressure & Occlusion controller/monitor module. Monitors the + +#ifndef __PRESSURE_OCCLUSION_H__ +#define __PRESSURE_OCCLUSION_H__ + +#include "HDCommon.h" + +/** + * @defgroup PressureOcclusion PressureOcclusion + * @brief Pressure & Occlusion controller/monitor module. Monitors the * venous line pressure sensor (Honeywell HSCMRNN030PDSA3), arterial line - * pressure sensor (Memscap 32022-100mm) and pump occlusion sensors (SMD DIA8308). - * - * @addtogroup PressureOcclusion - * @{ - */ - -// ********** public definitions ********** - -/// Enumeration of pressure sensors monitored by this module. -typedef enum PressureSensors -{ - PRESSURE_SENSOR_ARTERIAL = 0, ///< Arterial blood line pressure sensor - PRESSURE_SENSOR_VENOUS, ///< Vensous blood line pressure sensor - NUM_OF_PRESSURE_SENSORS ///< Number of pressure sensors -} PRESSURE_SENSORS_T; - -/// Enumeration of occlusion sensors monitored by this module. -typedef enum OcclusionSensors -{ - OCCLUSION_SENSOR_BLOOD_PUMP = 0, ///< Blood pump occlusion sensor - OCCLUSION_SENSOR_DIAL_IN_PUMP, ///< Dialysate inlet pump occlusion sensor - OCCLUSION_SENSOR_DIAL_OUT_PUMP, ///< Dialysate outlet pump occlusion sensor - NUM_OF_OCCLUSION_SENSORS ///< Number of occlusion sensors + * pressure sensor (Memscap 32022-100mm) and pump occlusion sensors (SMD DIA8308). + * + * @addtogroup PressureOcclusion + * @{ + */ + +// ********** public definitions ********** + +/// Enumeration of pressure sensors monitored by this module. +typedef enum PressureSensors +{ + PRESSURE_SENSOR_ARTERIAL = 0, ///< Arterial blood line pressure sensor + PRESSURE_SENSOR_VENOUS, ///< Vensous blood line pressure sensor + NUM_OF_PRESSURE_SENSORS ///< Number of pressure sensors +} PRESSURE_SENSORS_T; + +/// Enumeration of occlusion sensors monitored by this module. +typedef enum OcclusionSensors +{ + OCCLUSION_SENSOR_BLOOD_PUMP = 0, ///< Blood pump occlusion sensor + OCCLUSION_SENSOR_DIAL_IN_PUMP, ///< Dialysate inlet pump occlusion sensor + OCCLUSION_SENSOR_DIAL_OUT_PUMP, ///< Dialysate outlet pump occlusion sensor + NUM_OF_OCCLUSION_SENSORS ///< Number of occlusion sensors } OCCLUSION_SENSORS_T; /// Enumeration of arterial/venous pressure limits states. @@ -58,8 +58,8 @@ PRESSURE_LIMITS_STATE_STABILIZATION, ///< Stabilization - in Treatment mode state where BP is running (dialysis or stop), but need to stabilize first PRESSURE_LIMITS_STATE_STABLE, ///< Stable - in Treatment mode state where BP is running (dialysis or stop) and limit windows apply NUM_OF_PRESSURE_LIMITS_STATES ///< Number of pressure limits states -} PRESSURE_LIMITS_STATES_T; - +} PRESSURE_LIMITS_STATES_T; + /// Payload record structure for the pressure & occlusions data message. typedef struct { @@ -75,42 +75,42 @@ F32 venousLongFilterPres; ///< Latest long filtered venous pressure (mmHg) } PRESSURE_OCCLUSION_DATA_T; -// ********** public function prototypes ********** - -void initPresOccl( void ); -void execPresOccl( void ); +// ********** public function prototypes ********** +void initPresOccl( void ); +void execPresOccl( void ); + void execPresOcclTest( void ); SELF_TEST_STATUS_T execPresOcclDryTest( void ); SELF_TEST_STATUS_T execPresOcclSelfTest( void ); void setPressureLimitsToOuterBounds( void ); void updatePressureLimitWindows( void ); -void signalInitiatePressureStabilization( void ); - +void signalInitiatePressureStabilization( void ); + F32 getMeasuredArterialPressure( void ); -F32 getFilteredArterialPressure( void ); +F32 getFilteredArterialPressure( void ); F32 getLongFilteredArterialPressure( void ); F32 getMeasuredVenousPressure( void ); F32 getFilteredVenousPressure( void ); -F32 getLongFilteredVenousPressure( void ); -U32 getMeasuredBloodPumpOcclusion( void ); +F32 getLongFilteredVenousPressure( void ); +U32 getMeasuredBloodPumpOcclusion( void ); BOOL isCartridgeLoaded( void ); BOOL isCartridgeUnloaded( void ); BOOL isSalineBagEmpty( void ); void setOcclusionInstallLevel( void ); -BOOL testSetPresOcclDataPublishIntervalOverride( U32 value ); -BOOL testResetPresOcclDataPublishIntervalOverride( void ); -BOOL testSetArterialPressureOverride( F32 value ); -BOOL testResetArterialPressureOverride( void ); -BOOL testSetVenousPressureOverride( F32 value ); -BOOL testResetVenousPressureOverride( void ); -BOOL testSetBloodPumpOcclusionOverride( U32 value ); -BOOL testResetBloodPumpOcclusionOverride( void ); - -/**@}*/ - -#endif +BOOL testSetPresOcclDataPublishIntervalOverride( U32 value ); +BOOL testResetPresOcclDataPublishIntervalOverride( void ); +BOOL testSetArterialPressureOverride( F32 value ); +BOOL testResetArterialPressureOverride( void ); +BOOL testSetVenousPressureOverride( F32 value ); +BOOL testResetVenousPressureOverride( void ); +BOOL testSetBloodPumpOcclusionOverride( U32 value ); +BOOL testResetBloodPumpOcclusionOverride( void ); + +/**@}*/ + +#endif