Index: firmware/App/Services/AlarmMgmt.c =================================================================== diff -u -r4ddf1777acc4298a9ed034e56b66916256d22c18 -r7dae221794a30c403c06d90e12f3ab28830dffbe --- firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision 4ddf1777acc4298a9ed034e56b66916256d22c18) +++ firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision 7dae221794a30c403c06d90e12f3ab28830dffbe) @@ -44,8 +44,7 @@ #define SUPERVISOR_ALARM_KEY 0xD2C3B4A5 ///< 32-bit key required for clear all alarms request. -#define LOWEST_ALARM_SUB_RANK 999 ///< Lowest alarm sub-rank that can be set. -#define MAX_ALARM_LIST_SIZE 10 ///< Maximum number of active alarms inside alarm list. +#define LOWEST_ALARM_SUB_RANK 999 ///< Lowest alarm sub-rank that can be set. // *** This declaration will cause a compiler error if ALARM_TABLE does not have same # of alarms as the Alarm_List enumeration. U08 alarmTableSizeAssertion[ ( ( sizeof( ALARM_TABLE ) / sizeof( ALARM_T ) ) == NUM_OF_ALARM_IDS ? 1 : -1 ) ]; @@ -710,16 +709,17 @@ *************************************************************************/ void handleActiveAlarmListRequest( void ) { - BOOL accepted = TRUE; - REQUEST_REJECT_REASON_CODE_T rejReason = REQUEST_REJECT_REASON_NONE; - U32 activeAlarmList[ MAX_ALARM_LIST_SIZE ]; + ACTIVE_ALARM_LIST_RESPONSE_PAYLOAD_T activeAlarmPayload; U32 index; U32 activeAlarmListIndex = 0; + activeAlarmPayload.accepted = TRUE; + activeAlarmPayload.rejectionReason = (U32)REQUEST_REJECT_REASON_NONE; + // Blank alarm list initially for ( index = 0; index < MAX_ALARM_LIST_SIZE; index++ ) { - activeAlarmList[ index ] = ALARM_ID_NO_ALARM; + activeAlarmPayload.activeAlarmList[ index ] = ALARM_ID_NO_ALARM; } // Fill alarm list from (up to) 10 highest priority active alarms @@ -729,13 +729,13 @@ { if ( ( TRUE == isAlarmActive( ALARM_RANK_TABLE[ index ].alarmID ) ) && ( activeAlarmListIndex < MAX_ALARM_LIST_SIZE ) ) { - activeAlarmList[ activeAlarmListIndex ] = ALARM_RANK_TABLE[ index ].alarmID; + activeAlarmPayload.activeAlarmList[ activeAlarmListIndex ] = ALARM_RANK_TABLE[ index ].alarmID; activeAlarmListIndex++; } } } - sendActiveAlarmsList( accepted, rejReason, activeAlarmList, sizeof( activeAlarmList ) ); + sendActiveAlarmsList( activeAlarmPayload ); } /*********************************************************************//**