gc_SetAlarmNotifyAll( )
Termination Events | Cautions | Errors | Example | See Also
Name: int gc_SetAlarmNotifyAll(linedev, aso_id, value) Inputs: Returns: Includes: Category: Mode: Platform and Technology: Description
The gc_SetAlarmNotifyAll( ) function sets the notification attribute of all alarms originating from a specified alarm source object.
The gc_SetAlarmNotifyAll( ) function can be used as a shortcut for changing the notify attribute, instead of using the gc_GetAlarmConfiguration( ) function to retrieve the list of all alarms and then setting their notify attribute using the gc_SetAlarmConfiguration( ) function.
The gc_SetAlarmNotifyAll( ) function can also be used to determine if an alarm exists on a line device when the device is opened. After calling gc_OpenEx( ), enable alarm notification for the line device. If any alarms are already active on the line device, the application will be notified with one or more applicable GCEV_ALARM events, depending on the current value of the alarm flow control.
linedev line device. The linedev parameter must be set to NULL to set the notification attribute for alarm source objects. Setting linedev to NULL changes the default behavior for any device opened after the function call. 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. value performs two roles. The first role is to set the alarm notification attribute. Possible values are: The second role is to define whether the notification attribute is to be set for all boards or time slots associated with the ASO or for a specific board associated with the ASO, allowing users to control the extent of the changes. The following flags, which may be ORed in, can be used to define whether which ASO IDs, boards, or time slots are to be configured: See Table 13 for more information about setting these flags. Only one of the three flags may be set at a time.
† Possible flag settings are ALARM_CONFIGURE_BOARDS_AND_TIMESLOTS, ALARM_CONFIGURE_BOARDS, ALARM_CONFIGURE_TIMESLOTS. Attempts to configure unsupported configurations will return an error. Termination Events
Cautions
- When linedev is set to NULL, changing an alarm source object's configuration will change the default behavior for devices opened subsequent to the gc_SetAlarmNotifyAll( ) function call. That is, devices opened after the gc_SetAlarmNotifyAll( ) function call will get their default behavior from the alarm source object configuration information.
- If a line device is specified and the given aso_id is not an alarm source object for the line device, an error will occur.
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
/* Example 1: change ASO, but not any open devices */ int rc; /* Enable alarm notification on all Springware E1 alarms */ /* Note: this does not change any open devices */ rc = gc_SetAlarmNotifyAll(0, ALARM_SOURCE_ID_SPRINGWARE_E1, ALARM_NOTIFY); if (rc < 0) { /* get and process the error */ } /* Example 2: change ASO, and all open devices that use this ASO */ int rc; /* Enable alarm notification on all Springware E1 alarms */ /* Note: this also changes all open devices associated that use this ASO */ rc = gc_SetAlarmNotifyAll(0, ALARM_SOURCE_ID_SPRINGWARE_E1, ALARM_NOTIFY | ALARM_CONFIGURE_BOARDS_AND_TIMESLOTS); if (rc < 0) { /* get and process the error */ }See Also
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation