
Description | Cautions | Example | Errors | See Also
Name: |
int dcb_GetAtiBitsEx(devh, numpty, ActiveTalkerInd, rfu) | |
Inputs: |
int devh |
|
int *numpty |
| |
DCB_CT *ActiveTalkerInd |
| |
void* rfu |
| |
Returns: |
0 if success | |
Includes: |
srllib.h | |
Category: |
Auxiliary | |
Mode: |
synchronous | |
The dcb_GetAtiBitsEx( ) function returns the active talker indicators at the time the function is called. The current number of active talkers is returned in numpty, with specific information on each active talker returned in ActiveTalkerInd.
#include <windows.h>
#include <stdio.h>
#include "srllib.h"
#include "dtilib.h"
#include "msilib.h"
#include "dcblib.h"
#include "errno.h"
const int MAX_ACTIVETALKERBITS = 120;
void main(void)
{
char DeviceName[16];
char BoardName[16];
int dspdevh=-1,BoardDevHandle=-1;
sprintf(BoardName,"dcbB1");
printf("Trying to open device = %s\n",BoardName);
if ( (BoardDevHandle = dcb_open(BoardName, 0)) == -1) {
printf("Cannot open device %s. errno = %d\n", BoardName,errno);
getchar( );
exit(1);
}
else {
printf("Open successfull for %s ... BoardDevHandle=0x%x\n",BoardName,BoardDevHandle);
}
/* Set Active Talker ON */
int nStatus=ACTID_ON;
if(dcb_setbrdparm(BoardDevHandle,MSG_ACTID,(void*)&nStatus)==-1) {
printf("dcb_setbrdparm->MSG_ACTID->Error Setting Board Parm for %s : ERROR = %s\n",
ATDV_NAMEP(BoardDevHandle),ATDV_ERRMSGP(BoardDevHandle));
/* process error */
}
else {
printf("SetBoardParm->MSG_ACTID->Success Setting Board Parm for %s\n",
ATDV_NAMEP(BoardDevHandle));
}
if ( dcb_close(BoardDevHandle) == -1) {
printf("Cannot close device %s. errno = %d\n", ATDV_NAMEP(BoardDevHandle),errno);
/* process error */
exit(1);
}
else {
printf("dcb_close successfull for %s... BoardDevHandle=0x%x\n",
ATDV_NAMEP(BoardDevHandle),BoardDevHandle);
}
sprintf(DeviceName,"dcbB1D1");
printf("Trying to open device = %s\n",DeviceName);
if ( (dspdevh = dcb_open(DeviceName, 0)) == -1) {
printf("Cannot open device %s. errno = %d\n", DeviceName,errno);
/* process error */
exit(1);
}
else {
printf("Open successfull for %s... dspdevh=0x%x\n",DeviceName,dspdevh);
}
/* Establish Conferences and Continue Processing */
/* GetAtiBitsEx */
int nCount,i=0;
DCB_CT ActiveTalkerIndicators[MAX_ACTIVETALKERBITS];
void * RFU=0;
if(dcb_getatibitsEx(dspdevh, &nCount, ActiveTalkerIndicators, RFU)==-1)
{
printf("GetAtiBits->dcb_getatibitsEx failed on %s Error = %s\n",
ATDV_NAMEP(dspdevh),ATDV_ERRMSGP(dspdevh));
/* process error */
}
else
{
printf("GetAtiBits->dcb_getatibitsEx Successful on %s Count = %d\n",
ATDV_NAMEP(dspdevh),nCount);
for(i=0;i<nCount;i++)
{
printf("i = %d ConferenceID = 0x%x ChanNum = %d ChanSel = 0x%x\n",
i,ActiveTalkerIndicators[i].confid,
ActiveTalkerIndicators[i].chan_num,
ActiveTalkerIndicators[i].chan_sel);
}
}
/* Done processing - Close device */
if ( dcb_close(dspdevh) == -1) {
printf("Cannot close device %s. errno = %d\n", ATDV_NAMEP(dspdevh),errno);
/* process error */
exit(1);
}
else
printf("dcb_close successfull for %s... dspdevh=0x%x\n",
ATDV_NAMEP(dspdevh),dspdevh);
} // main( ) ends
If the function does not complete successfully, it will return -1 to indicate an error. Use the Standard Attribute functions ATDV_LASTERR( ) to obtain the applicable error value, or ATDV_ERRMSGP( ) to obtain a more descriptive error message.
Refer to the error type tables found in Chapter 2 of this guide. Error defines can be found in dtilib.h, msilib.h or dcblib.h.
Click here to contact Dialogic Customer Engineering
Copyright 2002, Intel Corporation