PREV TOC HOME INDEX NEXT


ms_getxmitslot( )


Cautions | Errors | Example | See Also

Name: int ms_getxmitslot (devh, tsinfop)
Inputs:

int devh

  • MSI station device handle

SC_TSINFO *tsinfop

  • pointer to TDM bus time slot information structure
Returns:

0 on success

-1 on failure

Includes:

srllib.h

dtilib.h

msilib.h

Category:

TDM Bus Routing

Mode:

asynchronous

Platform:

DI, HDSI, Springware

Description

The ms_getxmitslot( ) function returns the TDM bus time slot of the station transmit channel.

Parameter

Description

devh the station device handle
tsinfop pointer to the TDM bus time slot information structure, see SC_TSINFO for details. Upon successful return from the function, SC_TSINFO contains the number of TDM bus time slots connected to the transmit of the station and points to the array that contains the TDM bus time slots (between 0 and 1023).

Note: The transmit of an MSI station device can be connected to only one external TDM bus time slot.

Cautions

This function fails when an invalid station device 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".

Example

#include <windows.h>         /* For Windows applications only */
#include "srllib.h"
#include "dtilib.h"
#include "msilib.h"
#include "errno.h"  
int       chdev;                  /* Station dev descriptor */
SC_TSINFO tsinfo;                 /* Time slot information structure */
long      scts;                   /* SCbus time slot */  
/* Open board 1, station 1 device */
if ((chdev1 = ms_open("msiB1C1",0)) == -1) {
    printf( "Cannot open MSI B1, C1: errno=%d", errno);
    exit(1);
}  
/* Set up SC_TSINFO structure */
tsinfo.sc_numts = 1;
tsinfo.sc_tsarray = &scts;  
/* Get time slot on which MSI board 1, channel 1 is transmitting */
if (ms_getxmitslot(chdev1,&tsinfo) == -1) {
    printf("Error message = %s", ATDV_ERRMSGP(chdev));
    exit(1);
}  
printf("msiB1C1 is transmitting on SCbus time slot %d",scts);  

See Also


PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

Copyright 2003, Intel Corporation
All rights reserved
This page generated January, 2003