Configures the stream-specific and timeslot-specific characteristics of a local device.
DWORD swiConfigLocalTimeslot ( SWIHD swihd, SWI_LOCALTIMESLOT_ARGS *args, void *buffer, unsigned size)
Argument |
Description |
swihd |
|
args |
Pointer to a SWI_LOCALTIMESLOT_ARGS structure for configuring a device associated with a local stream and timeslot: typedef struct Refer to the Details section for a description of these fields. |
buffer |
Pointer to timeslot specific information interpreted 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 timeslot-specific characteristics of a local device. |
CTAERR_INVALID_HANDLE |
swihd is not a valid switch handle. |
SWIERR_INVALID_PARAMETER |
Either the parameters passed in buffer are invalid for the deviceid or the parameterid, or the deviceid/parameterid combination is not supported, or configuration of the specific local timeslot is not supported. |
CTAERR_SVR_COMM |
Communication error in the server environment. |
swiConfigLocalTimeslot configures stream-specific and timeslot-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.
The SWI_LOCALTIMESLOT_ARGS structure contains the following fields:
Field |
Description |
---|---|
localstream |
Stream to be configured on the local bus. |
localtimeslot |
Timeslot to be configured on the local bus. |
deviceid |
Device type on the local bus. 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 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 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 Configuring boards and drivers for more information.
If CTAERR_DRIVER_ERROR is returned, call swiGetLastError to retrieve the MVIP device error code.
Refer to the documentation for the board you are using for board-specific information.
swiConfigLocalStream, swiGetBoardInfo, swiGetDriverInfo, swiGetLocalStreamInfo, swiGetLocalTimeslotInfo, swiOpenSwitch
void myConfigChannels(SWIHD age1hd)
{
SWI_LOCALTIMESLOT_ARGS args;
struct channel_parms cp;
DWORD i;
args.localstream = 0;
args.deviceid = MVIP95_T1_TRUNK_DEVICE;
args.parameterid = CONFIG_CHANNEL;
cp.size = sizeof(struct channel_parms);
cp.invert = 0;
cp.loopback = 0;
cp.robbedbit = 1;
for (i = 0; i < 24; i++)
{
args.localtimeslot = i;
cp.trunk = i;
swiConfigLocalTimeslot(age1hd, &args, &cp, cp.size);
}
}