Index: firmware/App/Modes/OperationModes.h =================================================================== diff -u -r73d8423edc56daed591bc0b3f7baee5540aea423 -r3518e8a088c32e75c0c8960d5e629a7401095feb --- firmware/App/Modes/OperationModes.h (.../OperationModes.h) (revision 73d8423edc56daed591bc0b3f7baee5540aea423) +++ firmware/App/Modes/OperationModes.h (.../OperationModes.h) (revision 3518e8a088c32e75c0c8960d5e629a7401095feb) @@ -23,37 +23,42 @@ /** * @defgroup TDOperationModes TDOperationModes - * @brief Operation Modes module. + * @brief Operation Modes unit. * * @addtogroup TDOperationModes * @{ */ // ********** public definitions ********** -#define NO_SUB_STATE 0xFF ///< value for when submode does not have specific substates and is not applicable. +#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 + 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 module +void initOperationModes( void ); // Initialize this unit void execOperationModes( void ); // Execute the operation modes state machine (scheduled periodic call) + void requestNewOperationMode( TD_OP_MODE_T newMode ); // Request a transition to a new operation mode TD_OP_MODE_T getCurrentOperationMode( void ); // Get the current operation mode TD_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( TD_OP_MODE_T newMode ); // Force transition to a given mode (if allowed)