PREV TOC HOME INDEX NEXT


NCM_GetInstalledDevices( )


Description | Cautions | Example | Error Codes | See Also

Name:

NCMRetCode NCM_GetInstalledDevices (pncmFamily, ppncmDeviceUnique )

Inputs:

NCMFamily *pncmFamily
  • pointer to a structure containing a device family name
NCMDevice **ppncmDeviceUnique
  • address of pointer where unique device names will be output

Returns:

NCM_SUCCESS if success NCM error code if failure

Includes:

NCMApi.h

Mode:

synchronous

Description

The NCM_GetInstalledDevices( ) function gets all instantiated devices for a family.

The function parameters are defined as follows:

Parameter

Description

pncmFamily pointer to the structure containing the family name whose devices should be returned; the value contained in the structure must be an instantiated family (see Cautions below)
ppncmDeviceUnique address of the pointer to the list to be filled with structures containing unique device names; the unique device names will be the same names you used to add the devices to the system configuration with the NCM_AddDevice( ) function

Cautions

This function enables you to determine what devices are instantiated in the system configuration. To find out what devices are installable from the DCM Catalog, use the NCM_GetAllDevices( ) function. 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 *     pDevices = NULL; 
//
// Execute
// 
NCMRetCode     ncmRc = NCM_GetInstalledDevices( &family, &pDevices ); 
if ( ncmRc == NCM_SUCCESS )
{
     NCMDevice * pCurrDevices = pDevices;
     while ( pCurrDevices != NULL )
     {     // Process list
          ...     
          pCurrDevices = pCurrDevices->next;
     }
}
else
{     // Process error
     ...
} 
// Deallocate memory when through
// with it
NCM_Dealloc( pDevices );
... 

Error Codes

Equate

Returned When

NCME_INVALID_INPUTS the values of the parameters supplied are invalid
NCME_INVALID_FAMILY the family name is 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