122 Global Call API for HMP on Windows Programming Guide — August 2006
Real Time Configuration Management
Figure 29. Getting or Setting Line Device Configuration in Synchronous Mode
The following describes the procedure for getting or setting the configuration of a Line Device:
1. Open the line device (by calling the gc_OpenEx( ) function) and get the line device ID.
2. If the parameters of the line device are protocol CDP parameters, use an approach similar to
getting the CDP parameter ID described in the “Getting or Setting Protocol Configuration in
Synchronous Mode” section.
3. Create the target object data (a GC_PARM_BLK data structure) with the appropriate set ID,
parm ID, value size, and value, if applicable, by calling the Global Call utility functions. See
the Global Call API Library Reference for more information on the utility functions.
4. Call the gc_GetConfigData( ) or gc_SetConfigData( ) function with:
target_type = GCTGT_CCLIB_NETIF,GCTGT_PROTOCOL_NETIF,
GCTGT_CCLIB_CHAN or GCTGT_PROTCOL_CHAN
target_id = Global Call line device ID
time_out > 0
mode = EV_SYNC
update condition = GCUPATE_IMMEDIATE (gc_SetConfigData() function only)
5. If the gc_GetConfigData( ) function returns successfully, obtain the individual parameter data
by calling the gc_util_get_next_parm( ) function. If an error occurs, call the gc_ErrorInfo( )
function to find the error and then correct it.
Application GlobalCall
Library
gc_OpenEx ()
gc_QueryConfigData ()
Open a Line Device
Find the Set ID and Parm ID
of the Parameters
Create Target Data for Retrieving or
Updating Parameters of the Line Device
Get the Current Values or Set New
Values of the Parameters of the Line Device
gc_util_insert_parm_ref () or
gc_util_insert_parm_val ()
gc_GetConfigData ()
or
gc_SetConfigData ()
Get the Parameters from the Target Data
Block for the gc_GetConfigData () Function
gc_util_next_parm ()