ACC Programmer's Reference Guide

136 Chapter4
ZCOM C I/F Library Routines
GETDEVICE (3X)
GETDEVICE (3X)
NAME getdevice Read ZCOM device definitions
SYNOPSIS
#include <zcom/zcomsys.h>
#include <zcom/zcomcall.h> /* if compiled with ANSI C (recommended) */
int getdevice (dfile, dpp)
char *dfile;
zdev_type **dpp;
DESCRIPTION Routine getdevice reads the ZCOM device file specified by the dfile
parameter and loads the device definition entries into a memory table.
Thepointertothedevicedefinitiontableisreturned(seezdev type
definition below).
If dfile is NULL, it uses the default /opt/acc/cfg/zcomdevice.The
ZCOM device file is a binary file created by the ZDGEN program, from a
user-customizable ASCII file (usually /opt/acc/cfg/zcomdevice.txt).
Refer to the section on zdgen in the Multiprotocol ACC Utilities Reference
Guide for more details.
The libraries libzcom_c.a and libpthread.a must be linked into thecalling
program by giving the options “-lzcom_c -lpthread” to cc(1) or ld(1).