EMS Manual
Procedure Calls for Standard Events
EMS Manual—426909-005
11-48
Procedure for Sending Events
If the Subject token ID has a variable length, choose one of these ways to
specify the length.
If the Subject length is present, the Subject length is the length, in
bytes, of the Subject value.
If the Subject length is not present, place the subject length in the two
bytes that immediately precede the Subject value. Make the Subject
value point to the extra two bytes. Do not count the two-byte length field as
part of the subject length.
The subject of this event is the object that received the event. The Subject
value must be fully qualified so that it can be uniquely identified from any point in
a network. An example is \nodename.$volume.subvolume.filename.
Use EMSADDSUBJECT or EMSADDSUBJECTMAP to specify additional subjects.
Use EMSADDTOKENS or EMSADDTOKENMAPS to specify the additional
information that is useful in the subsystem-defined event.
Procedure for Sending Events
To send the formatted event buffer to the configured collector (primary or alternate),
use the file system procedure WRITEREAD(X).
Program Example
This C example illustrates the use of an EMS_???_EVT_BLD_ call to build an event
buffer and send it to the collector.
Assumption: These handling-error functions exist in the myerror file:
handle_error_unavail_event(short)
handle_error_add_token(short)
handle_error_get_token(short)
handle_error_write_read()
/*
* External declarations
*/
#pragma RUNNABLE
#pragma NOXMEM
#include <stdlib.h> nolist
#include <string.h> nolist
#include <stdio.h> nolist
#include <tal.h> nolist
#include <CEXTDECS(EMS_OBJ_UNAVAIL_EVT_BLD_)> nolist