/*********************************************************************//*** * * Copyright (c) 2019-2020 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 ModeService.c * * @date 19-Sep-2019 * @author S. Nash * * @brief Top-level state machine for the service mode. * **************************************************************************/ #include "OperationModes.h" #include "ModeService.h" /** * @addtogroup ServiceMode * @{ */ // ********** private definitions ********** /// Enumeration of service mode states. typedef enum Service_States { SERVICE_STATE_START = 0, ///< Start service mode state. NUM_OF_SERVICE_STATES ///< Number of service mode states. } SERVICE_STATE_T; // ********** private data ********** static SERVICE_STATE_T serviceState = SERVICE_STATE_START; ///< Currently active service state. // ********** private function prototypes ********** /*********************************************************************//** * @brief * The initServiceMode function initializes the Service Mode module. * @details * Inputs : none * Outputs : Service Mode module initialized. * @return none *************************************************************************/ void initServiceMode( void ) { serviceState = SERVICE_STATE_START; } /*********************************************************************//** * @brief * The transitionToServiceMode function prepares for transition to service mode. * @details * Inputs : none * Outputs : * @return none *************************************************************************/ void transitionToServiceMode( void ) { } /*********************************************************************//** * @brief * The execServiceMode function executes the Service Mode state machine. * @details * Inputs : none * Outputs : * @return none *************************************************************************/ void execServiceMode( void ) { // execute current service state switch ( serviceState ) { case SERVICE_STATE_START: break; default: serviceState = SERVICE_STATE_START; // TODO - s/w fault break; } } /**@}*/