/************************************************************************** * * Copyright (c) 2024-2024 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 Level.h * * @author (last) Vinayakam Mani * @date (last) 11-Oct-2024 * * @author (original) Vinayakam Mani * @date (original) 11-Oct-2024 * ***************************************************************************/ #ifndef LEVEL_H_ #define LEVEL_H_ #include "DDCommon.h" /** * @defgroup Level Level * @brief Level module monitors the floater levels, Bicarb gas separation level and Spent * dialsate balance air separation level. * Level manufacturer: Custom built modules. * * @addtogroup Level * @{ */ // ********** public definitions ********** /// DD floater and level sensor enumeration typedef enum level_names { D6_LEVL = 0, ///< floater switch low, medium and high status D63_LEVL, ///< bicarb level low or high status D46_LEVL, ///< Spent dialysate air separation chamber level low or high status #ifdef __PUMPTEST__ PUMP_TRIG_LEVEL, ///< Trigger for piston pump dosing ( high or low input signal) #endif NUM_OF_LEVELS ///< Number of levels } LELVEL_T; /// floater and level sensor states. typedef enum level_States { LEVEL_STATE_LOW = 0, ///< Low level LEVEL_STATE_HIGH, ///< High level LEVEL_STATE_MEDIUM, ///< Medium level LEVEL_STATE_ILLEGAL, ///< Illegal level NUM_OF_LEVELS_STATES ///< Number of level states } LEVEL_STATE_T; /// DD floater and level sensor data publish structure typedef struct { U32 d6Level; ///< Floater level U32 d63Level; ///< Bicarb level U32 d46Level; ///< Spent dialysate level } LEVEL_DATA_T; // ********** public function prototypes ********** void initLevels( void ); void execLevels( void ); LEVEL_STATE_T getLevelStatus( LELVEL_T levelId ); BOOL testLevelsDataPublishIntervalOverride( MESSAGE_T *message ); BOOL testLevelStatusOverride( MESSAGE_T *message ); /**@}*/ #endif