gc_GetAlarmFlow( )
Termination Events | Cautions | Errors | Example | See Also
Name: int gc_GetAlarmFlow(aso_id, flow) Inputs: Returns: Includes: Category: Mode: Platform and Technology: Description
The gc_GetAlarmFlow( ) function indicates which alarms are sent to the application. This function frees the application from having to store the current alarm flow setting.
The alarm flow defines which alarms are sent to the application. Alarm flow is controlled on a line device basis using the gc_SetAlarmFlow( ) function.
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 associated with the line device is desired. To obtain an aso_id not associated with a line device, NULL can be used. flow points to the destination for the current flow control value. Possible values for flow control are:
- ALARM_FLOW_ALWAYS
- ALARM_FLOW_ALWAYS_BLOCKING
- only 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
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 flow; int rc; GC_INFO gc_error_info; /* GlobalCall error information data */ /* This code assumes that the application is running over DM3 E1 */ rc = gc_GetAlarmFlow(ALARM_SOURCE_ID_DM3_E1, &flow); if (rc < 0) { /* process error as shown */ /* Note: gc_GetAlarmFlow() is a GC only function */ /* hence the cclib error message is not printed */ gc_ErrorInfo( &gc_error_info ); printf ("Error : gc_GetAlarmFlow() on aso_id: 0x%lx, GC ErrorValue: 0x%hx - %s, CCLibID: %i - %s, CC ErrorValue: 0x%lx - %s\n", ALARM_SOURCE_ID_DM3_E1, 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); } else switch(flow) { case ALARM_FLOW_ALWAYS: printf("Current alarm flow is ALARM_FLOW_ALWAYS\n"); break; case ALARM_FLOW_ALWAYS_BLOCKING: printf("Current alarm flow is ALARM_FLOW_ALWAYS_BLOCKING\n"); break; case ALARM_FLOW_FIRST_AND_LAST: printf("Current alarm flow is ALARM_FLOW_FIRST_AND_LAST\n"); break; case ALARM_FLOW_FIRST_AND_LAST_BLOCKING: printf("Current alarm flow is ALARM_FLOW_FIRST_AND_LAST_BLOCKING\n"); break; default: printf("Unknown alarm flow, value = %d\n", flow); break; }See Also
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation