User guide
August 2001 181
Switching Calls through the MVIP-90 Bus
Example 10. RHT_QRY_OUTPUT Sample Code (Continued)
/*Query unidirectional MVIP connection. Synchronous call.*/
memset(&Output, 0, sizeof(Outout));
Output.OutputStream = STREAM_MYSELF;
IoctlResult = BrktDeviceIoControl (
LineHandle,
RHT_QRY_OUTPUT,
&Output, /* Buffer to driver */
sizeof(Output),
&Output, /* Buffer to driver */
sizeof(Output),
&BytesReturned,
NULL); /* Wait until I/O is complete */
if (!IoctlResult)
printf ("RHT_QRY_OUTPUT failed: BrktGetLastError = %d\n",
BrktGetLastError (LineHandle));
else
{
if (Output.Mode == CONNECT_MODE)
printf("Connect: (%d,%d) <-- (%d,%d)\n",
Output.OutputStream,
Output.OutputSlot, Output.InputStream,
Output.InputSlot);
else if (Output.Mode == PATTERN_MODE)
printf("Pattern = %X.\n", Output.Message);
else
printf("Disabled (%d,%d).\n", Output.OutputStream,
Output.OutputSlot);
}
BrktCloseDevice (LineHandle);
}