Previous PageTable Of Contents../index.htmlIndexNext Page

nr_scroute( )

Description | Cautions | Source Code | See Also

Name:

int nr_scroute(devh1,devtype1,devh2,devtype2,mode)

Inputs:

int devh1

  device handle

 

unsigned short devtype1

  specifies the type of device for devh1

 

int devh2

  device handle

 

unsigned short devtype2

  specifies the type of device for devh2

 

unsigned char mode

  specifies half or full duplex connection

Returns:

0 on success

 

 

-1 on error

 

Includes:

stdio.h, windows.h, srllib.h, dxxxlib.h and sctools.h. Optional - dtilib.h, msilib.h, and faxlib.h.

Category:

Routing convenience

Mode:

Synchronous

Top Of PageDescription

The nr_scroute( ) convenience function connects two Dialogic devices. This function makes a full or half-duplex connection between two Dialogic devices. This function is provided in a separate C source file called sctools.c in the <install drive>:\<install directory>\dialogic\sctools directory. A library version is also available as sctools.lib in the <install drive>:\<install directory>\dialogic\lib directory.

The nr_sc prefix to the function signifies network (analog and digital) devices and resource (voice and fax) devices accessible via the SCbus. See the Digital Network Interface Software Reference for digital interface device details and the FAX Software Reference for FAX device details.

NOTE:
DTI, MSI, or FAX functionality may be conditionally compiled in or out of the function using the DTISC and/or FAXSC defines in the makefile provided with the function. If DTI or FAX functionality is being compiled in, then you must link with the DTI or FAX library. See the Digital Network Interface Software Reference for digital interface device details and the FAX Software Reference for FAX device details.

Parameter

Description

devh1:

Dialogic device handle.

devtype1:

Specifies the type of device for devh1.

 

SC_VOX

voice channel device

 

SC_LSI

analog channel device

 

SC_DTI

digital time slot device

 

SC_MSI

MSI station device

 

SC_FAX

fax channel device

devh2:

Dialogic device handle.

devtype2:

Specifies the type of device for devh2. See devtype1 for list of defines.

mode:

Specifies half or full duplex connection. The mode parameter contains one of the following defines from sctools.h to specify full or half duplex:

 

SC_FULLDUP

specifies make a full duplex connection

 

SC_HALFDUP

specifies make a half duplex connection.

 

The default mode value is SC_FULLDUP. When SC_HALFDUP is specified, then the function returns with the second device listening to the SCbus time slot connected to the first device.

Top Of PageCautions

  1. The devtype1 and devtype2 parameters must match the types of the device handles in devh1 and devh2.
  2. If you have not defined DTISC and FAXSC when compiling the sctools.c file, you cannot use this function to route digital channels, MSI stations, or fax channels.

Top Of PageSource Code

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 February, 2002