7.10 Development Environment

(Page 11 of 11 in this chapter)
This section describes how to compile applications in order to use the AG Access library. Procedures are discussed for each operating system.

7.10.1 Header Files

The following header files are required to develop applications:

File

Description

adi.h

Contains ADI_EVENT typedef, parameter management function prototypes, and initialization function prototypes for the AG Access library product.

adidef.h

Contains AG Access function prototypes, data types, and constants. This file is included by adi.h.

nmstypes.h

Contains primitive type definitions to promote portability. This file is included by adi.h.

7.10.2 Binaries

The following binaries are shipped with AG Access:

Binary

Description

addaemon

Program which loads and holds AG Access parameters in memory.

adiparm

Displays the default parameters.

aditest

An interactive program for exercising AG Access functions.

agmon

AG loader/monitor.

agtrace

An on-board event trace tool.

brdinfo

Displays the AG hardware configuration for all boards configured with agmon.

dspinfo

Displays information about a .dsp file.

divaload

The loader for DIVA daughterboards.

e1state

Displays the status of an E1 line.

e1test

An interactive test program for E1 applications and trunks.

showsig

Displays signalling on T1 channels.

shoaconx

Displays switch connections.

t1stat

Displays the status of a T1 line.

t1test

An interactive test program for T1 applications and trunks.

7.10.3 Windows NT

Compiling

When compiling an application, you must tell the compiler to find the AG Access header files in the c:\nms\include directory (where c: is replaced with your drive letter). These header files contain conditional compilation for the different AG Access target operating systems. You must define WIN32 on the compilation command line as follows:

 -Ic:\nms\include -DWIN32
You may choose instead to add c:\nms\include to your Include environment variable.

Application Linking

When linking for NT, you must specify the path where the AG Access import library adi.lib resides. This can be done explicitly on the command line, or you may choose to add c:\nms\lib to your Lib environment variable.

When executing NT AG Access applications, you must specify the path where the AG Access dynamic link library adi.dll resides. Add c:\nms\bin to your PATH environment variable via the Control Panel System dialog box.

Example

Refer to the demo program directories for examples of compiling and linking.

Utility Binaries

Utility binaries are stored in c:\nms\bin directory (where c: is replaced with your drive letter). Details concerning their usage are described in section.

Binaries of demo programs are in their respective directories.

Configuration Files

The c:\nms\agaccess\cfg directory (where c: is replaced with your drive letter) contains a sample configuration file used with the AG Access daemon. See Section 8.8.1, AG Access Daemon for more information.

7.10.4 UnixWare 1.1 and 2.x

Compiling

When compiling an application, you must tell the compiler to find the AG Access header files in /opt/nms/include. These header files contain conditional compilation for the different AG Access target operating systems. You must define both UNIX and UNIX_SVR4 on the compilation command line, as follows:

 -I/opt/nms/include -DUNIX -DUNIX_SVR4

Application Linking

When linking for UnixWare, the AG Access shared library, libadi.so, and the system dynamic linker, libdl.so, must be linked with the application program.

You must specify the path where the AG Access shared library libadi.so resides. This can be done on the link line with a -L /opt/nms/lib or by setting the LD_LIBRARY_PATH environment variable to /opt/nms/lib.

Example

The following is an example compile and link of myprog.c:

cc -I/opt/nms/include -DUNIX -DUNIX_SVR4 -L/opt/nms/lib -ladi -ldl myproc.c
Note: For UnixWare 2.x systems, you must also specify the -Kthread flag when compiling and linking. This flag generates and links code for multi-threaded applications.

Utility Binaries

Utility binaries are stored in /opt/nms/bin. Details concerning their usage are described in Chapter 8.

Binaries of demo programs are in their respective directories in /opt/nms/agaccess/demos.

Configuration Files

The /opt/nms/agaccess/cfg directory contains a sample configuration file used with the AG Access daemon. See Section 8.8.1, AG Access Daemon for more information.

7.10.5 OS/2

Compiling

When compiling an application, you must tell the compiler to find the AG Access header files in the c:\nms\include directory (where c: is replaced with your drive letter). These header files contain conditional compilation for the different AG Access target operating systems. You must define OS/2 on the compilation command line as follows:

 -Ic:\nms\include -DOS2
You may choose instead to add c:\nms\include to your INCLUDE environment variable.

Application Linking

When linking for OS/2, you must specify the path where the AG Access import library adi.lib resides. This can be done explicitly on the command line, or you may choose to add c:\nms\lib to your LIB environment variable.

When executing OS/2 AG Access applications, you must specify the path where the AG Access dynamic link library adi.dll resides. Add c:\nms\dll to your LIBPATH environment variable in config.sys.

Example

Refer to the demo program directories for examples of compiling and linking.

Utility Binaries

Utility binaries are stored in c:\nms\bin directory (where c: is replaced with your drive letter). Details concerning their usage are described in Chapter 8.

Binaries of demo programs are in their respective directories.

Configuration Files

The c:\nms\agaccess\cfg directory (where c: is replaced with your drive letter) contains a sample configuration file used with the AG Access daemon. See Section 8.8.1, AG Access Daemon for more information.


(Page 11 of 11 in this chapter)

Copyright 1996 Natural MicroSystems, Inc. All Rights Reserved.