User guide
180 RealCT Direct API Developer Guide
Chapter 5: MVIP-90
Identifying the Timeslot Mode
To find out the mode of a timeslot or connections associated with
that timeslot, use the QUERY_OUTPUT function.
QUERY_OUTPUT returns the mode and connections for the
specified MVIP timeslot. QUERY_OUTPUT uses
OutputParam_s.OutputStream and
OutputParam_s.OutputSlot to identify the timeslot. Then it
populates the OutputParam_s.Mode,
OutputParam_s.InputStream, OutputParam_s.InputSlot and
OutputParam_s.Message fields depending on the connection
mode. See the RealCT Direct API Reference Manual for more
information about OutputParam_s.
The RHT_QRY_OUTPUT function is similar to
QUERY_OUTPUT except that QUERY_OUTPUT uses a board
file handle while RHT_QRY_OUTPUT uses a line file handle.
Using a line file handle allows RHT_QRY_OUTPUT to use the
STREAM_MYSELF value for OutputParam_s.OutputStream.
RHT_QRY_OUTPUT is not MVIP compliant.
Example 10 shows how to use QUERY_OUTPUT to identify the
timeslot connection and mode of the first T1 line.
Example 10. RHT_QRY_OUTPUT Sample Code
#include “brktddm.h”
int main(int argc, char **argv)
{
BRKT_HANDLE LineHandle; /* T1 line device handle */
BOOLEAN IoctlResult; /* Result of IOCTL call */
BRKT_SIZE_T BytesReturned; /* Bytes returned from IOCTL call */
struct OutputParam_s Output;
/* Open T1 line device */
LineHandle = BrktOpenDevice (BRKT_DEVICE_T1_LINE, 0);