(Page 7 of 28 in this chapter)


swiConfigLocalStream

Description

Configures stream-specific characteristics of a local device.

Prototype

DWORD swiConfigLocalStream (SWIHD swihd,
SWI_LOCALSTREAM_ARGS
*args,
void *buffer,
unsigned
size)

swihd Handle returned by swiOpenSwitch.

args Pointer to a SWI_LOCALSTREAM_ARGS structure for configuring a device associated with a local stream. The SWI_LOCALSTREAM_ARGS structure is:

typedef struct
{
DWORD localstream;
DWORD deviceid;
DWORD parameterid;
} SWI_LOCALSTREAM_ARGS;

See the Details section for a description of these fields.

buffer Pointer to stream specific information interpreted by the device driver.

size Size of buffer, in bytes.

Return Values

Events

Details

This function configures stream-specific characteristics of a local device. The content of the buffer portion of the call contains the configuration information and is vendor-dependent and device-dependent.

For example, use this function to load the configuration data for a digital carrier (MVIP-90 CONFIG_CARRIER command).

The SWI_LOCALSTREAM_ARGS structure contains the following fields:

Field

Description

localstream

The stream to be configured on the local bus.

deviceid

The device type on the local stream. The deviceid is
hardware-dependent. Acceptable values for deviceid are:

MVIP95_T1_TRUNK_DEVICE
MVIP95_E1_TRUNK_DEVICE
MVIP95_ANALOG_LINE_DEVICE
MVIP95_CONFERENCE_DEVICE

In addition to these values, the device vendor may define device identifiers specific to their products. Refer to the device-specific documentation for these values.

parameterid

The data item for which configuration is to be performed. This value is vendor-specific and device driver-specific. The combination of the deviceid and the parameterid specify the part of the device to configure.

Refer to Section 6.3, Board and Driver Configuration for more information.

If CTAERR_DRIVER_ERROR is returned, call swiGetLastError to retrieve the MVIP device error code.

See Also

swiConfigLocalTimeslot, swiGetBoardInfo, swiGetDriverInfo, swiGetLastError, swiGetLocalStreamInfo, swiGetLocalTimeslotInfo

Example


void myConfigE1Carrier(SWIHD age1hd)
{
SWI_LOCALSTREAM_ARGS args;
struct carrier_parms cp;

args.localstream = 0;
args.deviceid = MVIP95_E1_TRUNK_DEVICE;
args.parameterid = CONFIG_CARRIER;

cp.size = sizeof(struct carrier_parms);
cp.trunk = 0;
cp.frame = DT_CEPT;
cp.code = DT_HDB3;
cp.debounce = 1;

swiConfigLocalStream(age1hd, &args, &cp, cp.size);
}


(Page 7 of 28 in this chapter)


tech_support@nmss.com
Copyright © 1997, Natural MicroSystems, Inc. All rights reserved.