ZCOM C I/F Library Routines

GETDEVICE (3X)

char dpname[8]; /* Protocol module name */ } zdev_type;

EXAMPLE

#include

<zcom/zcomsys.h>

 

#include

<zcom/zcomcall.h>

 

int32

ierr;

 

 

char

*dfile;

 

 

zdev_type

*dp;

 

 

ierr = getdevice (dfile, &dp);

 

if (ierr < 0) {

 

 

/* (error; user to check errno) */

 

}

 

 

 

else {

 

 

 

/* (success; ierr indicates number of device types) */

 

}

 

 

FILES

 

 

 

 

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

ZCOM system general include file,

 

 

 

containing data types, data

 

 

 

structures, constants, error codes,

 

 

 

masks, etc.

 

 

 

Note: 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).

 

/opt/acc/cfg/zcomdevice.txt

User-customizable ASCII file used by

 

 

 

ZDGEN to create the binary ZCOM

 

 

 

device file, /opt/acc/cfg/zcomdevice.

Refer to the section on ZDGEN in the

Multiprotocol ACC Utilities Reference

Guide for more details.

Chapter 4

145