(Page 21 of 28 in this chapter)
The SWI_LOCALDEVICE_DESC structure contains the following fields:
Field
Description
timeslots
The number of timeslots on the local stream.
deviceid
The device identifier of the local stream.
void myPrintSwitchCaps(SWIHD hd)
{
SWI_SWITCHCAPS_ARGS cp;
SWI_LOCALDEV_DESC *localdevs;
swiGetSwitchCaps(hd, &cp, NULL, 0);
localdevs = (SWI_LOCALDEV_DESC *)malloc(
sizeof(SWI_LOCALDEV_DESC)*cp.numlocalstreams);
swiGetSwitchCaps(hd, &cp, localdevs, cp.numlocalstreams);
printf("Driver Software Std. %s Rev. %2.f\n",
((cp.swstandard == MVIP95_STANDARD_MVIP95)? "MVIP-95" :
"MVIP-90"),
(float)cp.swstdrevision/100.0);
printf("Hardware Std. %s Rev. %2.f.\n",
((cp.hwstandard == MVIP95_STANDARD_HMVIP)? "HMVIP" :
"MVIP-90"),
(float)cp.hwstdrevision/100.0);
printf("Driver Rev. %.2f\n", (float)cp.dvrrevision/100.0);
printf(" Domain %04X, Routing %04X, Blocking %04X.\n",
cp.domain, cp.routing, cp.blocking );
if( cp.numlocalstreams > 0 )
{
DWORD i;
printf("Supports %d local streams:\n\t",
cp.numlocalstreams );
for( i=0; i<cp.numlocalstreams; i++ )
printf( "%2d ", i+16 );
printf("with\n\t");
for( i=0; i<cp.numlocalstreams; i++ )
printf( "%2d ", localdevs[i].timeslots );
printf("timeslots respectively.\n");
}
free(localdevs);
}
Driver Software Std. MVIP-90 Rev. 0.00, Hardware Std. MVIP-90 Rev. 0.
Driver Rev. 17.00, Domain FFFF, Routing 01FF, Blocking 00FF.
Supports 4 local streams:
16 17 18 19 with
24 24 32 32 timeslots respectively.
(Page 21 of 28 in this chapter)