PREV TOC HOME INDEX NEXT


NCM_GetValueRange( )


Description | Cautions | Example | Error Codes | See Also

Name:

NCMRetCode NCM_GetValueRange( pncmFamily, pncmDevice, pncmProperty, pncmVariable, ppncmValues )

Inputs:

NCMFamily *pncmFamily
  • pointer to a structure containing a family of boards
NCMDevice *pncmDevice
  • pointer to a structure containing a device
NCMProperty *pncmProperty
  • pointer to a structure containing a property
NCMVariable *pncmVariable
  • pointer to a structure containing a configuration parameter
NCMValue **ppncmValues
  • address of pointer where range will be output

Returns:

NCM_SUCCESS if success NCM error code if failure

Includes:

NCMApi.h

Mode:

synchronous

Description

The NCM_GetValueRange( ) function gets the value range for a parameter.

The function parameters are defined as follows:

Parameter

Description

pncmFamily pointer to the structure containing the family name; the value of the structure must be an installable family (see Cautions below)
pncmDevice pointer to the structure containing a device name; the device name can be either a device model name or a unique device 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)
pncmProperty pointer to the structure containing the property name; the value of the structure must be an installable property (see Cautions below)
pncmVariable pointer to the structure containing the configuration parameter; the value of the structure must be an installable configuration parameter (see Cautions below)
ppncmValues address of the pointer to be filled with the configuration parameter values

Cautions

This function provides the range of values that can be set for an installable configuration parameter. To determine the actual value of a configuration parameter instantiated in your system configuration, use NCM_GetValue( ). 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 = "D/x1D";
family.next = NULL; 
NCMDevice device;
device.name = "D/41D-1";
device.next = NULL; 
NCMProperty property;
property.name = "System";
property.next = NULL; 
NCMVariable variable;
variable.name = "D41DAddress";
variable.next = NULL; 
NCMValue *     pRange = NULL; 
//
// Execute
// 
NCMRetCode     ncmRc = NCM_GetValueRange( &family, &device, &property,
                                             &variable, &pRange ); 
if ( ncmRc == NCM_SUCCESS )
{
     NCMValue * pCurrRange = pRange;
     while ( pCurrRange != NULL )
     {
          // Process list
               ...
          pCurrRange = pCurrRange->next;
     }
}
else
{     // Process error
     ...
} 
// Deallocate memory
NCM_Dealloc( pRange );
... 

Error Codes

Equate

Returned When

NCME_NO_INF the DCM Catalog could not be found
NCME_MEM_ALLOC memory could not be allocated to perform the function
NCME_GENERAL a problem occurred retrieving the data
NCME_BAD_INF there was an error parsing the DCM Catalog
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