#ifndef APP_CONTROLLERS_SWITCHES_H_ #define APP_CONTROLLERS_SWITCHES_H_ #include "Common.h" /** * @defgroup Switches Switches * @brief Switches module. Controls the shunt, acid/bicarb cover and door switches. TODO fill up * * @addtogroup Switches * @{ */ // ********** public definitions ********** /// DG doors and caps enumeration typedef enum switches_names { CONCENTRATE_CAP = 0, ///< Concentrate cap DIALYSATE_CAP, ///< Dialysate cap FLUID_DOOR, ///< Fluid door NUM_OF_DOORS_AND_CAPS ///< Number of doors and caps } SWITCH_T; typedef enum switches_status { CLOSED = 0, ///< Closed OPEN, ///< Open NUM_OF_SWITCH_STATUS ///< Number of switch status } SWITCH_STATUS_T; /// DG doors and caps data publish structure typedef struct { U32 concentrateCap; ///< Concentrate cap U32 dialysateCap; ///< Dialysate cap U32 fluidDoor; ///< Fluid door } SWITCHES_DATA_T; // ********** public function prototypes ********** void initSwitches( void ); void execSwitches( void ); SWITCH_STATUS_T getSwitchStatus( SWITCH_T switchId ); BOOL testSetSwitchesDataPublishIntervalOverride( U32 value ); BOOL testResetSwitchesDataPublishIntervalOverrid( void ); BOOL testSetSwitchesStatusOverride( U32 switchId, U32 status ); BOOL testResetSwitchesStatusOverride( U32 switchId ); #endif /* APP_CONTROLLERS_SWITCHES_H_ */