ZCOM C I/F Library Routines

ZEVENT_RCVR (3X)

 

ZEVENT_RCVR (3X)

NAME

zevent_rcvr – Set up a program ZLU to receive ZCOM alarms and events

SYNOPSIS

 

 

#include

<zcom/zcomsys.h>

 

#include

<zcom/zcomcall.h> /* if compiled with ANSI C (recommended) */

int zevent_rcvr (rzap, action, eclass, einfop)

zaddr_type

*rzap;

 

int

action;

 

uint32

eclass;

 

Zclinfo_type

*einfop;

 

DESCRIPTION

Routine zevent_rcvr is used to set up a program to receive ZCOM alarm

 

and system event messages. When this routine is called, it causes the

 

ZCOM subsystem to queue the indicated type(s) of events or alarms on

 

the program queue specified by the rzap parameter. The event type is

 

specified through the eclass parameter. The application program can

 

read the event and/or alarm messages by issuing a zread call using the

 

program ZLU specified in the rzap parameter. There is a limit on the

 

number of programs that can request reception of each source of ZCOM

 

event messages (e.g. status event of different target nodes are considered

 

different sources). The limit is set to ZcMAX_SHARED_RCVRS,

 

currently, 64.

 

 

If the action parameter is ZcDELETE, then the receiver linkage is

 

deleted. That is, events and alarms of the indicated type (eclass) will no

 

longer be delivered to that receiver ZLU.

 

The libraries libzcom_c.a and libpthread.a must be linked into the calling

 

program by giving the options “-lzcom_c -lpthread” to cc(1) or ld(1).

Threads

This routine may be called from multi-threaded application using the

Considerations

POSIX (1003.1c) kernel threads API package. This routine has the

 

following characteristics when called by a multi-threaded application:

 

cancellation point

Thread cancellation can occur when a thread

 

 

calls this routine.

226

Chapter 4