
Frame Grabber SDK (Windows-C) Developer Guide
}
// Set Chunk Selector to Timestamp.
nRet = MV_FG_SetEnumValueByString(hDevice, "ChunkSelector", "Timestamp");
if (MV_FG_SUCCESS != nRet)
{
printf("Set timestamp chunk failed! %#x\n", nRet);
break;
}
// Enable chunk.
nRet = MV_FG_SetBoolValue(hDevice, "ChunkEnable", true);
if (MV_FG_SUCCESS != nRet)
{
printf("Set timestamp chunk enable failed! %#x\n", nRet);
break;
}
// Disable trigger mode.
nRet = MV_FG_SetEnumValueByString(hDevice, "TriggerMode", "Off");
if (MV_FG_SUCCESS != nRet)
{
printf("Turn off trigger mode failed! %#x\n", nRet);
break;
}
// Get the number of stream channels.
unsigned int nStreamNum = 0;
nRet = MV_FG_GetNumStreams(hDevice, &nStreamNum);
if (MV_FG_SUCCESS != nRet || 0 == nStreamNum)
{
printf("No stream available! return = %d, number = %d\n", nRet, nStreamNum);
break;
}
// Open stream channel (currently only one stream channel is supported at a time).
nRet = MV_FG_OpenStream(hDevice, 0, &hStream);
if (MV_FG_SUCCESS != nRet)
{
printf("Open stream failed! %#x\n", nRet);
break;
}
// Register the exception information callback function of the stream channel.
//nRet = MV_FG_RegisterExceptionCallBack(hStream, ExceptionCb, hStream);
//if (MV_FG_SUCCESS != nRet)
//{
// printf("Register stream exception callback failed!\n");
// break;
//}
115





















































































































































