Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
ACC Programmer's Reference Guide > Chapter 4 ZCOM C I/F Library Routines

ZGET_SHRCVR_LIST (3X)

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

zget_shrcvr_list - Get list of current shared receivers

SYNOPSIS

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

int32 zget_shrcvr_list (zap, mode, mlen, zrcvrs)

zaddr_type *zap;
uint32 mode;
int32 mlen;
zaddr_type zrcvrs[];

DESCRIPTION

Routine zget_shrcvr_list is used to retrieve the contents of a linked list of shared receivers from the ZCOM subsystem tables. Depending on the mode selected, and terminal specified (if needed), this call will return an array of shared receivers from one of the ZCOM tables (DSC Events, Node Status Receivers, PTT Receivers, or LTT Receivers).

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 Considerations

This routine may be called from a multi-threaded application using the 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.

async-cancel unsafe

The calling thread's cancelability type must be PTHREAD_CANCEL_DEFERRED if cancellation is enabled.

async-signal unsafe

It cannot be called from a signal handler.

fork unsafe

It cannot be called by a child process after fork(2) but before exec(2).

See the NOTES section below for more information on using this routine in a multi-threaded application.

PARAMETERS

zap

ZCOM address pointer. The uses of node, zlu and zcs depend on the specified mode. But in general this is used to select the specific table entry from which you want the shared receivers list.

mode

Specifies which shared receiver list to return.

0 - Logical Terminal Table Shared Receivers (zap->zlu is the ZLU of a terminal entry in the LTT, node and zcs are not used)

1 - Physical Terminal Table Shared Receivers for "normal" data and Status messages (zap->zlu is the ZLU of an entry in the PTT).

2 - Physical Terminal Table Shared Receivers for "control" messages (zap->zlu is the ZLU of a terminal in the PTT).

3 - DSC Event Receivers (The zap parameter is not used)

4 - Node Status Event Receivers (zap->node is the required node number, zcs and zlu are not used)

mlen

Maximum number of receivers to be returned in the zrcvrs array. To get the full list of receivers, this should be ZcMAX_SHARED_RCVRS+1.

zrcvrs
(ReturnParam)

This is a returned array of all shared receivers currently configured. Each entry in the array is a single receiver for the type of data specified by the mode parameter. The list is terminated by an entry with a zlu value of 0. The maximum number of receivers in each type of shared receiver list is set to ZcMAX_SHARED_RCVRS (currently, 64). Hence, to get the full list of receivers, this array should have ZcMAX_SHARED_RCVRS+1 entries.

RETURN VALUE

Routine zget_shrcvrs_list returns 0 if successful. Otherwise, a non-zero error code is returned. See /opt/acc/include/zcom/zcomsys.h for the list of ZCOM error codes and their meanings.

EXAMPLE

#include   <zcom/zcomsys.h>
#include <zcom/zcomcall.h>

int32 ierr;
int32 mlen;
uint32 mode;
zaddr_type zaddr;
zaddr_type rcvrs[size]; /* "size" is user-determined, and is >= mlen */

mlen = size;
mode = 3; /* Get list of receivers waiting for Dynamic Reconfig Events */
if (ierr = zget_shrcvr_list (&zaddr, mode, mlen, rcvrs)) {
/* error return code */
}
else {
/* good return code */
}

FILES

/opt/acc/include/zcom/zcomsys.h

ZCOM subsystem general include file, containing data types, data structures, constants, error codes, masks, etc. Note that this must be the first include file before any other ZCOM include files.

/opt/acc/include/zcom/zcomcall.h

ZCOM routine function prototypes (requires ANSI C compilation).

SEE ALSO

zevent_rcvr(3X), zconfig(3X)

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2000 Hewlett-Packard Development Company, L.P.