#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <pthread.h>
{
int c;
while ( (c = getchar()) != '\n' && c != EOF );
fprintf( stderr, "\nPress enter to exit.\n");
while( getchar() != '\n');
sleep(1);
}
{
if (NULL == pstInterfaceInfo)
{
printf("The Pointer of pstInterfaceInfo is NULL!\n");
return false;
}
printf(
"model name: %s\n",pstInterfaceInfo->
chModelName);
printf("\n");
return true;
}
{
{
printf("Get %s Fail! nRet [0x%x]\n", str, nRet);
return;
}
{
printf("Get %s Fail! nRet [0x%x]\n", str,nRet);
return;
}
else
{
printf(
"Get %s = [%s] Success!\n",str,stEnumentryInfo.
chSymbolic);
}
{
{
printf("Set %s Fail! nRet [0x%x]\n", str,nRet);
return;
}
else
{
printf(
"Set %s = [%s] Success!\n",str,stEnumentryInfo.
chSymbolic);
}
}
}
{
bool bValue = false;
{
printf("Get %s Fail! nRet [0x%x]\n", str,nRet);
return;
}
else
{
printf("Get %s = [%d] Success!\n",str,bValue);
}
{
{
printf("Set %s Fail! nRet [0x%x]\n", str,nRet);
return;
}
else
{
printf("Set %s = [%d] Success!\n",str,bValue);
}
}
}
{
{
printf("Get %s Fail! nRet [0x%x]\n", str,nRet);
return;
}
else
{
printf(
"Get %s = [%ld] Success!\n",str,stIntValue.
nCurValue);
}
{
{
printf("Set %s Fail! nRet [0x%x]\n", str,nRet);
return;
}
else
{
printf(
"Set %s = [%ld] Success!\n",str,stIntValue.
nCurValue);
}
}
}
{
{
printf("Get %s Fail! nRet [0x%x]\n", str,nRet);
return;
}
else
{
printf(
"Get %s = [%s] Success!\n",str,StringValue.
chCurValue);
}
{
{
printf("Set %s Fail! nRet [0x%x]\n", str,nRet);
return;
}
else
{
printf(
"Set %s = [%s] Success!\n",str,StringValue.
chCurValue);
}
}
}
{
{
printf("Get %s Fail! nRet [0x%x]\n", str,nRet);
return;
}
else
{
printf(
"Get %s = [%f] Success!\n",str,FloatValue.
fCurValue);
}
{
{
printf("Set %s Fail! nRet [0x%x]\n", str,nRet);
return;
}
else
{
printf(
"Set %s = [%f] Success!\n",str,FloatValue.
fCurValue);
}
}
}
{
switch(nSelect)
{
case 0:
case 1:
case 2:
case 3:
default:
return -1;
}
}
{
printf("[0]: GIGE Interface\n");
printf("[1]: CAMERALINK Interface\n");
printf("[2]: CXP Interface\n");
printf("[3]: XOF Interface\n\n");
do
{
{
printf("Initialize SDK fail! nRet [0x%x]\n", nRet);
break;
}
unsigned int nType = 0;
printf("Please Input Enum Interfaces Type(0-%d):", 3);
scanf("%d", &nType);
if(-1 == nTLayerType)
{
printf("Input error!\n");
break;
}
{
printf("Enum Interfaces fail! nRet [0x%x]\n", nRet);
break;
}
{
for (
unsigned int i = 0; i < stInterfaceInfoList.
nInterfaceNum; i++)
{
printf("[Interface %d]:\n", i);
if (NULL == pstInterfaceInfo)
{
break;
}
}
printf("Enum Interfaces success!\n\n");
}
else
{
printf("Find No Interface!\n");
break;
}
printf(
"Please Input Interfaces index(0-%d):", stInterfaceInfoList.
nInterfaceNum-1);
unsigned int nIndex = 0;
scanf("%d", &nIndex);
{
printf("Input error!\n");
break;
}
{
printf("Create Interface success!\n");
}
else
{
printf("Create Interface Handle fail! nRet [0x%x]\n", nRet);
break;
}
{
printf("Open Interface success!\n");
}
else
{
printf("Open Interface fail! nRet [0x%x]\n", nRet);
break;
}
switch(nType)
{
case 0:
{
break;
}
case 1:
{
break;
}
case 2:
{
break;
}
case 3:
{
break;
}
default:
{
printf("Input error!\n");
break;
}
}
{
printf("Close Interface success!\n");
}
else
{
printf("Close Interface Handle fail! nRet [0x%x]\n", nRet);
break;
}
{
printf("Destroy Interface success!\n");
}
else
{
printf("Destroy Interface Handle fail! nRet [0x%x]\n", nRet);
break;
}
} while (0);
{
}
printf("exit\n");
return 0;
}