Call this subroutine to add alarm update information to the current IPC buffer with an external alarm timestamp.


int amaru_add_update_stamp (bodyptr, bodylen, first_seg,

                      alarm_id, fr_id, user_or_serv_id,

                      ref_id, action, seq_num, resp_type,

                      key, stamp, ret_stat);

char *bodyptr;

int bodylen;

COR_BOOLEAN first_seg;

char alarm_id[ALARM_ID_LEN+1];

char fr_id[FR_ID_LEN+1];

char user_or_serv_id[COR_MAX(USER_ID_LEN, SERVICE_ID_LEN)+1];

char ref_id[AM_REF_ID_LEN+1];


int seq_num;

AM_RESP_TYPE resp_type;


COR_STAMP stamp;

COR_STATUS *ret_stat;

Input Arguments


Pointer to the beginning of the message body of the IPC buffer.


Maximum length of the message body.


Boolean value specifying whether the current generation request should be the first request in the message. TRUE implies first segment.


Identifier of the alarm to be generated.


Identifier of the factory resource for which the alarm is being generated.


Used for labeling logged alarms. Usually this is the service_id of the sending process. The AMAP sends the user_id of the connected terminal.


Used to specify unique alarms when multiple alarm definitions are generated for the same Factory Resources. Alarm uniqueness is defined by the combination of alarm_id, fr_id, and ref_id.


Note: The ref_id is not displayed directly on the Alarm Manager User Interface. The ref_id, when used, can be duplicated in a message field for display.


Specifies the update action to take.


Only used by AMAP. Application programs should pass zero (0).


Used to select the type of response desired from the AMRP. The application program has three choices:


AM_CAPTURED_RESP - AMRP responds once the message has been captured (sent to a slave process or journalled).


AM_FULL_RESP - AMRP responds once the message has been fully processed. A status segment is returned for each request in the original message.


AM_NO_RESP - No response from AMRP to indicate that an alarm message has been received.


Note: Only the resp_type in the first generation message of each segment is used. Therefore, it is not possible to intermix the type of responses desired within a single IPC message..


The key is useful when the resp_type is set to AM_FULL_RESP. The key allows the application program to match the status segments returned with the alarm generation/update requests. The key is specified by the application program and is returned "as is" by the AMRP.


Specifies the update time for the alarm. If this update causes the alarm to be reset, this timestamp will be used to compute the alarm duration.

Output Arguments


Pointer to status structure.

Return Value:

Either COR_SUCCESS, or COR_FAILURE. If the function returns anything other than COR_SUCCESS, additional error information can be found in ret_stat. Other than the timestamp parameter, this function should in all ways conform to the behavior of amaru_add_update().

More information

Application subroutines for field definitions: Alarm Management API.