|
|
|
| 1 |
//============================================================================ |
//============================================================================ |
| 2 |
// $Id: PacketUser.cpp,v 1.69 2008-10-27 10:41:27 messineo Exp $ |
// $Id: PacketUser.cpp,v 1.69 2008-10-27 10:41:27 messineo Exp $ |
| 3 |
// Description : |
// Description : |
| 35 |
//per tenere conto reset obt |
//per tenere conto reset obt |
| 36 |
extern unsigned long int max_pkt_obt; |
extern unsigned long int max_pkt_obt; |
| 37 |
|
|
| 38 |
|
#define TAGVALUELEN 4 |
| 39 |
|
extern char tag_value[TAGVALUELEN]; |
| 40 |
|
|
| 41 |
PacketUser PacketUser::instance; |
PacketUser PacketUser::instance; |
| 42 |
|
|
| 61 |
obt_last=0; |
obt_last=0; |
| 62 |
obt_time_sync=0; |
obt_time_sync=0; |
| 63 |
last_time_sync_info=0; |
last_time_sync_info=0; |
| 64 |
|
|
| 65 |
|
//(tassa) |
| 66 |
|
obt_time_sync_prevvalue=0; |
| 67 |
|
last_time_sync_info_prevvalue=0; |
| 68 |
|
time_is_estimated=false; |
| 69 |
|
|
| 70 |
|
|
| 71 |
real_time_init=0; |
real_time_init=0; |
| 72 |
real_time_last=0; |
real_time_last=0; |
| 73 |
bad_pkt=0; |
bad_pkt=0; |
| 83 |
// good_pkt_Calib=0; |
// good_pkt_Calib=0; |
| 84 |
my_id=0; |
my_id=0; |
| 85 |
boot_number=0; |
boot_number=0; |
| 86 |
|
//(tassa) |
| 87 |
|
boot_number_prevvalue=0; |
| 88 |
|
|
| 89 |
|
//(tassa) |
| 90 |
|
id_to_recover[1000]; |
| 91 |
|
id_to_recover_index=0; |
| 92 |
} |
} |
| 93 |
|
|
| 94 |
PacketUser::~PacketUser() |
PacketUser::~PacketUser() |
| 103 |
obt_last=0; |
obt_last=0; |
| 104 |
obt_time_sync = 0; |
obt_time_sync = 0; |
| 105 |
last_time_sync_info = 0; |
last_time_sync_info = 0; |
| 106 |
|
obt_time_sync_prevvalue=0; |
| 107 |
|
last_time_sync_info_prevvalue=0; |
| 108 |
|
time_is_estimated=false; |
| 109 |
|
|
| 110 |
real_time_init=0; |
real_time_init=0; |
| 111 |
real_time_last=0; |
real_time_last=0; |
| 112 |
bad_pkt=0; |
bad_pkt=0; |
| 115 |
// good_pkt_Calib=0; |
// good_pkt_Calib=0; |
| 116 |
my_id=0; |
my_id=0; |
| 117 |
boot_number=0; |
boot_number=0; |
| 118 |
|
boot_number_prevvalue=0; |
| 119 |
} |
} |
| 120 |
|
|
| 121 |
|
|
| 228 |
|
|
| 229 |
//marco_NB: |
//marco_NB: |
| 230 |
//ogni volta che trovo una discontinuit� resetto come se mi trovassi in un nuovo download oppure uso i vecchi valori se esistono? |
//ogni volta che trovo una discontinuit� resetto come se mi trovassi in un nuovo download oppure uso i vecchi valori se esistono? |
| 231 |
obt_time_sync=0; last_time_sync_info=0; boot_number=0; |
|
| 232 |
|
obt_time_sync_prevvalue=obt_time_sync; |
| 233 |
|
last_time_sync_info_prevvalue=last_time_sync_info; |
| 234 |
|
time_is_estimated=false; |
| 235 |
|
obt_time_sync=0; last_time_sync_info=0; |
| 236 |
|
boot_number_prevvalue=boot_number; |
| 237 |
|
boot_number=0; |
| 238 |
|
|
| 239 |
// NB: se ho discontinuita in genere non so a che download appartiene potrebbe proprio essere sbagliato tenere i vecchi valori |
// NB: se ho discontinuita in genere non so a che download appartiene potrebbe proprio essere sbagliato tenere i vecchi valori |
| 240 |
|
|
| 241 |
} |
} |
| 280 |
{ |
{ |
| 281 |
//reset |
//reset |
| 282 |
is_new_route=false; |
is_new_route=false; |
| 283 |
|
//(tassa) ci ho ripensato se stiamo in un secondo download non prendiamo i bootnumber e timesync del precedente! |
| 284 |
|
obt_time_sync_prevvalue=0;//obt_time_sync; |
| 285 |
|
last_time_sync_info_prevvalue=0;//last_time_sync_info; |
| 286 |
|
|
| 287 |
obt_time_sync=0; last_time_sync_info=0; |
obt_time_sync=0; last_time_sync_info=0; |
| 288 |
|
boot_number_prevvalue=0;//boot_number; |
| 289 |
boot_number=0; |
boot_number=0; |
| 290 |
|
time_is_estimated=false; |
| 291 |
if(time_Offset) |
if(time_Offset) |
| 292 |
timeOffset=time_Offset; |
timeOffset=time_Offset; |
| 293 |
else |
else |
| 365 |
//set the real time of the first packet and the last packet oif a group of packet if possible |
//set the real time of the first packet and the last packet oif a group of packet if possible |
| 366 |
void PacketUser::setReal_Time() |
void PacketUser::setReal_Time() |
| 367 |
{ |
{ |
| 368 |
if((obt_time_sync)||(last_time_sync_info)) |
|
| 369 |
|
if(!obt_time_sync && !last_time_sync_info && numPKTSaved > 1000 ) |
| 370 |
{ |
{ |
| 371 |
|
time_is_estimated=true; |
| 372 |
real_time_init=(obt_init/1000-obt_time_sync)+last_time_sync_info; |
obt_time_sync=obt_time_sync_prevvalue; |
| 373 |
|
last_time_sync_info=last_time_sync_info_prevvalue; |
| 374 |
|
} |
| 375 |
|
if(obt_time_sync || last_time_sync_info) |
| 376 |
|
{ |
| 377 |
|
real_time_init=(obt_init/1000-obt_time_sync)+last_time_sync_info; |
| 378 |
//se obt si e' resettato |
//se obt si e' resettato |
| 379 |
if(obt_last<obt_init) |
if(obt_last<obt_init) |
| 380 |
{ |
{ |
| 389 |
real_time_last=(obt_last/1000-obt_time_sync)+last_time_sync_info; |
real_time_last=(obt_last/1000-obt_time_sync)+last_time_sync_info; |
| 390 |
real_time_init+=timeOffset; |
real_time_init+=timeOffset; |
| 391 |
real_time_last+=timeOffset; |
real_time_last+=timeOffset; |
|
|
|
|
|
|
| 392 |
} |
} |
| 393 |
} |
} |
| 394 |
|
|
| 533 |
boot_number, |
boot_number, |
| 534 |
timeOffset, |
timeOffset, |
| 535 |
bad_pkt, bad_pkt_EventReader, bad_pkt_CalibReader, numPKTSaved, |
bad_pkt, bad_pkt_EventReader, bad_pkt_CalibReader, numPKTSaved, |
| 536 |
fni)==true) |
fni,time_is_estimated)==true) |
| 537 |
{ |
{ |
| 538 |
oss.str()=""; |
oss.str()=""; |
| 539 |
oss<<"Saved information regarding file: "<<filename<<" in table "<<Table_ROOT_Bad; |
oss<<"Saved information regarding file: "<<filename<<" in table "<<Table_ROOT_Bad; |
| 556 |
} |
} |
| 557 |
|
|
| 558 |
//saves info in DB in table Table_ROOT_Good |
//saves info in DB in table Table_ROOT_Good |
| 559 |
if(saveROOT_DB(Table_ROOT_Good, outDir, |
if(boot_number==0) |
| 560 |
|
boot_number=boot_number_prevvalue; |
| 561 |
|
|
| 562 |
|
if(saveROOT_DB(Table_ROOT_Good, outDir, |
| 563 |
filename, |
filename, |
| 564 |
pkt_number_init, pkt_number_last, |
pkt_number_init, pkt_number_last, |
| 565 |
obt_init, obt_last, |
obt_init, obt_last, |
| 568 |
boot_number, |
boot_number, |
| 569 |
timeOffset, |
timeOffset, |
| 570 |
bad_pkt, bad_pkt_EventReader, bad_pkt_CalibReader, numPKTSaved, |
bad_pkt, bad_pkt_EventReader, bad_pkt_CalibReader, numPKTSaved, |
| 571 |
fni)==true) |
fni,time_is_estimated)==true) |
| 572 |
{ |
{ |
| 573 |
oss<<"Saved information regarding file: "<<filename<<" in table "<<Table_ROOT_Good<< " id= "<<my_id; |
oss<<"Saved information regarding file: "<<filename<<" in table "<<Table_ROOT_Good<< " id= "<<my_id; |
| 574 |
msg = oss.str(); |
msg = oss.str(); |
| 601 |
unsigned long int mboot_num, |
unsigned long int mboot_num, |
| 602 |
unsigned long int time_offset, |
unsigned long int time_offset, |
| 603 |
int bad_pkt, int bad_pkt_read, int bad_pkt_CalRead, int num_PKT_Saved, |
int bad_pkt, int bad_pkt_read, int bad_pkt_CalRead, int num_PKT_Saved, |
| 604 |
char* nome_input){ |
char* nome_input, bool _time_is_estimated){ |
| 605 |
//TODO: forse far ritornare ID della cosa appena inserita se e' andatato tutto ok invece che true false? |
//TODO: forse far ritornare ID della cosa appena inserita se e' andatato tutto ok invece che true false? |
| 606 |
stringstream oss; |
stringstream oss; |
| 607 |
oss.str(""); |
oss.str(""); |
| 608 |
oss << "INSERT INTO "<< table_name <<" (ID_N, FOLDER_NAME, FILE_NAME, PKT_NUMBER_INIT, PKT_NUMBER_FINAL, PKT_OBT_INIT, PKT_OBT_FINAL, OBT_TIME_SYNC, LAST_TIME_SYNC_INFO, REAL_TIME_INIT, REAL_TIME_LAST, BOOT_NUMBER, TIME_OFFSET,BAD_PKT,BAD_PKT_READ,BAD_PKT_CALREAD,NUM_PKT_SAVED,INPUT_NAME,INSERT_TIME)" |
oss << "INSERT INTO "<< table_name <<" (ID_N, FOLDER_NAME, FILE_NAME, PKT_NUMBER_INIT, PKT_NUMBER_FINAL, PKT_OBT_INIT, PKT_OBT_FINAL, OBT_TIME_SYNC, LAST_TIME_SYNC_INFO, REAL_TIME_INIT, REAL_TIME_LAST, BOOT_NUMBER, TIME_OFFSET,BAD_PKT,BAD_PKT_READ,BAD_PKT_CALREAD,NUM_PKT_SAVED,INPUT_NAME,INSERT_TIME,TIME_IS_ESTIMATED)" |
| 609 |
<< " VALUES ('"<<0<< "','" <<folder_name<<"','" <<file_name<< "','" << pkt_number_in <<"','"<< pkt_number_fin << "','"<< obt_in <<"','"<< obt_fin<< "','" |
<< " VALUES ('"<<0<< "','" <<folder_name<<"','" <<file_name<< "','" << pkt_number_in <<"','"<< pkt_number_fin << "','"<< obt_in <<"','"<< obt_fin<< "','" |
| 610 |
<< oT_sync << "','" << lT_sync_info << "','" |
<< oT_sync << "','" << lT_sync_info << "','" |
| 611 |
<< mtime_init << "','" << mtime_last << "','" |
<< mtime_init << "','" << mtime_last << "','" |
| 613 |
<< time_offset << "','" |
<< time_offset << "','" |
| 614 |
<< bad_pkt <<"','" << bad_pkt_read <<"','"<< bad_pkt_CalRead <<"','"<< num_PKT_Saved<<"','" |
<< bad_pkt <<"','" << bad_pkt_read <<"','"<< bad_pkt_CalRead <<"','"<< num_PKT_Saved<<"','" |
| 615 |
<< nome_input <<"'," |
<< nome_input <<"'," |
| 616 |
<<"NULL"<< |
<<"NULL,"<<_time_is_estimated<< |
| 617 |
")"; |
")"; |
| 618 |
string msg = oss.str(); |
string msg = oss.str(); |
| 619 |
mainLogUtil->logAll(msg); |
mainLogUtil->logAll(msg); |
| 621 |
stringstream oss1; |
stringstream oss1; |
| 622 |
oss1.str()=""; |
oss1.str()=""; |
| 623 |
string msg1; |
string msg1; |
| 624 |
|
string query; |
| 625 |
|
|
| 626 |
TSQLResult* res=NULL; |
TSQLResult* res=NULL; |
| 627 |
res= sqlServer->Query(oss.str().c_str()); |
|
| 628 |
|
query=oss.str(); |
| 629 |
|
msg1="SaveROOT_DB query: "; |
| 630 |
|
msg1 += query; |
| 631 |
|
mainLogUtil->logInfo(msg1); |
| 632 |
|
|
| 633 |
|
res= sqlServer->Query(query.c_str()); |
| 634 |
if(!res) |
if(!res) |
| 635 |
{ |
{ |
| 636 |
oss1<<"DBError UNABLE to: "<<oss.str().c_str()<<endl; |
oss1<<"DBError UNABLE to: "<<oss.str().c_str()<<endl; |
| 641 |
|
|
| 642 |
//the ID of the current ROOT file in table Table_ROOT_Good |
//the ID of the current ROOT file in table Table_ROOT_Good |
| 643 |
my_id = select_maxIDN_DB(table_name); |
my_id = select_maxIDN_DB(table_name); |
| 644 |
|
if(!boot_number){ |
| 645 |
|
if(id_to_recover_index<1000) |
| 646 |
|
id_to_recover[id_to_recover_index++]=my_id; |
| 647 |
|
}else if (boot_number && id_to_recover_index && !is_new_route){ |
| 648 |
|
recover_boot_number(); |
| 649 |
|
} |
| 650 |
// cout<<"DBG: my_id = "<<my_id<<endl; |
// cout<<"DBG: my_id = "<<my_id<<endl; |
| 651 |
if(res){delete res; res = NULL;} |
if(res){delete res; res = NULL;} |
| 652 |
return true; |
return true; |
| 653 |
} |
} |
| 654 |
|
|
| 655 |
|
|
| 656 |
|
void PacketUser::recover_boot_number(){ |
| 657 |
|
string msg1; |
| 658 |
|
stringstream oss1; |
| 659 |
|
stringstream oss; |
| 660 |
|
oss.str(""); |
| 661 |
|
string query=""; |
| 662 |
|
TSQLResult* res=NULL; |
| 663 |
|
if(!boot_number || !id_to_recover_index) |
| 664 |
|
return; |
| 665 |
|
|
| 666 |
|
for (int i = 0; i<id_to_recover_index;i++){ |
| 667 |
|
oss << "UPDATE "<< Table_ROOT_Good << " SET BOOT_NUMBER=" << boot_number << " WHERE ID_N=" << id_to_recover[i]; |
| 668 |
|
query = oss.str(); |
| 669 |
|
res= sqlServer->Query(query.c_str()); |
| 670 |
|
if(!res) |
| 671 |
|
{ |
| 672 |
|
oss1<<"DBError UNABLE to: "<<query.c_str()<<endl; |
| 673 |
|
msg1=oss1.str(); |
| 674 |
|
mainLogUtil->logError(msg1); |
| 675 |
|
return ; |
| 676 |
|
} |
| 677 |
|
} |
| 678 |
|
|
| 679 |
|
for (int i = 0; i<id_to_recover_index;i++){ |
| 680 |
|
oss << "UPDATE " << Table_ROOT_Merging << " SET BOOT_NUMBER=" << boot_number << " WHERE ROOT_ID_N=" << id_to_recover[i]; |
| 681 |
|
query=oss.str(); |
| 682 |
|
res= sqlServer->Query(query.c_str()); |
| 683 |
|
if(!res) |
| 684 |
|
{ |
| 685 |
|
oss1<<"DBError UNABLE to: "<<query.c_str()<<endl; |
| 686 |
|
msg1=oss1.str(); |
| 687 |
|
mainLogUtil->logError(msg1); |
| 688 |
|
return ; |
| 689 |
|
} |
| 690 |
|
} |
| 691 |
|
|
| 692 |
|
id_to_recover_index=0; |
| 693 |
|
} |
| 694 |
|
|
| 695 |
|
|
| 696 |
|
|
| 697 |
/**********************************************************************************************/ |
/**********************************************************************************************/ |
| 698 |
/*###########################################################################################################*/ |
/*###########################################################################################################*/ |
| 699 |
/********************************** MERGING *************************************************/ |
/********************************** MERGING *************************************************/ |
| 700 |
/*###########################################################################################################*/ |
/*###########################################################################################################*/ |
| 701 |
// Merge ROOT files: find other ROOT files in the same temporal ranges |
// Merge ROT files: find other ROOT files in the same temporal ranges |
| 702 |
// it finds ROOT files that covers particular temporal range of interest and save this info in DB |
// it finds ROOT files that covers particular temporal range of interest and save this info in DB |
| 703 |
/**********************************************************************************************/ |
/**********************************************************************************************/ |
| 704 |
//try to merge current ROOT file with files in DB |
//try to merge current ROOT file with files in DB |
| 812 |
if(relaz == AFTER) |
if(relaz == AFTER) |
| 813 |
{ |
{ |
| 814 |
mainLogUtil->logInfo("Relaz:AFTER = Changing Init values of the Current ROOT file"); |
mainLogUtil->logInfo("Relaz:AFTER = Changing Init values of the Current ROOT file"); |
| 815 |
pkt_number_init = pkt_num_fin_db; |
pkt_number_init = (pkt_num_fin_db+1); |
| 816 |
obt_init = pkt_obt_fin_db; |
obt_init = pkt_obt_fin_db; |
| 817 |
real_time_init = time_fin_db; |
real_time_init = time_fin_db; |
| 818 |
log.str(""); |
log.str(""); |
| 824 |
else if(relaz == BEFORE) |
else if(relaz == BEFORE) |
| 825 |
{ |
{ |
| 826 |
mainLogUtil->logInfo("Relaz:BEFORE = Changing Last values of the Current ROOT file"); |
mainLogUtil->logInfo("Relaz:BEFORE = Changing Last values of the Current ROOT file"); |
| 827 |
pkt_number_last = pkt_num_in_db; |
pkt_number_last = (pkt_num_in_db-1); |
| 828 |
obt_last = pkt_obt_in_db; |
obt_last = pkt_obt_in_db; |
| 829 |
real_time_last = time_in_db; |
real_time_last = time_in_db; |
| 830 |
|
|
| 847 |
{ |
{ |
| 848 |
mainLogUtil->logInfo("Relaz:BIGGER = (1st part) Saving the first part of the Current ROOT file"); |
mainLogUtil->logInfo("Relaz:BIGGER = (1st part) Saving the first part of the Current ROOT file"); |
| 849 |
saveMergeROOT_DB(Table_ROOT_Merging, my_id, |
saveMergeROOT_DB(Table_ROOT_Merging, my_id, |
| 850 |
pkt_number_init, pkt_num_in_db, |
pkt_number_init, (pkt_num_in_db-1), |
| 851 |
obt_init, pkt_obt_in_db, |
obt_init, pkt_obt_in_db, |
| 852 |
real_time_init, time_in_db, |
real_time_init, time_in_db, |
| 853 |
boot_number, |
boot_number, |
| 854 |
percentage); |
percentage); |
| 855 |
|
|
| 856 |
mainLogUtil->logInfo("Relaz:BIGGER = (2nd part)Changing Init values of the Current ROOT file"); |
mainLogUtil->logInfo("Relaz:BIGGER = (2nd part)Changing Init values of the Current ROOT file"); |
| 857 |
pkt_number_init = pkt_num_fin_db; |
pkt_number_init = (pkt_num_fin_db+1); |
| 858 |
obt_init= pkt_obt_fin_db; |
obt_init= pkt_obt_fin_db; |
| 859 |
real_time_init= time_fin_db; |
real_time_init= time_fin_db; |
| 860 |
|
|
| 903 |
mainLogUtil->logInfo("Relaz:AFTER = Updating Last values of the DB ROOT file"); |
mainLogUtil->logInfo("Relaz:AFTER = Updating Last values of the DB ROOT file"); |
| 904 |
//marco_new:tolti tutti gli apici che qui non devono essere |
//marco_new:tolti tutti gli apici che qui non devono essere |
| 905 |
oss << "UPDATE "<< table_name |
oss << "UPDATE "<< table_name |
| 906 |
<< " SET PKT_NUMBER_FINAL ="<< pkt_number_init |
<< " SET PKT_NUMBER_FINAL ="<< (pkt_number_init - 1) |
| 907 |
<<", PKT_OBT_FINAL ="<< obt_init |
<<", PKT_OBT_FINAL ="<< obt_init |
| 908 |
<<", REAL_TIME_LAST ="<< real_time_init<<" WHERE ID_N ="<< ID_record <<";"; |
<<", REAL_TIME_LAST ="<< real_time_init<<" WHERE ID_N ="<< ID_record <<";"; |
| 909 |
|
|
| 911 |
else if(type_rel == BEFORE){ |
else if(type_rel == BEFORE){ |
| 912 |
mainLogUtil->logInfo("Relaz:BEFORE = Updating Init values of the DB ROOT file"); |
mainLogUtil->logInfo("Relaz:BEFORE = Updating Init values of the DB ROOT file"); |
| 913 |
oss << "UPDATE "<< table_name |
oss << "UPDATE "<< table_name |
| 914 |
<< " SET PKT_NUMBER_INIT ="<< pkt_number_last |
<< " SET PKT_NUMBER_INIT ="<< (pkt_number_last+1) |
| 915 |
<<", PKT_OBT_INIT ="<< obt_last |
<<", PKT_OBT_INIT ="<< obt_last |
| 916 |
<<", REAL_TIME_INIT ="<< real_time_last<<" WHERE ID_N ="<< ID_record<<";"; |
<<", REAL_TIME_INIT ="<< real_time_last<<" WHERE ID_N ="<< ID_record<<";"; |
| 917 |
} |
} |
| 920 |
mainLogUtil->logInfo("Relaz:SMALLER = (1st part) Updating Last values of the DB ROOT file"); |
mainLogUtil->logInfo("Relaz:SMALLER = (1st part) Updating Last values of the DB ROOT file"); |
| 921 |
|
|
| 922 |
oss << "UPDATE "<< table_name |
oss << "UPDATE "<< table_name |
| 923 |
<< " SET PKT_NUMBER_FINAL="<< pkt_number_init |
<< " SET PKT_NUMBER_FINAL="<< (pkt_number_init-1) |
| 924 |
<<", PKT_OBT_FINAL ="<< obt_init |
<<", PKT_OBT_FINAL ="<< obt_init |
| 925 |
<<", REAL_TIME_LAST ="<< real_time_init<<" WHERE ID_N ="<< ID_record<<";"; |
<<", REAL_TIME_LAST ="<< real_time_init<<" WHERE ID_N ="<< ID_record<<";"; |
| 926 |
|
|
| 927 |
mainLogUtil->logInfo("Relaz:SMALLER = (2nd part) Saving the second part of the DB ROOT file"); |
mainLogUtil->logInfo("Relaz:SMALLER = (2nd part) Saving the second part of the DB ROOT file"); |
| 928 |
|
|
| 929 |
saveMergeROOT_DB(table_name, root_id, |
saveMergeROOT_DB(table_name, root_id, |
| 930 |
pkt_number_last, pkt_number_fin, |
(pkt_number_last+1), pkt_number_fin, |
| 931 |
obt_last, obt_fin, |
obt_last, obt_fin, |
| 932 |
real_time_last, mtime_last, |
real_time_last, mtime_last, |
| 933 |
mboot_num, |
mboot_num, |
| 1012 |
|
|
| 1013 |
stringstream oss; |
stringstream oss; |
| 1014 |
oss.str(""); |
oss.str(""); |
| 1015 |
oss << "INSERT INTO "<< table_name <<" (ID_N, ROOT_ID_N, PKT_NUMBER_INIT, PKT_NUMBER_FINAL, PKT_OBT_INIT, PKT_OBT_FINAL, REAL_TIME_INIT, REAL_TIME_LAST, BOOT_NUMBER, BAD_PKT_PERCENTAGE, INSERT_TIME)" |
oss << "INSERT INTO "<< table_name <<" (ID_N, ROOT_ID_N, PKT_NUMBER_INIT, PKT_NUMBER_FINAL, PKT_OBT_INIT, PKT_OBT_FINAL, REAL_TIME_INIT, REAL_TIME_LAST, BOOT_NUMBER, BAD_PKT_PERCENTAGE, INSERT_TIME, INSERTED_BY)" |
| 1016 |
<< " VALUES ('"<<0<< "','" <<root_id<<"','"<< pkt_number_in <<"','"<< pkt_number_fin << "','"<< obt_in <<"','"<< obt_fin<< "','" |
<< " VALUES ('"<<0<< "','" <<root_id<<"','"<< pkt_number_in <<"','"<< pkt_number_fin << "','"<< obt_in <<"','"<< obt_fin<< "','" |
| 1017 |
<< mtime_init << "','" << mtime_last << "','" |
<< mtime_init << "','" << mtime_last << "','" |
| 1018 |
<< mboot_num <<"','" |
<< mboot_num <<"','" |
| 1019 |
<< percentage <<"'," |
<< percentage <<"'," |
| 1020 |
<<"NULL"<< |
<<"NULL"<<",'" |
| 1021 |
")"; |
<< tag_value<<"'" |
| 1022 |
|
<< ")"; |
| 1023 |
|
|
| 1024 |
string msg = oss.str(); |
string msg = oss.str(); |
| 1025 |
mainLogUtil->logAll(msg); |
mainLogUtil->logAll(msg); |
| 1026 |
|
|
|
|
|
| 1027 |
//marco_new: controlla |
//marco_new: controlla |
| 1028 |
//marco_new: esci se sono arrivato a zero |
//marco_new: esci se sono arrivato a zero |
| 1029 |
// if(real_time_last==real_time_init){ |
// if(real_time_last==real_time_init){ |