Index: AlarmMgmt.c =================================================================== diff -u -r70a7331db2fcde56b3e47816fa57f5209c66c5f8 -r15a8d5ff98b2d88bd0f32a37b41f4eec0f7a7088 --- AlarmMgmt.c (.../AlarmMgmt.c) (revision 70a7331db2fcde56b3e47816fa57f5209c66c5f8) +++ AlarmMgmt.c (.../AlarmMgmt.c) (revision 15a8d5ff98b2d88bd0f32a37b41f4eec0f7a7088) @@ -419,23 +419,28 @@ /*********************************************************************//** * @brief - * The testSetAlarmStateOverride function overrides the state of the + * The testAlarmStateOverride function overrides the state of the * alarm active state for a given alarm with the alarm management with * a given active state. * @details \b Inputs: none * @details \b Outputs: alarm activated or cleared - * @param alarmID ID of alarm to activate or clear - * @param value override state for the given alarm ID (1=activate, 0=clear) + * @param message Override message from Dialin which includes an ID of + * the alarm to override and the state to override the alarm to. * @return TRUE if override successful, FALSE if not *************************************************************************/ -BOOL testSetAlarmStateOverride( U32 alarmID, U32 state ) +BOOL testAlarmStateOverride( MESSAGE_T *message ) { - BOOL result = FALSE; + BOOL result = FALSE; + TEST_OVERRIDE_ARRAY_PAYLOAD_T payload; + OVERRIDE_TYPE_T ovType = getOverrideArrayPayloadFromMessage( message, &payload ); + + // Verify tester has logged in with f/w and override type is valid + if ( ( TRUE == isTestingActivated() ) && ( ovType != OVERRIDE_INVALID ) && ( ovType < NUM_OF_OVERRIDE_TYPES ) ) + { + U32 alarmID = payload.index; + BOOL state = (BOOL)payload.state.u32; - if ( alarmID < NUM_OF_ALARM_IDS ) - { - // Verify tester has logged in with HD - if ( TRUE == isTestingActivated() ) + if ( alarmID < NUM_OF_ALARM_IDS ) { if ( TRUE == state ) { @@ -454,44 +459,10 @@ #endif } result = TRUE; - } + } } return result; } -/*********************************************************************//** - * @brief - * The testResetAlarmStateOverride function resets the override of the - * state of the active state for a given alarm with the alarm management. - * @details \b Inputs: none - * @details \b Outputs: alarm cleared - * @param alarmID ID of alarm to clear - * @return TRUE if alarm clear successful, FALSE if not - *************************************************************************/ -BOOL testResetAlarmStateOverride( U32 alarmID ) -{ - BOOL result = FALSE; - - if ( alarmID < NUM_OF_ALARM_IDS ) - { - // Verify tester has logged in with HD - if ( TRUE == isTestingActivated() ) - { - result = TRUE; -#ifdef _TD_ - clearAlarmTD( (ALARM_ID_T)alarmID ); -#endif -#ifdef _DD_ - clearAlarmDD( (ALARM_ID_T)alarmID ); -#endif -#ifdef _RO_ - clearAlarmRO( (ALARM_ID_T)alarmID ); -#endif - } - } - - return result; -} - /**@}*/