PREV TOC HOME INDEX NEXT


ms_dsprescount( )


Cautions | Errors | Example | See Also

Name: int ms_dsprescount (devh, valuep)
Inputs:

int *devh

  • MSI board device handle

int *valuep

  • pointer to the memory location to receive the free DSP resource count
Returns:

0 on success

-1 on failure

Includes:

srllib.h

dtilib.h

msilib.h

Category:

Attribute

Mode:

synchronous

Platform:

DI, HDSI, Springware

Description

The ms_dsprescount( ) function returns the available DSP resource count.

Parameter

Description

devh the MSI board device handle
valuep pointer to the location containing the free DSP resource count

Each DSP has 32 resources managed by the application. Calling certain MSI library functions may cause the available resource count to change. However, the channel selector of the party does not affect the resource usage. When zip tone support is enabled, 31 conferencing resources will be available.

Note: A conference is limited to eight parties. A monitor is counted as one of the eight parties.

The following MSI functions cause a change to the available resource count:

ms_addtoconf( )
Uses one resource every time a party is added to a conference
ms_remfromconf( )
Frees one resource
ms_delconf( )
Frees all resources in use by the conference
ms_delxtdcon( )
Frees three resources
ms_estconf( )
Uses the total number of parties in the conference
ms_estxtdcon( )
Uses three resources
ms_monconf( )
Uses one resource
ms_setbrdparm( )
When parm_id = MSG_ZIPENA and value = MS_ZIPENABLE, one resource will be used
When parm_id = MSG_ZIPENA and value = MS_ZIPDISABLE, one resource will be freed
ms_unmonconf( )
Frees one resource

Cautions

This function fails when the device handle specified is invalid.

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  dev1;                   /* Board dev descriptor variables */
int  valuep;                 /* Resource count */  
/* Open board 1 device */
if ((dev1 = ms_open("msiB1",0)) == -1) {
    printf( "Cannot open MSI B1: errno=%d", errno);
    exit(1);
}
/* Get DSP resource count */
if (ms_dsprescount(dev1, &valuep) == -1) {
    printf("Error Message = %s",ATDV_ERRMSGP(dev1));
    exit(1);
}  
printf("Free DSP resource count = %d\n", valuep);  
/*
 * Continue processing
 *
 */  
if (ms_close(dev1)== -1){
    printf( "Cannot Close MSIB1: errno=%d", errno);
    exit(1);
}  

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