Index: TestSupport.c =================================================================== diff -u -r6734e9d64e231d58fbb359435399868f939cc84e -r6520e649188757399c2dfd58a30af80d96256295 --- TestSupport.c (.../TestSupport.c) (revision 6734e9d64e231d58fbb359435399868f939cc84e) +++ TestSupport.c (.../TestSupport.c) (revision 6520e649188757399c2dfd58a30af80d96256295) @@ -41,12 +41,12 @@ /*********************************************************************//** * @brief - * The getU08OverrideValue function extracts the appropriate U08 - * value from a given U32 override record according to the record state. - * @details Inputs: none - * @details Outputs: none + * The getU08OverrideValue function extracts the appropriate unsigned byte + * value from a given unsigned integer override record according to the record state. + * @details \b Inputs: none + * @details \b Outputs: none * @param ovU32 pointer to a floating point override record - * @return overridden U08 point value from the record + * @return either the real or overridden unsigned byte value from the record *************************************************************************/ U08 getU08OverrideValue( OVERRIDE_U32_T *ovU32 ) { @@ -62,12 +62,13 @@ /*********************************************************************//** * @brief - * The getU16OverrideValue function extracts the appropriate U16 - * value from a given U32 override record according to the record state. - * @details Inputs: none - * @details Outputs: none + * The getU16OverrideValue function extracts the appropriate unsigned short + * value from a given unsigned integer override record according to the + * record state. + * @details \b Inputs: none + * @details \b Outputs: none * @param ovU32 pointer to a floating point override record - * @return overridden U16 point value from the record + * @return either the real or overridden unsigned short value from the record *************************************************************************/ U16 getU16OverrideValue( OVERRIDE_U32_T *ovU32 ) { @@ -86,9 +87,9 @@ * The getS32OverrideValue function extracts the appropriate signed integer * value from a given signed integer override record according to the * record state. - * @details Inputs: none - * @details Outputs: none - * @param ovS32 pointer to an unsigned integer override record + * @details \b Inputs: none + * @details \b Outputs: none + * @param ovS32 pointer to a signed integer override record * @return either the real or overridden signed integer value from the record *************************************************************************/ S32 getS32OverrideValue( OVERRIDE_S32_T *ovS32 ) @@ -108,8 +109,8 @@ * The getU32OverrideValue function extracts the appropriate unsigned integer * value from a given unsigned integer override record according to the * record state. - * @details Inputs: none - * @details Outputs: none + * @details \b Inputs: none + * @details \b Outputs: none * @param ovU32 pointer to an unsigned integer override record * @return either the real or overridden unsigned integer value from the record *************************************************************************/ @@ -129,8 +130,8 @@ * @brief * The getF32OverrideValue function extracts the appropriate floating point * value from a given float override record according to the record state. - * @details Inputs: none - * @details Outputs: none + * @details \b Inputs: none + * @details \b Outputs: none * @param ovF32 pointer to a floating point override record * @return either the real or overridden floating point value from the record *************************************************************************/ @@ -151,8 +152,8 @@ /*********************************************************************//** * @brief * The initTestConfigs function initializes the test software configurations. - * @details Inputs: none - * @details Outputs: signalRecoverFromFaultMode + * @details \b Inputs: none + * @details \b Outputs: signalRecoverFromFaultMode * @return none *************************************************************************/ void initTestConfigs( void ) @@ -164,79 +165,67 @@ /*********************************************************************//** * @brief * The setTestConfig function sets the test configuration. - * Must be logged into HD/DG. - * @details Inputs: none - * @details Outputs: testConfig - * @param config which is the configuration to set + * @warning Dialin must be logged into related firmware stack to set the + * test configuration successfully. + * @details \b Inputs: none + * @details \b Outputs: testConfig + * @details \b Alarm: ALARM_ID_XX_SOFTWARE_FAULT if invalid + * test configuration parameter given. + * @param config which test configuration to set * @return TRUE if the set configuration was successful otherwise, FALSE *************************************************************************/ BOOL setTestConfig( TEST_CONFIG_T config ) { BOOL status = FALSE; - if ( ( config < NUM_OF_TEST_CONFIGS ) && ( TRUE == isTestingActivated() ) ) + if ( TRUE == isTestingActivated() ) { testConfig[ config ] = TEST_CONFIG_ENABLE_KEY; status = TRUE; } - else - { -#ifdef _DD_ -// SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_DG_INVALID_TEST_CONFIG_SELECTED1, config ) -#endif -#ifdef _TD_ - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_TD_SOFTWARE_FAULT, SW_FAULT_ID_HD_INVALID_TEST_CONFIG_SELECTED1, config ) -#endif - } return status; } /*********************************************************************//** * @brief - * The resetTestConfig function resets the test configuration. - * Must be logged into HD/DG. - * @details Inputs: none - * @details Outputs: testConfig - * @param config which is the configuration to reset + * The resetTestConfig function resets a given test configuration. + * @warning Dialin must be logged into related firmware stack to reset the + * test configuration successfully. + * @details \b Inputs: none + * @details \b Outputs: testConfig + * @details \b Alarm: ALARM_ID_XX_SOFTWARE_FAULT if invalid + * test configuration is given. + * @param config which test configuration to reset * @return TRUE if the reset configuration was successful otherwise, FALSE *************************************************************************/ BOOL resetTestConfig( TEST_CONFIG_T config ) { BOOL status = FALSE; - if ( ( config < NUM_OF_TEST_CONFIGS ) && ( TRUE == isTestingActivated() ) ) + if ( TRUE == isTestingActivated() ) { testConfig[ config ] = TEST_CONFIG_DISABLE_KEY; status = TRUE; } - else - { -#ifdef _DD_ -// SET_ALARM_WITH_2_U32_DATA( ALARM_ID_DD_SOFTWARE_FAULT, SW_FAULT_ID_DG_INVALID_TEST_CONFIG_SELECTED2, config ) -#endif -#ifdef _TD_ - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_TD_SOFTWARE_FAULT, SW_FAULT_ID_HD_INVALID_TEST_CONFIG_SELECTED2, config ) -#endif - } return status; } /*********************************************************************//** * @brief - * The getTestConfigStatus function gets the status of the provided test - * configuration. Must be logged into HD/DG. - * @details Inputs: testConfig - * @details Outputs: none - * @param config the test configuration - * @return TRUE if the test configuration is enabled otherwise, FALSE + * The getTestConfigStatus function gets the status of the given test + * configuration. + * @details \b Inputs: testConfig + * @details \b Outputs: none + * @param config the test configuration to get status of + * @return TRUE if the test configuration is enabled, otherwise FALSE *************************************************************************/ BOOL getTestConfigStatus( TEST_CONFIG_T config ) { BOOL status = FALSE; - if ( ( TEST_CONFIG_ENABLE_KEY == testConfig[ config ] ) && ( TRUE == isTestingActivated() ) ) + if ( TEST_CONFIG_ENABLE_KEY == testConfig[ config ] ) { status = TRUE; } @@ -248,9 +237,11 @@ * @brief * The sendTestConfigStatusToDialin function sends the test configuration * status to dialin. - * @details Inputs: none - * @details Outputs: testConfig - * @return TRUE if the serialization is successful otherwise, FALSE + * @details \b Message \b sent: MSG_ID_TD_SEND_TEST_CONFIGURATION + * @details \b Inputs: testConfig + * @details \b Outputs: none + * @return TRUE if the test configuration message is successfully queued for + * transmit, otherwise FALSE *************************************************************************/ BOOL sendTestConfigStatusToDialin( void ) { @@ -265,10 +256,10 @@ // Create a message record blankMessage( &msg ); #ifdef _DD_ -// msg.hdr.msgID = MSG_ID_DD_SEND_TEST_CONFIGURATION; + msg.hdr.msgID = MSG_ID_DD_SEND_TEST_CONFIGURATION; #endif #ifdef _TD_ -// msg.hdr.msgID = MSG_ID_TD_SEND_TEST_CONFIGURATION; + msg.hdr.msgID = MSG_ID_TD_SEND_TEST_CONFIGURATION; #endif msg.hdr.payloadLen = sizeof( testConfig ); @@ -290,10 +281,11 @@ /*********************************************************************//** * @brief * The resetAllTestConfigs function resets all of the test configurations. - * Must be logged into HD/DG. - * @details Inputs: none - * @details Outputs: testConfig - * @return TRUE if the reset was successful otherwise, FALSE + * @warning Dialin must be logged into related firmware stack to reset the + * test configurations successfully. + * @details \b Inputs: none + * @details \b Outputs: testConfig + * @return TRUE if the reset was successful, otherwise FALSE *************************************************************************/ BOOL resetAllTestConfigs( void ) { @@ -316,9 +308,9 @@ /*********************************************************************//** * @brief - * The setDialinCheckInTimeStamp function set the dialin check in timestamp. - * @details Inputs: none - * @details Outputs: dialinCheckInTimeStamp + * The setDialinCheckInTimeStamp function registers a check-in from Dialin. + * @details \b Inputs: none + * @details \b Outputs: dialinCheckInTimeStamp * @return none *************************************************************************/ void setDialinCheckInTimeStamp( void ) @@ -328,11 +320,11 @@ /*********************************************************************//** * @brief - * The hasDialinCheckInExpired function checks whether the check in from - * dialin has expired or not. - * @details Inputs: none - * @details Outputs: dialinCheckInTimeStamp - * @return TRUE if the check in has been expired otherwise, FALSE + * The hasDialinCheckInExpired function checks whether the check-in from + * Dialin has expired. + * @details \b Inputs: dialinCheckInTimeStamp + * @details \b Outputs: none + * @return TRUE if the check-in has expired, otherwise FALSE *************************************************************************/ BOOL hasDialinCheckInExpired( void ) { @@ -349,10 +341,12 @@ /*********************************************************************//** * @brief - * The setRecoverFromFaultModeSignal function sets the recover from fault - * mode signal upon receiving it from the user. - * @details Inputs: none - * @details Outputs: signalRecoverFromFaultMode + * The setRecoverFromFaultModeSignal function handles the recover from fault + * mode signal from Dialin. + * @warning Dialin must be logged into related firmware stack to set the + * recover from fault mode flag successfully. + * @details \b Inputs: none + * @details \b Outputs: signalRecoverFromFaultMode * @return none *************************************************************************/ void setRecoverFromFaultModeSignal( void ) @@ -365,22 +359,15 @@ /*********************************************************************//** * @brief - * The hasRecoverFromFaultModeBeenSet function returns the status of the - * recover from fault mode signal - * @details Inputs: none - * @details Outputs: signalRecoverFromFaultMode - * @return TRUE is the user is logged in and the signal is TRUE, otherwise FLASE + * The hasRecoverFromFaultModeBeenSet function gets the state of the + * recover from fault mode flag. + * @details \b Inputs: signalRecoverFromFaultMode + * @details \b Outputs: none + * @return TRUE if the recover from fault mode flag is set, otherwise FALSE *************************************************************************/ BOOL hasRecoverFromFaultModeBeenSet( void ) { - BOOL status = FALSE; - - if ( TRUE == isTestingActivated() ) - { - status = signalRecoverFromFaultMode; - } - - return status; + return signalRecoverFromFaultMode; } /**@}*/