Skip to content
Snippets Groups Projects
Commit 33751d79 authored by Joana Plewnia's avatar Joana Plewnia
Browse files

changed which timestamp is used for frequency filtering (time referenced) and...

changed which timestamp is used for frequency filtering (time referenced) and deactivated storeOnStop
parent 83f5905a
No related branches found
No related tags found
1 merge request!479feature : loading LTM information on WM startup
Pipeline #20940 passed
......@@ -253,7 +253,6 @@ namespace armarx::armem::server::ltm::detail
void
stopRecording()
{
disable();
}
......@@ -351,7 +350,7 @@ namespace armarx::armem::server::ltm::detail
"{ \"SnapshotFrequencyFilter\": {\"WaitingTimeInMsForFilter\" : 50}}"; //record with 20 fps as standard
std::string export_name = "MemoryExport";
std::string export_path = "/tmp/ltm";
bool storeOnStop = true;
bool storeOnStop = false;
//belong more to WM, but no good solution for that currently:
bool importOnStartUp = false;
......
......@@ -89,6 +89,39 @@ namespace armarx::armem::server::ltm::processor::filter
ARMARX_DEBUG << VAROUT(arrivedTime.toMilliSecondsSinceEpoch());
ARMARX_DEBUG << VAROUT(referencedTime.toMilliSecondsSinceEpoch());
//we want the referenced time, if not set correctly we take sent time, then arrvived time:
if(referencedTime.toMilliSecondsSinceEpoch() < 946688400000){
//timestamp corrupted:
if(sentTime.toMilliSecondsSinceEpoch() < 946688400000){
//sent also corrupted:
if(arrivedTime.toMilliSecondsSinceEpoch() < 946688400000){
//arrived also corrupted:
if(!corruptedWarningGiven){
ARMARX_WARNING << "LTM recording does not work correctly, as frequency filter is used, but "
<< "time sent, arrived and referenced are all corrupted. \n"
<< "Accepting all snapshots.";
this->nonCorruptedType = TimestampType::ALL_CORRUPTED;
corruptedWarningGiven = true;
}
} else {
if(!corruptedWarningGiven){ //only print this warning once
ARMARX_INFO << "Time referenced and sent for snapshot corrupted, using time arrived for filtering";
corruptedWarningGiven = true;
}
this->nonCorruptedType = TimestampType::ARRIVED;
}
} else {
if(!corruptedWarningGiven){ //only print this warning once
ARMARX_INFO << "Time referenced snapshot corrupted, using time sent for filtering";
corruptedWarningGiven = true;
}
this->nonCorruptedType = TimestampType::SENT;
}
} else {
this->nonCorruptedType = TimestampType::REFERENCED;
}
/**
if(sentTime.toMilliSecondsSinceEpoch() < 946688400000){
// we assume the timestamp does not make sense if it is older than the year 2000
if(arrivedTime.toMilliSecondsSinceEpoch() < 946688400000){
......@@ -116,6 +149,7 @@ namespace armarx::armem::server::ltm::processor::filter
} else {
this->nonCorruptedType = TimestampType::SENT;
}
*/
}
int
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment