1.增加dp統計信息
This commit is contained in:
parent
f8d48b7120
commit
9f44f77a64
|
@ -877,14 +877,18 @@ SINT32 sf_pic_send_ftp(void)
|
||||||
char cameraID[64] = { 0 };
|
char cameraID[64] = { 0 };
|
||||||
UINT8 CamNameStr[64] = { 0 };
|
UINT8 CamNameStr[64] = { 0 };
|
||||||
UIMenuStoreInfo *pPara = sf_app_ui_para_get();
|
UIMenuStoreInfo *pPara = sf_app_ui_para_get();
|
||||||
|
SF_PDT_PARAM_STATISTICS_S *pSifarPara = sf_statistics_param_get();
|
||||||
SINT32 ret = SF_SUCCESS;
|
SINT32 ret = SF_SUCCESS;
|
||||||
UINT8 tempPicSize = 0;
|
UINT8 tempPicSize = 0;
|
||||||
UINT8 piccount = 0;
|
UINT8 piccount = 0;
|
||||||
UINT8 pic = 0;
|
UINT8 pic = 0;
|
||||||
UINT8 csqlevel = 0;
|
UINT8 csqlevel = 0;
|
||||||
int timeout = 120000;
|
int timeout = 120000;
|
||||||
|
SINT64 sendStartTime = 0;
|
||||||
|
SINT64 sendEndTime = 0;
|
||||||
SF_SRCFILE_ATTR_S *pThumbFileCfg = sf_file_thumb_cfg_get();
|
SF_SRCFILE_ATTR_S *pThumbFileCfg = sf_file_thumb_cfg_get();
|
||||||
MLOGD("start\n");
|
MLOGD("start\n");
|
||||||
|
sendStartTime = sf_sys_os_utime_get()/1000;
|
||||||
|
|
||||||
sf_custom_str_get(CamNameStr);
|
sf_custom_str_get(CamNameStr);
|
||||||
sf_4G_signal_level_get(pPara->NetGeneration,sf_get_cq_signal(),&csqlevel);
|
sf_4G_signal_level_get(pPara->NetGeneration,sf_get_cq_signal(),&csqlevel);
|
||||||
|
@ -913,91 +917,6 @@ SINT32 sf_pic_send_ftp(void)
|
||||||
timeout = 120000;
|
timeout = 120000;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
if((0 == pPara->SendMulti) || (pPara->SendMultishotIndex1) || (SF_MANUAL == sf_get_mode_flag()))
|
|
||||||
{
|
|
||||||
if(SF_FILE_TYPE_PIC_VIDEO == pThumbFileCfg->stfileattr[piccount].enFileTye){
|
|
||||||
sprintf((char *)ftpFileName[piccount], "%sV-%s", cameraID, pThumbFileCfg->stfileattr[piccount].thumbfileName);
|
|
||||||
}else{
|
|
||||||
sprintf((char *)ftpFileName[piccount], "%s%s", cameraID, pThumbFileCfg->stfileattr[piccount].thumbfileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
sprintf((char *)filePath[piccount], "%s", pThumbFileCfg->stfileattr[piccount].thumbfilePath);
|
|
||||||
|
|
||||||
#ifdef NETWORK_MODULE_EG91
|
|
||||||
sprintf((char *)filePath[piccount], "UFS:/%s", pThumbFileCfg->stfileattr[piccount].thumbfileName);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
piccount++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if((SF_AUTO == sf_get_mode_flag()) && (1 == pPara->SendMulti))
|
|
||||||
{
|
|
||||||
if(pPara->SendMultishotIndex2)
|
|
||||||
{
|
|
||||||
if(SF_FILE_TYPE_PIC_VIDEO == pThumbFileCfg->stfileattr[piccount].enFileTye){
|
|
||||||
sprintf((char *)ftpFileName[piccount], "%sV-%s", cameraID, pThumbFileCfg->stfileattr[piccount].thumbfileName);
|
|
||||||
}else{
|
|
||||||
sprintf((char *)ftpFileName[piccount], "%s%s", cameraID, pThumbFileCfg->stfileattr[piccount].thumbfileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
sprintf((char *)filePath[piccount], "%s", pThumbFileCfg->stfileattr[piccount].thumbfilePath);
|
|
||||||
|
|
||||||
#ifdef NETWORK_MODULE_EG91
|
|
||||||
sprintf((char *)filePath[piccount], "UFS:/%s", pThumbFileCfg->stfileattr[piccount].thumbfileName);
|
|
||||||
#endif
|
|
||||||
piccount++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pPara->SendMultishotIndex3)
|
|
||||||
{
|
|
||||||
if(SF_FILE_TYPE_PIC_VIDEO == pThumbFileCfg->stfileattr[piccount].enFileTye){
|
|
||||||
sprintf((char *)ftpFileName[piccount], "%sV-%s", cameraID, pThumbFileCfg->stfileattr[piccount].thumbfileName);
|
|
||||||
}else{
|
|
||||||
sprintf((char *)ftpFileName[piccount], "%s%s", cameraID, pThumbFileCfg->stfileattr[piccount].thumbfileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
sprintf((char *)filePath[piccount], "%s", pThumbFileCfg->stfileattr[piccount].thumbfilePath);
|
|
||||||
|
|
||||||
#ifdef NETWORK_MODULE_EG91
|
|
||||||
sprintf((char *)filePath[piccount], "UFS:/%s", pThumbFileCfg->stfileattr[piccount].thumbfileName);
|
|
||||||
#endif
|
|
||||||
piccount++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pPara->SendMultishotIndex4)
|
|
||||||
{
|
|
||||||
if(SF_FILE_TYPE_PIC_VIDEO == pThumbFileCfg->stfileattr[piccount].enFileTye){
|
|
||||||
sprintf((char *)ftpFileName[piccount], "%sV-%s", cameraID, pThumbFileCfg->stfileattr[piccount].thumbfileName);
|
|
||||||
}else{
|
|
||||||
sprintf((char *)ftpFileName[piccount], "%s%s", cameraID, pThumbFileCfg->stfileattr[piccount].thumbfileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
sprintf((char *)filePath[piccount], "%s", pThumbFileCfg->stfileattr[piccount].thumbfilePath);
|
|
||||||
|
|
||||||
#ifdef NETWORK_MODULE_EG91
|
|
||||||
sprintf((char *)filePath[piccount], "UFS:/%s", pThumbFileCfg->stfileattr[piccount].thumbfileName);
|
|
||||||
#endif
|
|
||||||
piccount++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(pPara->SendMultishotIndex5)
|
|
||||||
{
|
|
||||||
if(SF_FILE_TYPE_PIC_VIDEO == pThumbFileCfg->stfileattr[piccount].enFileTye){
|
|
||||||
sprintf((char *)ftpFileName[piccount], "%sV-%s", cameraID, pThumbFileCfg->stfileattr[piccount].thumbfileName);
|
|
||||||
}else{
|
|
||||||
sprintf((char *)ftpFileName[piccount], "%s%s", cameraID, pThumbFileCfg->stfileattr[piccount].thumbfileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
sprintf((char *)filePath[piccount], "%s", pThumbFileCfg->stfileattr[piccount].thumbfilePath);
|
|
||||||
|
|
||||||
#ifdef NETWORK_MODULE_EG91
|
|
||||||
sprintf((char *)filePath[piccount], "UFS:/%s", pThumbFileCfg->stfileattr[piccount].thumbfileName);
|
|
||||||
#endif
|
|
||||||
piccount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
piccount = pThumbFileCfg->filecnt;
|
piccount = pThumbFileCfg->filecnt;
|
||||||
if(4 == pPara->NetGeneration)
|
if(4 == pPara->NetGeneration)
|
||||||
{
|
{
|
||||||
|
@ -1040,18 +959,43 @@ SINT32 sf_pic_send_ftp(void)
|
||||||
{
|
{
|
||||||
ret = sf_ftp_send(ftpFileName[pic], filePath[pic], timeout);
|
ret = sf_ftp_send(ftpFileName[pic], filePath[pic], timeout);
|
||||||
|
|
||||||
if(SF_SUCCESS != ret)
|
if(SF_SUCCESS != ret)
|
||||||
{
|
{
|
||||||
printf("%s:%d err ftpFileName:%s filePath:%s\n", __FUNCTION__, __LINE__, ftpFileName[pic], filePath[pic]);
|
pSifarPara->picSendFailCount++;
|
||||||
}
|
pSifarPara->sendThumbnailFailCount++;
|
||||||
|
//TIMEOUT
|
||||||
|
//pSifarPara->picSendTimeoutCount++;
|
||||||
|
printf("%s:%d err ftpFileName:%s filePath:%s picSendFailCount:%d sendThumbnailFailCount:%d\n", __FUNCTION__, __LINE__, ftpFileName[pic], filePath[pic],pSifarPara->picSendFailCount, pSifarPara->sendThumbnailFailCount);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if(!sf_get_mode_flag()){
|
||||||
|
pSifarPara->picSendMax++;
|
||||||
|
}
|
||||||
|
pSifarPara->picSendSucessCount++;
|
||||||
|
if((pPara->SendMaxNum == 0) || (pSifarPara->picSendMax < pPara->SendMaxNum)){
|
||||||
|
pSifarPara->picSendCount++;
|
||||||
|
pSifarPara->sendThumbnailCount++;
|
||||||
|
printf("picSendCount=%d sendThumbnailCount=%d\n", pSifarPara->picSendCount, pSifarPara->sendThumbnailCount);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MLOGD(" SendMaxNum:%d picSendMax:%d\n", pPara->SendMaxNum, pSifarPara->picSendMax);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf("%s:%d err up file ftpFileName:%s filePath:%s\n", __FUNCTION__, __LINE__, ftpFileName[pic], filePath[pic]);
|
printf("%s:%d err up file ftpFileName:%s filePath:%s\n", __FUNCTION__, __LINE__, ftpFileName[pic], filePath[pic]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
sendEndTime = sf_sys_os_utime_get()/1000;
|
||||||
|
pSifarPara->picSendTimeCount +=sendEndTime - sendStartTime;
|
||||||
|
pSifarPara->sendThumbnailTimeCount += sendEndTime - sendStartTime;
|
||||||
|
|
||||||
MLOGD(" end ret:[0x%08X]\n", ret);
|
MLOGD(" end ret:[0x%08X] sendTime:%ds\n", ret, (sendEndTime - sendStartTime));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user