Global Call API for HMP on Windows Programming Guide — August 2006 103
Alarm Handling
synchronization must be present before the ASO declares a loss of sync alarm or alarm handling
mode.
Use of the gc_SetAlarmParm( ) function, as well as the gc_GetAlarmParm( ) function, is highly
alarm source object dependent and requires detailed knowledge of the underlying ASO technology
by the application writer. For a description of ASOs that are common across multiple technologies,
see the Global Call API Library Reference.
8.2.3.5 Alarm Configuration Tips
The procedures for configuring alarms depends on whether the application writer is configuring the
behavior of alarm source objects or specific line devices associated with a given alarm source
object. (When a line device is opened, it takes the blocking and notify attributes of the network
ASO, if any, associated with the given line device.)
The default configuration (that is, the flow, blocking and notify attributes) of an alarm source object
can be changed by using the gc_SetAlarmFlow( ) and gc_SetAlarmConfiguration( ) functions.
Typically, the default configuration should be changed immediately after calling gc_Start( ) and
prior to calling gc_OpenEx( ).
To change the default configuration for all known ASOs, perform the following steps:
1. Convert the ASO name to the ASO ID using the gc_AlarmSourceObjectNameToID( )
function.
2. Change the attributes of the specified ASO name using the gc_SetAlarmConfiguration( )
function.
Note: Changing the attributes of an ASO requires detailed knowledge of the given ASO.
The procedures for changing the configuration of line devices depends on whether all the line
devices associated with the same ASO are to have the same attributes, or if the application requires
different behaviors for line devices associated with the same ASO. For those applications that
require all line devices to have the same attributes, use the procedures for changing the default
configuration for ASOs as described above. For applications that are intended to be cross-
technology and/or more robust, the following steps should be performed to change the attributes:
1. Call gc_OpenEx( ).
2. Retrieve the network ASO ID associated with the line device using the
gc_GetAlarmSourceObjectIDToName( ).
3. Convert the network ASO ID to a name using the gc_AlarmSourceObjectIDToName( ).
This is a necessary step as not all ASOs will have a fixed ID.
4. Using the ASO name, change the attributes of the line device using the
gc_SetAlarmConfiguration( ) function.
Note: Changing the attributes of an ASO for a specified line device requires detailed
knowledge of the given ASO.
For applications that are using only one “known” technology, the application can use either
gc_GetAlarmSourceObjectNetworkID( ) to retrieve the network ASO ID associated with the
line device or gc_AlarmSourceObjectNameToID( ) to retrieve the ID for the “known” ASO.