PREV TOC HOME INDEX NEXT


NCM_SetValueEx( )


Description | Cautions | Example | Error Codes | See Also

Name:

NCMRetCode NCM_SetValueEx( pncmFamily, pncmDeviceUnique, pncmVariable, pncmValueEx )

Inputs:

NCMFamily *pncmFamily
  • pointer to a structure containing a device family
NCMDevice *pncmDeviceUnique
  • pointer to a structure containing unique device name
NCMVariable *pncmVariable
  • pointer to a structure containing a configuration parameter
NCMValueEx *pncmValueEx
  • pointer to a structure containing the new value

Returns:

NCM_SUCCESS if success NCM error code if failure

Includes:

NCMApi.h

Mode:

synchronous

Description

The NCM_SetValueEx( ) function instantiates a configuration parameter value.

For more information about using this function, see Section 2.3.3, Reading and Writing Configuration Parameter Values.

The function parameters are defined as follows:

Parameter

Description

pncmFamily pointer to the structure containing the family name; the value contained in the structure must be an instantiated family (see Cautions below)
pncmDeviceUnique pointer to the structure containing the device's unique name; the unique device name must be the same name you used to add the device to the system configuration with the NCM_AddDevice( ) function
pncmVariable pointer to the structure containing the configuration parameter name; the value contained in the structure must be an instantiated configuration parameter (see Cautions below)
pncmValueEx a pointer to the value to be set

Cautions

This function enables you to set the value of a configuration parameter in the system configuration. It does not enable you to add configuration parameters to the DCM Catalog. For more information about the distinction between the system configuration and the DCM Catalog, see Section 2.1, The DCM API Architecture.

The DCM API allocates memory for the data returned by this function. To avoid memory leaks, the client application must deallocate this memory by calling the NCM_Dealloc( ) or NCM_DeallocValue( ) function.

Example

#include "NCMApi.h" 
//
// Prepare inputs
// 
NCMFamily family;
family.name = "DM3";
family.next = NULL; 
NCMDevice device;
device.name = "VOIP-T1-1";
device.next = NULL; 
NCMVariable      variable;
variable.name = "NetworkTimeout";
variable.next = NULL; 
unsigned long      netTimeOut = 2;
NCMValueEx           valueEx; 
valueEx.structSize = sizeof( NCMValueEx );
valueEx.dataType = NUMERIC;
valueEx.dataValue = &netTimeOut;
valueEx.dataSize = sizeof( netTimeOut );
valueEx.next = NULL; 
//
// Execute
// 
ncmRC = NCM_SetValueEx( &family, &device, &variable, &valueEx );
 
    if ( ncmRc == NCM_SUCCESS)
{
     ...
}
else
{     // Process error
     ...
}
... 

Error Codes

Equate

Returned When

NCME_GENERAL a problem occurred retrieving the data
NCME_DATA_NOT_FOUND requested data not found in NCM data storage
NCME_CTBB_DEVICE_DETECTED error configuring the TDM bus
NCME_SP invalid state transition
NCME_INVALID_INPUTS the values of the parameters supplied are invalid

See Also


PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

Copyright 2003, Intel Corporation
All rights reserved
This page generated January, 2003