Index: firmware/App/Modes/OperationModes.h =================================================================== diff -u -rcc398b14ccf518f350b57fb5cb8728e5c908bd1e -r7d4711edd7b40cd3e29f43e766f79a8a09586fe9 --- firmware/App/Modes/OperationModes.h (.../OperationModes.h) (revision cc398b14ccf518f350b57fb5cb8728e5c908bd1e) +++ firmware/App/Modes/OperationModes.h (.../OperationModes.h) (revision 7d4711edd7b40cd3e29f43e766f79a8a09586fe9) @@ -1,17 +1,17 @@ /************************************************************************** * -* Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. +* Copyright (c) 2019-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 OperationModes.h +* @file OperationModes.h * -* @author (last) Sean Nash -* @date (last) 29-May-2020 +* @author (last) Dara Navaei +* @date (last) 14-Sep-2023 * -* @author (original) Dara Navaei -* @date (original) 05-Nov-2019 +* @author (original) Dara Navaei +* @date (original) 05-Nov-2019 * ***************************************************************************/ @@ -31,13 +31,29 @@ // ********** public definitions ********** +#define NO_SUB_STATE 0xFF ///< value for when submode does not have specific substates and is not applicable. + +/// 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 +U32 getCurrentOperationSubMode( void ); // get current operation sub mode +void setCurrentSubState( U32 subState ); // Set the current substate. +BOOL testSetOperationMode( DG_OP_MODE_T newMode ); // Force transition to a given mode (if allowed) +BOOL testSetDGOpModePublishIntervalOverride( U32 value ); +BOOL testResetDGOpModePublishIntervalOverride( void ); + /**@}*/ #endif