Intel 05-1832-002 User Manual

Page of 564
Voice API for Windows Operating Systems Library Reference — November 2003
177
clear all fields in a DV_TPT structure — dx_clrtpt( )
dx_clrtpt( )
clear all fields in a DV_TPT structure
!
!
!
Description
The dx_clrtpt( ) function clears all fields except tp_type and tp_nextp in the specified number of 
 structures. This function is provided as a convenient way of clearing a DV_TPT 
structure, before reinitializing it for a new set of termination conditions. 
Notes: 1. The DV_TPT is defined in srllib.h rather than dxxxlib.h since it can be used by other non-voice 
devices. 
2. Before calling dx_clrtpt( ), you must set the tp_type field of 
 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 
!
!
!
Cautions
If tp_type in the 
 structure is set to IO_LINK, you must set tp_nextp to point to the next 
DV_TPT in the chain. The last DV_TPT in the chain must have its tp_type field set to IO_EOT. 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. 
To reinitialize DV_TPT structures with a new set of conditions, call dx_clrtpt( ) only after the 
links have been set up properly, as illustrated in the Example. 
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
Mode:
synchronous 
Platform:
DM3, Springware 
Parameter
Description
tptp 
points to the first DV_TPT structure 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. For more information on this 
structure, see