(Page 18 of 28 in this chapter)


swiGetLocalTimeslotInfo

Description

Retrieves stream-specific and timeslot-specific characteristics of a local device.

Prototype

DWORD swiGetLocalTimeslotInfo (SWIHD swihd,
SWI_LOCALTIMESLOT_ARGS *args,
void *buffer,
unsigned size)

swihd Handle returned by swiOpenSwitch.

args Pointer to a SWI_LOCALTIMESLOT_ARGS structure where the configuration information about a device on a specific stream and timeslot of the local bus will be retrieved. The SWI_LOCALTIMESLOT_ARGS structure is:

typedef struct
{
DWORD localstream;
DWORD localtimeslot;
DWORD deviceid;
DWORD parameterid;
} SWI_LOCALTIMESLOT_ARGS;

See the Details section for a description of these fields.

buffer Pointer to timeslot-specific information maintained by the device driver.

size Size of buffer, in bytes.

Return Values

Events

Details

This function retrieves stream-specific and timeslot-specific characteristics of a local device. The configuration information returned is vendor-specific and device-specific.

The SWI_LOCALTIMESLOT_ARGS structure contains the following fields:

Field

Description

localstream

Stream associated with the timeslot to be queried on the local bus.

localtimeslot

Timeslot to be queried on the local bus.

deviceid

Device type on the local stream and timeslot. 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 obtained. This value is vendor 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

swiConfigLocalStream, swiConfigLocalTimeslot, swiGetBoardInfo, swiGetDriverInfo, swiGetLastError, swiGetLocalStreamInfo

Example


void myGetHybridIds(SWIHD agcxhd, DWORD ids[], unsigned count)
{
SWI_LOCALTIMESLOT_ARGS args;
unsigned i;

args.localstream = 0;
args.deviceid = MVIP95_ANALOG_LINE_DEVICE;
args.parameterid = HYBRID_ID;

for (i = 0; i < count; i++)
{
args.localtimeslot = i;
swiGetLocalTimeslotInfo(agcxhd, &args, &ids[i], sizeof(ids[i]));
}
}


(Page 18 of 28 in this chapter)


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