/************************************************************************** * * Copyright (c) 2021-2022 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 Switches.h * * @author (last) Dara Navaei * @date (last) 13-Aug-2021 * * @author (original) Dara Navaei * @date (original) 24-Jul-2021 * ***************************************************************************/ #ifndef APP_CONTROLLERS_SWITCHES_H_ #define APP_CONTROLLERS_SWITCHES_H_ #include "Common.h" /** * @defgroup Switches Switches * @brief Switches module monitors the fluid door, dialysate cap, and concentrate cap. * Switches manufacturer: Littlefuse PN: 55100 Miniature Flange Mounting Proximity Sensor * * @addtogroup Switches * @{ */ // ********** public definitions ********** /// DG doors and caps enumeration typedef enum switches_names { CONCENTRATE_CAP = 0, ///< Concentrate cap DIALYSATE_CAP, ///< Dialysate cap NUM_OF_CAPS ///< Number of doors and caps } SWITCH_T; /// DG doors and caps data publish structure typedef struct { U32 concentrateCap; ///< Concentrate cap U32 dialysateCap; ///< Dialysate cap } SWITCHES_DATA_T; // ********** public function prototypes ********** void initSwitches( void ); void execSwitches( void ); OPN_CLS_STATE_T getSwitchStatus( SWITCH_T switchId ); BOOL testSetSwitchesDataPublishIntervalOverride( U32 value ); BOOL testResetSwitchesDataPublishIntervalOverride( void ); BOOL testSetSwitchesStatusOverride( U32 switchId, U32 status ); BOOL testResetSwitchesStatusOverride( U32 switchId ); /**@}*/ #endif