Example: Send an Alarm With Multiple Parameters

The following example shows how to send an alarm with multiple parameters:

     #define NUM_PARAMETERS

     AM_MSG_FIELD    msg_field[NUM_PARAMETERS];

     /* xxx is the union member corresponding to the field type */

     msg_field[0].ftype =     ;

     msg_field[0].field, xxx =     ;


     msg_field[NUM_PARAMETERS-1].field, xxx = ...;

     amaru_ADD_GEN (msg_wbody, MAX_MSG_SIZE,










                     &ret_stat) FALSE;   /* reset follows */

In this example, msg_field is a pointer to the beginning of an array of parameters. The types may be different, but they all belong to the same alarm.

More information

Alarm Management API getting started.