Retrieves the stream-specific and timeslot-specific characteristics of a local device.
DWORD swiGetLocalTimeslotInfo ( SWIHD swihd, SWI_LOCALTIMESLOT_ARGS *args, void *buffer, unsigned size)
Argument |
Description |
swihd |
|
args |
Pointer to a SWI_LOCALTIMESLOT_ARGS structure for the configuration information about a device on a specific stream and timeslot of the local bus: typedef struct Refer to 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 value |
Description |
SUCCESS |
|
CTAERR_DRIVER_ERROR |
Underlying driver retrieved an unrecognized error. Call swiGetLastError to retrieve the MVIP device error code. |
CTAERR_FUNCTION_NOT_AVAIL |
Underlying driver does not support the configuration of stream-specific characteristics of a local device. |
CTAERR_INVALID_HANDLE |
swihd is not a valid switch handle. |
CTAERR_SVR_COMM |
Communication error in the server environment. |
swiGetLocalTimeslotInfo retrieves the 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 are: MVIP95_T1_TRUNK_DEVICE MVIP95_E1_TRUNK_DEVICE MVIP95_ANALOG_LINE_DEVICE MVIP95_CONFERENCE_DEVICE
In addition to these values, the device vendor can define device identifiers specific to their products. Refer to the device-specific documentation for these values. |
parameterid |
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 Configuring boards and drivers for more information.
If CTAERR_DRIVER_ERROR is returned, call swiGetLastError to retrieve the MVIP device error code.
swiConfigLocalStream, swiConfigLocalTimeslot, swiGetBoardInfo, swiGetDriverInfo, swiGetLocalStreamInfo
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]));
}
}