PREV TOC HOME INDEX NEXT


gc_SetAlarmParm( )


Termination Events | Cautions | Errors | Example | See Also

Name: int gc_SetAlarmParm(linedev, aso_id, ParmSetID, alarm_parm_list, mode)
Inputs:

LINEDEV linedev

  • line device
 

unsigned long aso_id

  • alarm source object ID
 

int ParmSetID

  • parameter set ID
 

ALARM_PARM_LIST *alarm_parm_list

  • pointer to alarm parameter list
 

unsigned long mode

  • sync
Returns:

0 if successful

<0 if failure

Includes:

gclib.h

gcerr.h

Category:

GCAMS

Mode:

synchronous

Platform and Technology:

Springware: T-1/E-1, ISDN

IP (host-based stack and embedded stack)

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

Description

The gc_SetAlarmParm( ) function sets the data associated with the alarm parameter for one or more alarm number and parameter ID pairs. The alarm number and parameter set ID pairs are specified in ALARM_PARM_FIELD in the alarm_parm_list list.

The parameter set ID identifies a set of associated parameters as defined by the alarm source object (ASO). An example of one parameter set is the parameters that can be set by the dt_setparm( ) function. Another example of a parameter set is the parameters that are set by the dt_setalarm( ) function. Both functions are in the Springware DT library.

Examples of alarm parameters that can be set include timing parameters and maximum number of errors. Parameters can be set on either a line device basis or an ASO ID basis.

Parameter

Description

linedev Global Call line device handle
aso_id alarm source object (ASO) ID. Use the gc_AlarmSourceObjectNameToID( ) function to obtain the ASO ID for the desired alarm source object. ALARM_SOURCE_ID_NETWORK_ID can be used if the network ASO ID is not known.
ParmSetID identifies a set of associated parameters
alarm_parm_list points to the alarm parameter list. See ALARM_PARM_LIST for a description of the fields in the ALARM_PARM_LIST data structure.
mode set to EV_SYNC for synchronous mode (only synchronous mode is supported)

Termination Events

None

Cautions

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 <stdlib.h>
#include <gclib.h>
#include <gcerr.h>
#include <dtilib.h>            /* for ASO symbols */ 
int main(int argc, char **argc)
{
    int              rc;
    ALARM_PARM_LIST  alarm_parm_list; 
    /* perform application initialization */
  
    /* assumes gc_Start() has already been successfully called */ 
    /* init all to 0 */
    memset(&alarm_parm_list, '\0', sizeof(ALARM_PARM_LIST)); 
    /* set 1 parameter */
    alarm_parm_list.n_parms = 1; 
    /* set # of out of frame errors to allow before sending an alarm */
    alarm_parm_list.alarm_parm_fields[0].alarm_parm_number.intvalue = DTG_OOFMAX; 
    /* 3 is only used as an example and has no signficance */
    alarm_parm_list.alarm_parm_fields[0].alarm_parm_data.intvalue = 3; 
    /* Set for all of Springware T1 */
    rc = gc_SetAlarmParm(0, ALARM_SOURCE_ID_SPRINGWARE_T1, ParmSetID_parm,
                          &alarm_parm_list, EV_SYNC);
    if (rc < 0)
    {
         /* get and process the error */
    } 
    /* continue with the application */
} 

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