/************************************************************************** * * Copyright (c) 2019-2021 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) 25-Jul-2021 * ***************************************************************************/ #ifndef APP_CONTROLLERS_SWITCHES_H_ #define APP_CONTROLLERS_SWITCHES_H_ #include "Common.h" /** * @defgroup Switches Switches * @brief Switches module. Monitors the status of the front door and the pump track switch. * * @addtogroup Switches * @{ */ // ********** public definitions ********** /// HD door enumeration typedef enum switches_names { FRONT_DOOR = 0, ///< Front door PUMP_TRACK_SWITCH, ///< Pump track switch NUM_OF_DOORS_AND_SWITCHES ///< Number of doors and switches } SWITCH_T; /// HD switches data publish structure typedef struct { U32 frontDoor; ///< Front door U32 pumpTrackSwitch; ///< Pump track switch } 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 testResetSwitchesDataPublishIntervalOverrid( void ); BOOL testSetSwitchesStatusOverride( U32 switchId, U32 status ); BOOL testResetSwitchesStatusOverride( U32 switchId ); #endif /* APP_CONTROLLERS_SWITCHES_H_ */