/************************************************************************** * * Copyright (c) 2024-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 * * @author (last) Sean * @date (last) 15-Nov-2024 * * @author (original) Sean * @date (original) 15-Nov-2024 * ***************************************************************************/ #ifndef __OP_MODES_H__ #define __OP_MODES_H__ #include "FPCommon.h" #include "RODefs.h" /** * @defgroup ROOperationModes ROOperationModes * @brief Operation Modes unit. * * @addtogroup ROOperationModes * @{ */ // ********** public definitions ********** #define NO_SUB_STATE 0xFF ///< value for when submode does not have specific substates and is not applicable. /// Payload record structure for op mode broadcast message typedef struct { U32 opMode; ///< Current operating mode U32 subMode; ///< Current sub-mode of current operating mode } OP_MODE_PAYLOAD_T; // ********** public function prototypes ********** void initOperationModes( void ); // Initialize this unit void execOperationModes( void ); void requestNewOperationMode( RO_OP_MODE_T newMode ); // Request a transition to a new operation mode RO_OP_MODE_T getCurrentOperationMode( void ); // Get the current operation mode RO_OP_MODE_T getPreviousOperationMode( void ); // Get the previous operation mode U32 getCurrentSubMode( void ); // Get the current sub-mode void setCurrentSubState( U32 subState ); // Set the current substate. void setCurrent4thLevelState( U32 state ); // Set the current 4th level state. BOOL testSetOperationMode( MESSAGE_T *message ); // Set operation mode override BOOL testSetOpModePublishIntervalOverride( MESSAGE_T *message ); // Set operation mode publish interval override /**@}*/ #endif