PREV TOC HOME INDEX NEXT


NCM_GetAllDevices( )


Description | Cautions | Example | Error Codes | See Also

Name:

NCMRetCode NCM_GetAllDevices( pncmFamily, ppncmDeviceModel )

Inputs:

NCMFamily *pncmFamily
  • pointer to a structure containing a family of devices
NCMDevice **ppncmDeviceModel
  • address of pointer where device model names will be output

Returns:

NCM_SUCCESS if success NCM error code if failure

Includes:

NCMApi.h

Mode:

synchronous

Description

The NCM_GetAllDevices( ) function gets a list of installable device models for a family. For information about using this function to fill all the structures you need to instantiate and modify configuration parameter values, see Section 2.3.1, Populating Required Structures.

Note: This function provides a list of installable device models from the DCM Catalog. This function does not return a list of installed devices. See NCM_GetInstalledDevices( ) for that functionality.

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
ppncmDeviceModel address of the pointer to the list to be filled with structures containing device model names

Cautions

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( ) functions.

Example

#include "NCMApi.h" 
... 
//
// Prepare inputs
// 
NCMFamily family;
family.name = "D/x1D";
family.next = NULL; 
NCMDevice *     pDevices = NULL; 
//
// Execute
// 
ncmRc = NCM_GetAllDevices( &family, &pDevices ); 
if ( ncmRc == NCM_SUCCESS )
{
     NCMDevice * pModels = pDevices;
     while ( pModels != NULL )
     {     // Process list
          ...
          pModels = pModels ->next;
     }
}
else
{     // Process error
     ...
} 
// Deallocate memory when through
// with it
NCM_Dealloc( pDevices ); 
... 

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_INVALID_FAMILY the family name is invalid
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