PREV TOC HOME INDEX NEXT


3.2. Structures for Extended Functions

The DCM API also includes structures for the extended functions, NCM_DetectBoardsEx( ), NCM_GetDlgSrvStateEx( ), NCM_GetValueEx( ), NCM_GetValueRangeEx( ), and NCM_SetValueEx( ).

typedef enum 
{ 
     UNDEFINED=0, 
     NUMERIC, 
     ALPHANUMERIC,
     NCMFILE                  // to be used for filenames
} NCMDataType; 
typedef struct _NCMValueEx
{
     int                 structSize;  // sizeof(NCMValueEx)
     NCMDataType         dataType;    // enumerated type signifies the type of
                                      // data
     void                *dataValue;  // a buffer which holds the data
     int                 dataSize;    // size of the buffer
     struct _NCMValueEx  *next;
} NCMValueEx; 

The following structures are used in the NCM_DetectBoardsEx( ) function:

typedef struct _NCM_DETECTION_INFO     //User -> API
{
     int                        structSize;          // sizeof(
                                                     // NCM_DETECTION_INFO )
     NCM_CALLBACK_FCN           *callbackFcn;        // address of call back
                                                     // function
     NCM_PCDFILE_SELECTION_FCN  *pcdFileCallbackFcn; //address of PCD file 
                                                     //callback function
} NCM_DETECTION_INFO; 

The NCM_DETECTION_INFO structure contains the structure size and the address of the following two callback functions:

typedef int (NCM_CALLBACK_FCN) (OUT UINT percentage completed, OUT const char *message); typedef int (NCM_PCDFILE_SELECTION_FCN) (IN NCMFileInfo *fileList, IN size_t numFiles, IN NCMDevInfo devInfo, OUT int*index);

The NCM_PCDFILE_SELECTION_FCN function contains the following structures:

typedef struct _NCMFileInfo { DWORD version; char fileName[MAX_PATH]; char fileDesc[NCM_MAX_FILEDESC]; char modelName[MAX_PATH]; } NCMFileInfo; typedef struct_NCMDevInfo { DWORD version; char InstanceLabel[256]; unsigned long InstanceNumber; unsigned long LogicalID; unsigned long IRQLevel; unsigned long intVector; LARGE_INTEGER PLXAddr; unsigned long PLXLength; LARGE_INTEGER SRAM Addr; unsigned long SRAMLength; unsigned long busNumber; unsigned long slotNumber; unsigned long dlgcOUI; UCHAR primBoardId[4]; UCHAR secBoardId[4]; unsigned long modelNumber; unsigned long sramSize; unsigned long locatorId; UCHAR serialNumber[NCM_MAX_SERNUM_LEN]; unsigned long curState; BOOL startPending; unsigned long shelfID; unsigned long subnet ID; unsigned long physicalState; }NCMDevInfo;
typedef struct _NCM_DETECTION_RESULT     // User <- API
{
int                         structSize;               // size of
                                                     //  NCM_DETECTION_RESULT
int                         totalDetectedBoards;     // total detected boards 
NCM_DETECTION_DETAILS       returnInfo;               // detection returned info.
} NCM_DETECTION_RESULT; 
typedef struct _NCM_DETECTION_DETAILS     // User <- API
{
     int      structSize;               // sizeof( NCM_DETECTION_DETAILS
     int      numDetectors;               // number of detectors
     int      numBoardsDetected[256];     // number of boards detected by the
                                         // detector
     int      returnCode[256];          // detector return code
     char     returnMsg[256][256];     // detector returned message
     char     	detector[256][256];          // board detector name 
} NCM_DETECTION_DETAILS; 
typedef struct _NCM_DETECTOR_INFO          // API -> Detector
{
     int                    structSize;     // sizeof(NCM_DETECTOR_INFO)
     NCM_CALLBACK_FCN     *callbackFcn;     // address of the call back function 
} NCM_DETECTOR_INFO; 
typedef struct _NCM_DETECTOR_RESULT     // API <- Detector
{
     int          structSize;               // sizeof(NCM_DETECTOR_RESULT)
     int          numBoardsDetected;          // number of boards detected
     char          returnMsg[256];          // detection returned message
} NCM_DETECTOR_RESULT; 
     typedef int (NCM_DETECTOR_FCN) (IN NCM_DETECTOR_INFO*, OUT
                                                           NCM_DETECTOR_RESULT*); 
     typedef int ( DETECT_BOARDS_FCN) (IN NCM_DETECTOR_INFO*detectionInfo,
                                       OUT NCM_DETECTOR_RESULT*detectionResults); 


PREV TOC HOME INDEX NEXT

Click here to contact Telecom Support Resources

Copyright 2003, Intel Corporation
All rights reserved
This page generated January, 2003