PREV TOC HOME INDEX NEXT


NCM_GetClockMasterFallbackList( )


Description | Cautions | Example | Error Codes | See Also

Name:

NCMRetCode NCM_GetClockMasterFallbackList(pncmBus, pnumInList, ppfallbackList )

Inputs:

NCMDevice *pncmBus
  • address of a pointer to a specific bus name

Outputs:

Int *pnumInList
  • address of a pointer to total number of boards in list to be returned
NCMDevice **ppfallbackList
  • address of a pointer to list of devices in the fallback list to be returned

Returns:

NCM_SUCCESS if success NCM error code if failure

Includes:

NCMApi.h

Mode:

synchronous

Description

The NCM_GetClockMasterFallbackList( ) function returns the clock fallback list. This function fills a pointer to a pointer with the beginning address of a list of devices in the clock fallback list. In addition, this function also returns the total number of devices in the list. For more information about the master clock fallback list, see Section 2.10, Clock Master Fallback List.

The function parameters are defined as follows:

Parameter

Description

pncmBus pointer to a structure containing the specific bus name, for example, "Bus-0"
pnumInList pointer to the total number of devices in the clock fallback list, including the Primary and Secondary
ppfallbackList address to pointer of the list of devices to be returned

Cautions

Currently, only a single bus is supported. Therefore, the bus name for the parameter pncmBus should be "Bus-0".

The pnumInList includes both the Primary Clock Master device and the Secondary Clock Master device.

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
// 
NCMDevice bus;
device.name = "Bus-0";
device.next = NULL; 
NCMValue *     pfallbackList = NULL;
int total; 
//
// Execute
// 
NCMRetCode     ncmRc = NCM_GetClockMasterFallbackList( &bus, &total,
                                         &pfallbackList ); 
if ( ncmRc == NCM_SUCCESS )
{
     NCMValue * pCurrList = pfallbackList;
     while ( pCurrList != NULL )
     {     // Process list
          ...
          pCurrList = pCurrList ->next;
     }
}
else
{     // Process error
     ...
} 
// Deallocate memory
NCM_Dealloc( pfallbackList ); 

Error Codes

Equate

Returned When

NCME_DATA_NOT_FOUND requested data not found in NCM data storage
NCME_MEM_ALLOC memory could not be allocated to perform the function
NCME_GENERAL a problem occurred retrieving the data
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