# swiGetLocalTimeslotInfo

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

#### Prototype

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

Argument | Description
swihd | Switch handle .
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 { DWORD localstream; DWORD localtimeslot; DWORD deviceid; DWORD parameterid; } SWI_LOCALTIMESLOT_ARGS; 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 values

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.

#### Details

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.

#### See also

swiConfigLocalStream, swiConfigLocalTimeslot, swiGetBoardInfo, swiGetDriverInfo, 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]));
}
}