#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <pthread.h>
{
if (NULL == pstMVDevInfo)
{
printf("The Pointer of pstMVDevInfo is NULL!\n");
return false;
}
{
printf("CurrentIp: %d.%d.%d.%d\n" , nIp1, nIp2, nIp3, nIp4);
}
{
}
else
{
printf("Not support.\n");
}
return true;
}
{
do
{
{
printf("Initialize SDK fail! nRet [0x%x]\n", nRet);
break;
}
{
printf("Enum Devices fail! nRet [0x%x]\n", nRet);
break;
}
{
for (
unsigned int i = 0; i < stDeviceList.
nDeviceNum; i++)
{
printf("[device %d]:\n", i);
if (NULL == pDeviceInfo)
{
break;
}
}
}
else
{
printf("Find No Devices!\n");
break;
}
printf(
"Please Input camera index(0-%d):", stDeviceList.
nDeviceNum-1);
unsigned int nIndex = 0;
scanf("%d", &nIndex);
{
printf("Input error!\n");
break;
}
{
printf("Create Handle fail! nRet [0x%x]\n", nRet);
break;
}
{
printf("Open Device fail! nRet [0x%x]\n", nRet);
break;
}
printf("Open Device success.\n");
printf("\n");
printf("0: Read the file from the device and save it locally:\n");
printf("1: Import the local file into the device:\n");
printf("Please enter your choice:\n");
unsigned int nOperationIndex = 0;
scanf("%d", &nOperationIndex);
if (0 != nOperationIndex && 1 != nOperationIndex)
{
printf("Input error!\n");
break;
}
if (0 == nOperationIndex)
{
{
printf("Set UserSetSelector UserSet1 fail! nRet [0x%x]\n", nRet);
break;
}
{
printf("Set command UserSetLoad fail! nRet [0x%x]\n", nRet);
break;
}
{
printf("File Access Read fail! nRet [0x%x]\n", nRet);
break;
}
printf("File Access Read Success.\n");
}
else
{
{
printf("Set UserSetSelector UserSet1 fail! nRet [0x%x]\n", nRet);
break;
}
{
printf("File Access Write fail! nRet [0x%x]\n", nRet);
}
printf("File Access Write Success.\n");
{
printf("Set command UserSetLoad fail! nRet [0x%x]\n", nRet);
break;
}
{
printf("Set UserSetDefault UserSet1 fail! nRet [0x%x]\n", nRet);
break;
}
{
printf("Set command UserSetSave fail! nRet [0x%x]\n", nRet);
break;
}
}
{
printf("ClosDevice fail! nRet [0x%x]\n", nRet);
break;
}
printf("Clos Device success.\n");
{
printf("Destroy Handle fail! nRet [0x%x]\n", nRet);
break;
}
} while (0);
{
}
printf("exit.\n");
return 0;
}