(Page 4 of 4 in this chapter)


1.3 About the CT Access Environment

This section provides background information about CT Access and summarizes the main elements of the CT Access environment. You must have CT Access installed on your system to build applications using NaturalFax.

For more detailed information about CT Access, see the CT Access Developer's Manual and the CT Access Function Reference Manual.

1.3.1 Programming Model

CT Access employs an asynchronous programming model in order to take advantage of concurrent processing. When called, most functions return immediately indicating the operation was initiated. The application may then perform other functions while CT Access is processing the command.

There are two types of functions in CT Access, synchronous and asynchronous.

Synchronous functions are complete when the return value is received. The return value may be either SUCCESS or an error code.

For asynchronous functions, if the return value is SUCCESS, the function has been successfully initiated, and the execution result will arrive asynchronously via an event. If the return code is not SUCCESS, the function was never initiated; therefore, no subsequent events associated with the function will be generated.

During the function execution, events are generated indicating the occurrence of certain conditions or state changes. If an asynchronous function fails after being initiated, CT Access delivers a DONE event to the application and the event value field contains an error code.

The following table summarizes the differences between asynchronous and synchronous functions. Chapter 3 lists all NaturalFax functions and indicates if they are synchronous or asynchronous.

Asynchronous

Synchronous

Operation complete when function returns

NO

YES

Returns a DONE event when function is complete

YES

NO

Function can fail after function returns

YES

NO

As shown in Figure 2, for asynchronous functions, CT Access sends a command to the service which sends a command to a telephony board. The board performs the requested functions and sends events to the service indicating its state (e.g., function was started, function is complete, etc.). The service sends events to CT Access which makes them available to the application.

Figure 2. Asynchronous Programming Model


See Appendix C for a complete list of NaturalFax events and Appendix B for a complete list of NaturalFax errors.

1.3.2 CT Access Components

A CT Access service is a group of logically related telephony functions. The NaturalFax service provides functions to send and receive Group 3 faxes.

A CTA context organizes services and accompanying resources around a single processing context. A CTA context usually represents an application instance controlling a single telephone call. Some CTA contexts are not associated with a call; an operation performing fax file conversions does not require a telephone line.

Note: Only one asynchronous fax operation per CTA context can be active at one time.

A service may only be opened once on a CTA context. For example, in order to send faxes on all 24 channels of an AG resource board, 24 CTA contexts are needed with the NaturalFax service opened on each context.

An event queue is the communication path from a service to an application. A service generates events indicating certain conditions or state changes. An application retrieves the events from the event queue.

1.3.3 Managing NaturalFax Parameters in CT Access

The characteristics for CT Access services can be altered by modifying associated parameters. Each NaturalFax parameter structure has default values that are sufficient for most configurations. NaturalFax applications will probably need to set the Subscriber ID (the telephone number) to comply with FCC or other local regulations, but may not need to modify other fax parameters.

CT Access manages parameters for services on a CTA context basis. The CTA context will maintain a copy of the parameters for all services opened on the context. This allows each fax operation to have its own characteristics.

The following CT Access functions allow you to obtain or change parameter information:

Detailed descriptions of NaturalFax parameters and their default values are presented in Appendix E.



(Page 4 of 4 in this chapter)


tech_support@nmss.com
Copyright © 1997, Natural MicroSystems, Inc. All rights reserved.