Previous PageTable Of Contents../index.htmlIndexNext Page

dt_open( )

Description | Cautions | Example | Errors | See Also

Name:

int dt_open(name,oflags)

Inputs:

char *name

  Digital Network Interface logical board or time slot device name

 

int oflags

  open attribute flags; reserved for future use

Returns:

device handle if successful
-1 on failure

Includes:

srllib.h
dtilib.h

Category:

Resource Management

Mode:

synchronous

Top Of PageDescription

The dt_open( ) function opens a Digital Network Interface device and returns a unique handle to identify the device. All subsequent references to the opened device must use the returned device handle.

All Digital Network Interface logical boards and time slot devices can be opened with this function. Opening a Digital Network Interface device does not alter the state of the device. Opening or closing a Digital Network Interface device does not affect other processes using the device but a command can only be issued while the device is idle.

NOTE:
If a parent process opens a device and enables events, there is no guarantee that the child process will receive a particular event. It is recommended that you open devices in a parent process and enable events in a child process.

Parameter

Description

name:

Points to an ASCIIZ string that contains the name of a valid Digital Network Interface logical board or time slot device. The Digital Network Interface logical board device names are defined in the configuration file when the System Release Development Package is installed. Valid Digital Network Interface logical board and time slot device names are usually found in the /dev directory.

 

To avoid conflict between the DTI/ driver and the generic driver, follow the guidelines below when defining devices in the configuration files:

 

The name of the D/xxxSC device defined in /usr/dialogic/cfg/.voxcfg may be in the form dtiBx, dtiBx, dtiBxTy, or dtiBxTy where:

 

  x is the logical board device number (e.g. 1, 2, 3, ...)

 

  y is the time slot number beginning with 1 (e.g. 1, 2, .. 24)

NOTE:
The devices are named dtiBx and dtiBxTy by default, but may be named dtiBx or dtiBxTy to allow backwards compatibility for previously designed applications.

oflags:

Reserved for future use. Set this parameter to 0.

Top Of PageCautions

  1. This function will fail under the following conditions:
  2. For T-1 systems, time slot number must be in the range of 1 to 24.
  3. For E-1 systems, time slot number must be in the range of 1 to 30.
  4. Devices should never be opened using the open( ) function.

Top Of PageExample

Top Of PageErrors

The dt_open( ) function does not return errors in the standard Digital Network Interface return code format because it is a system error. If an error occurs during the dt_open( ) call, a -1 will be returned and the specific error message will be returned in the errno global variable. If a call to dt_open( ) is successful, the return value is a valid handle for the open device.

Top Of PageSee Also


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2001, Dialogic Corporation
All rights reserved
This page generated November, 2001