NCM_GetTDMBusValue( )
Description | Cautions | Example | Error Codes | See Also
NCMRetCode NCM_GetTDMBusValue( pncmBus, pvariable, ppvalue)
NCMDevice *pncmBus NCMVariable *pvariable NCMValue **ppvalue NCM_SUCCESS if success NCM error code if failure NCMApi.h synchronous Description
The NCM_GetTDMBusValue( ) function gets the parameter value of the TDM bus. This function also allows the user to retrieve the value of user defined and resolved variables in the TDM Bus family. For additional information about using this function, see Section 2.10, Clock Master Fallback List.
The function parameters are defined as follows:
pncmBus pointer to the structure containing a specific bus name, for example, "Bus-0" pvariable name of the variable ppvalue pointer to the name of the value to be returned Cautions
The variable must be a valid parameter under the TDM Bus Configuration, otherwise the function returns NCME_INVALID_INPUTS.
Memory to hold the returned data is allocated in this function. To avoid memory leaks, the application must deallocate the memory by calling NCM_Dealloc( ).
Currently, only a single bus is supported. Therefore, the bus name for the parameter pncmBus should be "Bus-0".
Example
#include "NCMApi.h" ... // // Prepare inputs // NCMDevice bus; device.name = "Bus-0"; device.next = NULL; NCMVariable variable1; variable.name = "Primary Master FRU (Resolved)"; variable.next = NULL; NCMVariable variable2; variable.name = "NETREF One FRU (Resolved)"; variable.next = NULL; NCMValue * pValue1 = NULL; NCMValue * pValue2 = NULL; // // Execute // //Get current Primary Master FRU NCMRetCode ncmRc = NCM_GetValue( &bus, &variable1, &pValue1 ); if ( ncmRc != NCM_SUCCESS ) { // Process error ... } //Get current Net Ref FRU NCMRetCode ncmRc = NCM_GetValue( &bus, &variable2, &pValue2 ); if ( ncmRc != NCM_SUCCESS ) { // Process error ... } // Deallocate memory NCM_Dealloc( pValue1 ); NCM_Dealloc( pValue2 );Error Codes
See Also
Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation