Code Example: How to Gather Board Information?
The following code scans all installed MultiCam boards, and builds a database containing their information relative to name, serial number and type.
MC_CONFIGURATION is the C identifier used as a handle to the configuration object. This object has not to be explicitly instantiated.
MC_BOARD is the C identifier used as a handle to the board object. This object has not to be explicitly instantiated.
The Status variable can be used for error checking.
//Defining the database structure type typedef struct { char BoardName[17]; INT32 SerialNumber; INT32 BoardType; } MULTICAM_BOARDINFO; //Variables declaration MULTICAM_BOARDINFO BoardInfo[10]; INT32 BoardCount; INT32 i; MCSTATUS Status; //Connecting to driver Status = McOpenDriver(NULL); //Getting number of boards Status = McGetParamInt(MC_CONFIGURATION, MC_BoardCount, &BoardCount); //Scanning across MultiCam boards for (i=0; i<BoardCount; i++) { //Fetching the board name (String MultiCam parameter) Status = McGetParamStr( MC_BOARD+i, MC_BoardName, BoardInfo[i].BoardName, 17); //Fetching the board serial number (Integer MultiCam parameter) Status = McGetParamInt( MC_BOARD+i, MC_SerialNumber, &BoardInfo[i].SerialNumber); //Fetching the board type (Enumerated MultiCam parameter) Status = McGetParamInt( MC_BOARD+i, MC_BoardType, &BoardInfo[i].BoardType); } //Disconnecting from driver Status = McCloseDriver();