ms_getctinfo( )
Cautions | Errors | Example | See Also
Name: int ms_getctinfo (devh, ct_devinfop) Inputs:
Returns: Includes: Category: Mode: Platform: Description
The ms_getctinfo( ) function retrieves information related to a station device on the MSI board.
devh the station device handle ct_devinfop pointer to channel/station information structure. Upon function return, the structure contains device information. See CT_DEVINFO for details. Cautions
This function fails if an invalid station handle is specified.
Errors
If this function returns -1 to indicate failure, obtain the reason for the error by calling the SRL standard attribute function ATDV_LASTERR( ) or ATDV_ERRMSGP( ) to retrieve either the error code or a pointer to the error description, respectively.
Refer to the error type tables found in Chapter 5, "Error Codes". Error defines can be found in dtilib.h or msilib.h.
Example
#include <windows.h> /* For Windows applications only */ #include <errno.h> #include "srllib.h" #include "dtilib.h" #include "msilib.h" int devh; /* Time slot device handle */ CT_DEVINFO ct_devinfo; /* Device information structure */ /* Open board 1 station 1 device */ if ((devh = ms_open("msiB1C1", 0)) == -1) { printf("Cannot open station msiB1C1. errno = %d", errno); exit(1); } /* Get Device Information */ if (ms_getctinfo(devh, &ct_devinfo) == -1) { printf("Error message = %s", ATDV_ERRMSGP(devh)); exit(1); } printf("%s Product Id = 0x%x, Family = %d, Network = %d, Bus mode = %d, Encoding = %d", ATDV_NAMEP(devh), ct_devinfo.ct_prodid, ct_devinfo.ct_devfamily, ct_devinfo.ct_nettype, ct_devinfo.ct_busmode, ct_devinfo.ct_busencoding);See Also
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation