/************************************************************************** * * Copyright (c) 2019-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 OperationModes.h * * @author (last) Sean Nash * @date (last) 08-Jul-2022 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 * ***************************************************************************/ #ifndef __OP_MODES_H__ #define __OP_MODES_H__ #include "DGCommon.h" #include "DGDefs.h" /** * @defgroup DGOperationModes DGOperationModes * @brief Operation Modes module. Manages the top level operation modes of the DG via a state machine. * * @addtogroup DGOperationModes * @{ */ // ********** public definitions ********** /// Operation modes data structure typedef struct { U32 currentMode; ///< Current Mode. U32 currentSubMode; ///< Current Submode. } OP_MODES_DATA_T; // ********** public function prototypes ********** void initOperationModes( void ); // initialize this module void execOperationModes( void ); // execute the operation modes state machine (scheduled periodic call) void requestNewOperationMode( DG_OP_MODE_T newMode ); // request a transition to a new operation mode DG_OP_MODE_T getCurrentOperationMode( void ); // get the current operation mode DG_OP_MODE_T getPreviousOperationMode( void ); // get the previous operation mode BOOL testSetOperationMode( DG_OP_MODE_T newMode ); // Force transition to a given mode (if allowed) BOOL testSetDGOpModePublishIntervalOverride( U32 value ); BOOL testResetDGOpModePublishIntervalOverride( void ); /**@}*/ #endif