/************************************************************************** * * Copyright (c) 2025-2025 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 FPOperationModes.h * * @author (last) Michael Garthwaite * @date (last) 30-Oct-2025 * * @author (original) Michael Garthwaite * @date (original) 08-Sep-2025 * ***************************************************************************/ #ifndef __FP_OP_MODES_H__ #define __FP_OP_MODES_H__ #include "DDDefs.h" #include "DDCommon.h" #include "FPDefs.h" /** * @defgroup FPOperationModes FPOperationModes * @brief Operation Modes unit. * * @addtogroup FPOperationModes * @{ */ // ********** public definitions ********** #define NO_FP_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 initFPOperationModes( void ); // Initialize this unit void execFPOperationModes( void ); void requestNewFPOperationMode( FP_OP_MODE_T newMode ); // Request a transition to a new operation mode FP_OP_MODE_T getCurrentFPOperationMode( void ); // Get the current operation mode FP_OP_MODE_T getPreviousFPOperationMode( void ); // Get the previous operation mode U32 getCurrentFPSubMode( void ); // Get the current sub-mode BOOL isFPDefeatured( void ); // is the Leahi device is defeatured ( TBD pulled from NV mem ) BOOL isBoostPumpInstalled( void ); // is this leahi device installed with a boost pump ( TBD pulled from NV mem ) REQUEST_REJECT_REASON_CODE_T signalStopGenPermeate( void ); // signal to stop gen permeate request. REQUEST_REJECT_REASON_CODE_T signalStartGenPermeate( void ); // signal to start gen permeate request. void setCurrentFPSubState( U32 subState ); // Set the current substate. void setCurrentFP4thLevelState( U32 state ); // Set the current 4th level state. BOOL testSetFPOperationMode( MESSAGE_T *message ); // Set operation mode override BOOL testSetFPOpModePublishIntervalOverride( MESSAGE_T *message ); // Set operation mode publish interval override BOOL testSetGeneratePermeateSignal( MESSAGE_T *message ); // Set start stop generate permeate. /**@}*/ #endif