Index: firmware/App/Modes/OperationModes.h =================================================================== diff -u -r8bd1ae47aa13a843aa8abd6321ddc050deacb4a6 -rcd5be724d5a3ba7457e761191d82f278654d7f5c --- firmware/App/Modes/OperationModes.h (.../OperationModes.h) (revision 8bd1ae47aa13a843aa8abd6321ddc050deacb4a6) +++ firmware/App/Modes/OperationModes.h (.../OperationModes.h) (revision cd5be724d5a3ba7457e761191d82f278654d7f5c) @@ -1,14 +1,14 @@ /************************************************************************** * -* Copyright (c) 2019-2021 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 * -* @author (last) Sean Nash -* @date (last) 11-Aug-2021 +* @author (last) Michael Garthwaite +* @date (last) 14-Jun-2023 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -31,6 +31,8 @@ // ********** 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 { @@ -45,7 +47,14 @@ void requestNewOperationMode( HD_OP_MODE_T newMode ); // Request a transition to a new operation mode HD_OP_MODE_T getCurrentOperationMode( void ); // Get the current operation mode HD_OP_MODE_T getPreviousOperationMode( void ); // Get the previous operation mode +U32 getCurrentSubMode( void ); // Get the current sub-mode void initiateAlarmAction( ALARM_ACTION_T action ); // Initiate an alarm or alarm recovery action according to current op mode +CONFIRMATION_REQUEST_STATUS_T getConfirmationRequestStatus( GENERIC_CONFIRM_ID_T requestID ); // Get the current confirmation request status +void setConfirmationRequestStatus( GENERIC_CONFIRM_ID_T requestID, CONFIRMATION_REQUEST_STATUS_T status ); // Set the confirmation request status +GENERIC_CONFIRM_ID_T addConfirmationRequest( GENERIC_CONFIRM_ID_T requestID, GENERIC_CONFIRM_COMMAND_T requestType, U32 rejectReason ); // Add a new confirmation request +void setCurrentSubState( U32 subState ); // Set the current substate. +void setCurrent4thLevelState( U32 state ); // Set the current 4th level state. +void sendOperationStatusEvent( void ); // Constructs and sends operation status event BOOL testSetOperationMode( HD_OP_MODE_T newMode ); // Force transition to a given mode (if allowed) BOOL testSetOpModePublishIntervalOverride( U32 ms );