Previous PageTable Of Contents../index.htmlIndexNext Page

grtInit( )

Description | Example

Name:

int grtInit (int start_chan, int end_chan, int attributes)

Inputs:

int start_chan

  • Integer representing the first channel to control.

int end_chan

  • Integer representing the last channel to control.

int attribute

  • Attributes associated with the given channel range. The attributes include programming model, event notification and response.

Outputs:

None

 

Returns:

GRT_SUCCESS

  • Successful.

GRT_INVALID_START_CHANNEL

  • Starting channel is out of range.

GRT_INVALID_END_CHANNEL

  • Ending channel is out of range.

GRT_NO_DISPATCHER

  • Dispatcher is not running.

GRT_ALREADY_CONTROLLED

  • If any channel in the range is controlled by another thread.
 

GRT_CONTROL_BUSY

  • Semaphore could not be locked.
 

GRT_UNLOCK_FAIL

  • Semaphore could not be unlocked.
 

GRT_LOCK_FAILED

  • Semaphore could not be locked.
 

GRT_PROCESS_ATTRIBUTE_FAIL

  • Could not enable notification or response on the fax channel.
 

GRT_OPEN_FAIL

  • Could not open notification or response pipe to fax channel.

Includes:

genra.h

Top Of PageDescription

The grtInit( ) function initializes the GRT interface. To initialize internal data structure with the proper value to control the given range of channels.

This function can be called multiple times in a thread as long as different ranges of channels are used.

These are the attributes that are currently supported.

Behavior

grtInit( ) has been enhanced to prevent automatic posting of the completed queue record to the queue file. This action is usually not necessary as most applications also receive a copy of the same queue record when the GRT_CALL_TERM_ENABLE attribute is specified in grtInit( ).

However, you can restore the ability of the GDK to automatically post the completed queue record to the queue file with the following gfdRemoteRequest( ) command as demonstrated in the code fragment:

The gfdRemoteRequest command must be issued on a per-channel basis.

Top Of PageExample


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2000, Dialogic Corporation
All rights reserved
This page generated January, 2002