(Page 9 of 9 in this chapter)


3.8 Development Environment

This section describes how to set environment variables and how to compile applications to use CT Access. The file \nms\ctaccess\doc\files.cta contains a list of all files installed during CT Access installation.

3.8.1 Header Files

The following header files are used to develop applications:
File

Description

ctadef.h

CT Access dispatcher and parameter API

ctaerr.h

CT Access error definitions

nmstypes.h

Contains primitive type definitions to promote portability

vcedef.h

Voice Message service API

swidef.h

Switching service API

adidef.h

ADI service API

3.8.2 Binaries

The following binary files are shipped with CT Access:
Binary

Description

ctaparm

Displays system parameter defaults if using the CT Access daemon.

ctatest

Demonstrates CT Access functions.

ctavers

Verifies CT Access installation and displays the version information for CT Access components.

ctdaemon

Allows you to modify system global default parameters, set the global tracemask, and optionally, log trace messages to a file.

mkprompt

Creates a prompt rules table.

swish

A tool for interactive or text file driven control of MVIP switches. It provides a convenient way to manually try out connections during development to verify the commands that will be given to switches from within CT Access applications that use the Switching service.

testpmpt

Tests a prompt rules table.

vcecopy

Copies messages from one voice file to another.

vceinfo

Displays voice file information.

vceplay

Demonstrates using the Voice Message service to play messages in voice files.

vcerec

Records one or more messages to a voice file.

voxinfo

Displays information about a VOX file.

waveinfo

Displays information about a WAVE file.

Refer to Chapter 13 for more information.

3.8.3 Windows NT

Compiling

When compiling an application, you must tell the compiler where the CT Access header files reside. The header files are in the c:\nms\include directory. You must define WIN32 on the compilation command line as follows:

   -Ic:\nms\include -DWIN32
You may choose to add c:\nms\include to your Include environment variable. In the directory specified above (e.g. c:\nms\include), c: is replaced with your drive letter.

Application Linking

When linking for NT, you must specify the path where the CT Access import libraries (for example, cta.lib, vcemgr.lib, etc.) reside. This is done explicitly on the command line, or you may choose to add c:\nms\lib to your Lib environment variable.

When executing CT access applications, you must specify the path where the service dynamic link libraries reside. Add c:\nms\bin to your Path environment variable via the Control Panel System dialog box.

Example

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

Utility Binaries

Utility binaries are stored in the c:\nms\bin directory. Binaries of demonstration programs are in their respective directories.

Configuration Files

The c:\nms\ctaccess\cfg directory (where c: is replaced with your drive letter) contains a sample configuration file (cta.cfg) used with the ctavers utility and with the CT Access process daemon (ctdaemon). Refer to Section 13.3.2, CT Access Installation: ctavers and Section 13.3.3, CT Access Daemon: ctdaemon for more information.

Prompts/Voice Files

The c:\nms\ctaccess\prompts directory (where c: is replaced with your drive letter) contains prompt tables and voice files used by the demonstration programs.

When executing CT Access applications, voice files can be found by the path specified by the CTA_DPATH environment variable. Define the environment variable CTA_DPATH and set it to c:\nms\ctaccess\prompts;c:\nms\ctaccess\cfg via the Control Panel System dialog box.

3.8.4 UnixWare 2.1

Compiling

When compiling an application, direct the compiler to /opt/nms/include for the CT Access header files. These header files contain conditional compilation for the different CT 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 CT Access shared libraries (for example, libvcemgr.so or libcta.so) and the system dynamic linker, libdl.so, must be linked with the application program.

You must specify the path where the CT Access shared libraries reside. This can be done on the link line with a -L /opt/nms/lib or by setting the CTA_DPATH environment variable to /nms/ctaccess/prompts and /nms/ctaccess/cfg. Refer to the CT Access Installation Manual for more information.

Example

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

cc -I/opt/nms/include -DUNIX -DUNIX_SVR4 -L/opt/nms/lib -lcta -lvcemgr -l swimgr -ladimgr -ldl myproc.c
Note: 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 use are described in Chapter 13.

Binaries of demonstration programs are in their respective subdirectories in /opt/nms/ctaccess/demos.

Configuration Files

The /opt/nms/ctaccess/cfg directory contains a sample configuration file (cta.cfg) used with the ctavers utility and with the CT Access process daemon (ctdaemon). Refer to Section 13.3.2, CT Access Installation: ctavers and Section 13.3.3, CT Access Daemon: ctdaemon for more information.

3.8.5 OS/2

Compiling

When compiling an application, direct the compiler to the c:\nms\include directory for the CT Access header files (where c: is replaced with your drive letter). These header files contain conditional compilation for the different CT 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 CT Access import libraries reside. 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 CT Access applications, you must specify the path where the CT Access dynamic link libraries (for example, libvcemgr.so or libcta.so) reside. Add \nms\ctaccess\prompts and \nms\ctaccess\cfg directories to CTA_DPATH in config.sys. Refer to the CT Access Installation Manual for more information.

Example

Refer to the demonstration 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 use are described in Chapter 13.

Binaries of demonstration programs are in their respective subdirectories.

Configuration Files

The c:\nms\ctaccess\cfg directory (where c: is replaced with your drive letter) contains a sample configuration file (cta.cfg) used with the ctavers utility and with the CT Access process daemon (ctdaemon). Refer to Section 13.3.2, CT Access Installation: ctavers and Section 13.3.3, CT Access Daemon: ctdaemon for more information.

3.8.6 SCO Openserver 5.0

Compiling

When compiling an application, direct the compiler to /opt/nms/include for the CT Access header files. These header files contain conditional compilation for the different CT Access target operating systems. You must define SCO on the compilation command line, as follows:

 -I/opt/nms/include -DSCO

 Application Linking

When linking for SCO, the CT Access shared libraries (for example, libvcemgr.so or libcta.so) and the system dynamic linker, libdl.so, must be linked with the application program.

You must specify the path where the CT Access shared libraries reside. This can be done on the link line with a -L /opt/nms/lib or by setting the CTA_DPATH environment variable to /nms/ctaccess/prompts and /nms/ctaccess/cfg. Refer to the CT Access Installation Manual for more information.

Example

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

cc -I/opt/nms/include -DSCO -L/opt/nms/lib -lcta -lvcemgr -lswimgr -ladimgr -ldl myproc.c
Note: For SCO OpenServer 5.0 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 use are described in Chapter 13.

Binaries of demonstration programs are in their respective subdirectories in /opt/nms/ctaccess/demos.

Configuration Files

The /opt/nms/ctaccess/cfg directory contains a sample configuration file (cta.cfg) used with the ctavers utility and with the CT Access process daemon (ctdaemon). Refer to Section 13.3.2, CT Access Installation: ctavers and Section 13.3.3, CT Access Daemon: ctdaemon for more information.



(Page 9 of 9 in this chapter)


Tech_Support@nmss.com
Copyright © 1996, Natural MicroSystems, Inc. All rights reserved.