gc_StopTransmitAlarms( )
Termination Events | Cautions | Errors | Example | See Also
Name: int gc_StopTransmitAlarms(linedev, aso_id, alarm_list, mode) Inputs: Returns: Includes: Category: Mode: Platform and Technology: Description
The gc_StopTransmitAlarms( ) function stops the transmission of one or more alarms to the remote side. To stop the transmission, the alarms must have been initiated by the gc_TransmitAlarms( ) function. The function stops transmitting all alarms specified in alarm_list for the given line device.
linedev Global Call line device aso_id alarm source object (ASO) ID. Use the gc_AlarmSourceObjectNameToID( ) function to obtain the ASO ID for the desired alarm source object. Use the gc_GetAlarmSourceObjectNetworkID( ) function to obtain the network ID. ALARM_SOURCE_ID_NETWORK_ID can be used if the network ASO ID associated with the line device is desired. For a list of ASO IDs that are known to Global Call, see Table 18, "Alarm Source Object IDs". alarm_list points to the alarm list. See ALARM_LIST for descriptions of the fields in the ALARM_LIST data structure. Note: Only the alarm_number field of ALARM_FIELD in the ALARM_LIST data structure is used. mode set to EV_SYNC for synchronous mode (only synchronous mode is supported) Termination Events
Cautions
- Detailed knowledge of the alarm source object is required to use this function properly.
- If any of the alarms failed to stop transmitting, the function will return an error. To ensure that an error is received for every failure, stop the alarms one at a time.
- The list of possible alarms used by the ASO is defined by the ASO itself, not by Global Call. See the Global Call API Programming Guide for more information about ASOs.
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 rc; LINEDEV linedev; ALARM_LIST alarm_list; GC_INFO gc_error_info; /* GlobalCall error information data */ /* -- This code assumes that linedev is already assigned -- it also assumes that linedev's alarm source object -- is known to be Springware E1 -- this could have been done via gc_GetAlarmSourceObjectNetworkID */ /* init all to 0 */ memset(&alarm_list, '\0', sizeof(ALARM_LIST)); /* stop transmitting one alarm - DTE1_RSA1 */ alarm_list.n_alarms = 1; alarm_list.alarm_fields[0].alarm_number = DTE1_RSA1; rc = gc_StopTransmitAlarms(linedev, ALARM_SOURCE_ID_SPRINGWARE_E1, &alarm_list, EV_SYNC); if (rc < 0) { /* get and process the error */ gc_ErrorInfo( &gc_error_info ); printf ("Error: gc_StopTransmitAlarms() on device handle: 0x%lx, GC ErrorValue: 0x%hx - %s, CCLibID: %i - %s, CC ErrorValue: 0x%lx - %s\n", linedev, 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