gc_GetAlarmSourceObjectNetworkID( )
Termination Events | Cautions | Errors | Example | See Also
Name: int gc_GetAlarmSourceObjectNetworkID(linedev, aso_networkID) Inputs: Returns: Includes: Category: Mode: Platform and Technology: Description
The gc_GetAlarmSourceObjectNetworkID( ) function retrieves the ID of the layer 1 alarm source object (ASO) associated with a specified line device. The network alarm source object ID represents the network handle for the source of physical layer alarms.
linedev line device aso_networkID points to where the alarm source network ID is stored 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> void gc_demo_open_E1orT1_channel(int index) { char str[MAX_STRING_SIZE]; int ASOnetworkID; GC_INFO gc_error_info; /* GlobalCall error information data */ printandlog(index, MISC, NULL, "E1 or T1 device being opened"); /* perform port data structure initialization */ if (gc_OpenEx(&port[index].ldev, port[index].devname, EV_SYNC, (void *)&port[index]) != GC_SUCCESS) { /* process error return as shown */ gc_ErrorInfo( &gc_error_info ); printf ("Error: gc_OpenEx() on devname: %s, GC ErrorValue: 0x%hx - %s, CCLibID: %i - %s, CC ErrorValue: 0x%lx - %s\n", port[index].devname, 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); } sprintf(str, "gc_OpenEx(devicename=%s, mode=EV_SYNC) Success", port[index].devname); printandlog(index, GC_APICALL, NULL, str); /* a real application might wish to cache ASOnetworkID in the port data structure */ if (gc_GetAlarmSourceObjectNetworkID(port[index].ldev, &ASOnetworkID) != GC_SUCCESS) { gc_ErrorInfo( &gc_error_info ); printf ("Error: gc_GetAlarmSourceObjectNetworkID() on device handle: 0x%lx, GC ErrorValue: 0x%hx - %s, CCLibID: %i - %s, CC ErrorValue: 0x%lx - %s\n", port[index].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); } else { } printf("networkID for linedev %d is %d\n", port[index].ldev, ASOnetworkID); }See Also
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation