gc_SetAlarmFlow( )
Termination Events | Cautions | Errors | Example | See Also
Name: int gc_SetAlarmFlow(aso_id, flow) Inputs: Returns: Includes: Category: Mode: Platform and Technology: Description
The gc_SetAlarmFlow( ) function configures which alarms are sent to the application, that is, which alarms are allowed to "flow" to the application. This function allows the application to control the flow parameter, for example, to only allow blocking alarms, or to only allow the first alarm on and the last alarm off to be sent. This prevents the application from being flooded with alarms.
Prior to using this function, the notification attribute for alarms that the application wants to be notified of must first be turned on using the gc_SetAlarmConfiguration( ) or gc_SetAlarmNotifyAll( ) function. The gc_SetAlarmFlow( ) function is used to further refine which alarms are allowed to flow to the application. The default is that all candidate alarms (that is, alarms whose notify attributes are on) flow to the application.
For a list of possible alarms, see the appropriate Global Call Technology User's Guide.
aso_id alarm source object (ASO) ID. Use the gc_AlarmSourceObjectNameToID( ) function to obtain the ASO ID for the desired alarm source object. flow flow control; for alarms whose notification attribute has been turned on, determines which of the alarms are actually sent (that is, allowed to "flow") to the application. Possible values are:
- ALARM_FLOW_ALWAYS
- ALARM_FLOW_ALWAYS_BLOCKING
- all blocking alarms with notification on are sent to the application. Non-blocking alarms are not sent.
- ALARM_FLOW_FIRST_AND_LAST
- only the first alarm on and the last alarm off are sent to the application (if their notification attribute is on). Both blocking and non-blocking alarms are eligible to be sent.
- ALARM_FLOW_FIRST_AND_LAST_BLOCKING
Termination Events
Cautions
The gc_SetAlarmFlow( ) function controls only the alarm flow, not the alarm notification. Use the gc_SetAlarmConfiguration( ) or gc_SetAlarmNotifyAll( ) function to set alarm notification on or off. The gc_SetAlarmFlow( ) function then further refines which alarms are allowed to flow to the application.
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> int rc; GC_INFO gc_error_info; /* GlobalCall error information data */ /* This code assumes that the application is running over DM3 E1 */ /* and wishes to only be notified of the first and last blocking alarms */ rc = gc_SetAlarmFlow(ALARM_SOURCE_ID_DM3_E1, ALARM_FLOW_FIRST_AND_LAST_BLOCKING); if (rc < 0) { /* process error as shown */ gc_ErrorInfo( &gc_error_info ); printf ("Error: gc_SetAlarmFlow(), GC ErrorValue: 0x%hx - %s, CCLibID: %i - %s, CC ErrorValue: 0x%lx - %s\n", 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); }See Also
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation