Returns information that identifies all H.100 streams operating at one specified speed.
DWORD swiGetStreamsBySpeed ( SWIHD swihd, DWORD speed, DWORD streams[], unsigned maxcount, unsigned *count)
Argument |
Description |
swihd |
|
speed |
Specifies in millions of bits per second the capacity of one or more streams. Refer to the Details section for acceptable values. |
streams |
Array that receives the list of the H.100 streams configured at the specified speed. |
maxcount |
Maximum number of streams allowed. |
count |
Pointer to the returned number of streams. |
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. |
SWIERR_INVALID_SPEED |
Specified speed is unrecognized. Use a speed value specified in the Details section. |
swiGetStreamsBySpeed is specific to MVIP-95. swiGetStreamsBySpeed retrieves a list of the H.100 streams that are operating at one specified speed.
Pass 0 for maxcount to get the number of streams only.
Acceptable values for speed are:
MVIP95_2MBPS_STREAM_SPEED
MVIP95_4MBPS_STREAM_SPEED
MVIP95_8MBPS_STREAM_SPEED
Refer to Configuring stream speed for more information.
If CTAERR_DRIVER_ERROR is returned, call swiGetLastError to retrieve the MVIP device error code.
void myPrintMVIP95Streams(SWIHD hd)
{
DWORD *streams;
unsigned count, i;
/* First get number of streams, by specifying 0 for the maxcount */
swiGetStreamsBySpeed(hd, MVIP95_2MBPS_STREAM_SPEED, streams, 0, &count);
streams = (DWORD *)malloc(sizeof(DWORD)*count);
/* Now get actual stream numbers */
swiGetStreamsBySpeed(hd, MVIP95_2MBPS_STREAM_SPEED, streams, count,
&count);
printf("MVIP-95 compatible streams:\n");
for (i = 0; i < count; i++)
{
printf("%d ", streams[i]);
}
printf("\n");
free(streams);
}