PREV TOC HOME INDEX NEXT


gc_GetParm( )


Termination Events | Cautions | Errors | Example | See Also

Name: int gc_GetParm(linedev, parm_id, valuep)
Inputs:

LINEDEV linedev

  • Global Call line device handle
 

int parm_id

  • parameter ID
 

GC_PARM *valuep

  • pointer to buffer where value will be stored
Returns:

0 if successful

<0 if failure

Includes:

gclib.h

gcerr.h

Category:

system controls and tools

Mode:

synchronous

Platform and Technology:

Springware: T-1/E-1, ISDN, Analog

DM3: T-1/E-1, ISDN, Analog

SS7

See the Global Call Technology User's Guides for additional information.

Description

The gc_GetParm( ) function retrieves the value of the specified parameter from the parm_id parameter for a line device. The application can retrieve only one parameter value at a time.

See also the appropriate Global Call Technology User's Guide for technology-specific information.

Parameter

Description

linedev Global Call line device handle
parm_id parameter ID definitions are listed in Table  16, "Parameter Descriptions, gc_GetParm( ) and gc_SetParm( )" in the gc_SetParm( ) function description. The "Level" column lists whether the parameter is a channel level parameter or a trunk level parameter. To get a trunk level parameter, the linedev parameter must be the device ID associated with a network interface trunk.
valuep points to the buffer where the requested information will be stored. See GC_PARM for data structure details.

Termination Events

None

Cautions

None

Errors

If this function returns <0 to indicate failure, use the gc_ErrorInfo( ) function to retrieve the reason for the error. See the "Error Handling" section in the Global Call API Programming Guide. All Global Call error codes are defined in the gcerr.h file. If the error returned is technology specific, see the technology-specific error header file(s) for the error definition (for example, ccerr.h or isdnerr.h file for the ISDN call control library).

Example

#include <stdio.h>
#include <srllib.h>
#include <gclib.h>
#include <gcerr.h> 
int get_calling_party(LINEDEV ldev, char *callerp)
{
    GC_PARM        parm_val;         /* value of parameter returned */
    GC_INFO        gc_error_info;    /* GlobalCall error information data */ 
    /*
     * Retrieve calling party number for E-1 CAS line device and print it.
     */
    if (gc_GetParm(ldev, GCPR_CALLINGPARTY, &parm_val) == GC_SUCCESS) {
        strcpy(callerp, parm_val.paddress);
        printf ("Calling party No. is %s\n", parm_val.paddress);
    }
    else {
        /* process error return as shown */
        gc_ErrorInfo( &gc_error_info );
        printf ("Error: gc_GetParm() on linedev: 0x%lx, GC ErrorValue: 0x%hx - %s, 
                 CCLibID: %i - %s, CC ErrorValue: 0x%lx - %s\n",
                 ldev, gc_error_info.gcValue, gc_error_info.gcMsg, 
                 gc_error_info.ccLibId, gc_error_info.ccLibName,
                 gc_error_info.ccValue, gc_error_info.ccMsg);
        return (gc_error_info.gcValue); 
    }
    return (0);
} 

See Also


PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

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