Previous PageTable Of Contents../index.htmlIndexNext Page

dx_clrtpt( )

Description | Cautions | Example | Errors | See Also

Name:

int dx_clrtpt(tptp,size)

Inputs:

DV_TPT *tptp

  pointer to termination parameter table structure

 

int size

  number of entries to clear

Returns:

0 if success

 

-1 if failure

Includes:

srllib.h
dxxxlib.h

Category:

Structure Clearance

Top Of PageDescription

The dx_clrtpt( ) function clears all fields in a DV_TPT structure, except tp_type and tp_nextp in the number of DV_TPT structures indicated in the size parameter. dx_clrtpt( ) is provided as a convenient way of clearing a DV_TPT structure, if this is required before initializing it for a new set of terminating conditions.

NOTE:
The DV_TPT is defined in srllib.h since it can be used by other non-Voice devices.
NOTE:
Prior to calling dx_clrtpt( ), you must set the tp_type field of DV_TPT as follows:

IO_CONT

  • if the next DV_TPT is contiguous

IO_LINK

  • if the next DV_TPT is linked

IO_EOT

  • for the last DV_TPT

If tp_type is set to IO_LINK, you MUST set tp_nextp to point to the next DV_TPT in the chain. dx_clrtpt( ) uses the information in tp_type, and in tp_nextp if IO_LINK is set, to access the next DV_TPT. By setting the tp_type and tp_nextp fields appropriately, dx_clrtpt( ) can be used to clear a combination of contiguous and linked DV_TPT structures.

The function parameters are defined as follows:

Parameter

Description

tptp

points to the first DV_TPT to be cleared.

size

indicates the number of DV_TPT structures to clear. If size is set to 0, the function will return a 0 to indicate success.

Top Of PageCautions

dx_clrtpt( ) uses the information present in tp_type and tp_nextp (if IO_LINK is set) to access the next DV_TPT in the chain. The last DV_TPT in the chain must have its tp_type field set to IO_EOT. If the DV_TPTs have to be reinitialized with a new set of conditions, dx_clrtpt( ) must be called only after the links have been set up, as illustrated below.

Top Of PageExample

Top Of PageErrors

The function will fail and return -1 if IO_EOT is encountered in the tp_type field before the number of DV_TPT structures specified in size have been cleared.

Top Of PageSee Also


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2002, Dialogic Corporation
All rights reserved
This page generated February, 2002