Skip to content
Snippets Groups Projects
Commit 7aac1404 authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Fix query processors not transferring type

parent d1e7d772
No related branches found
No related tags found
2 merge requests!192Fix bugs in ArMem and make disk loading and storing nicer,!188ArMem Updates
This commit is part of merge request !192. Comments created here will be created in the context of that merge request.
......@@ -142,12 +142,10 @@ namespace armarx::armem::base
detail::toIce(ice.aronType, coreSegment.aronType());
ARMARX_CHECK(!coreSegment.aronType() || ice.aronType);
// toIce(ice.providerSegments, coreSegment.providerSegments());
ice.providerSegments.clear();
coreSegment.forEachProviderSegment([&ice](const auto & providerSegment)
{
armem::toIce(ice.providerSegments[providerSegment.name()], providerSegment);
return true;
});
}
template <class ...Args>
......@@ -176,7 +174,6 @@ namespace armarx::armem::base
memory.forEachCoreSegment([&ice](const auto & coreSegment)
{
armem::toIce(ice.coreSegments[coreSegment.name()], coreSegment);
return true;
});
}
template <class ...Args>
......
#pragma once
#include <regex>
#include <ArmarXCore/core/logging/Logging.h>
#include <ArmarXCore/core/exceptions/local/ExpressionException.h>
#include "BaseQueryProcessorBase.h"
#include <RobotAPI/interface/armem/query.h>
#include <RobotAPI/libraries/armem/core/error.h>
#include <RobotAPI/interface/armem/query.h>
#include "BaseQueryProcessorBase.h"
#include <regex>
namespace armarx::armem::server::query_proc::base
......@@ -74,7 +71,7 @@ namespace armarx::armem::server::query_proc::base
{
coreSegment.forEachProviderSegment([this, &query, &result](const ProviderSegmentT & providerSegment)
{
childProcessor.process(result.addProviderSegment(providerSegment.name()), query.providerSegmentQueries, providerSegment);
childProcessor.process(result.addProviderSegment(providerSegment.name(), providerSegment.aronType()), query.providerSegmentQueries, providerSegment);
});
}
......@@ -85,7 +82,7 @@ namespace armarx::armem::server::query_proc::base
try
{
const ProviderSegmentT& providerSegment = coreSegment.getProviderSegment(query.providerSegmentName);
childProcessor.process(result.addProviderSegment(providerSegment.name()), query.providerSegmentQueries, providerSegment);
childProcessor.process(result.addProviderSegment(providerSegment.name(), providerSegment.aronType()), query.providerSegmentQueries, providerSegment);
}
catch (const error::MissingEntry&)
{
......@@ -103,7 +100,7 @@ namespace armarx::armem::server::query_proc::base
{
if (std::regex_search(providerSegment.name(), regex))
{
childProcessor.process(result.addProviderSegment(providerSegment.name()), query.providerSegmentQueries, providerSegment);
childProcessor.process(result.addProviderSegment(providerSegment.name(), providerSegment.aronType()), query.providerSegmentQueries, providerSegment);
}
});
}
......
......@@ -9,7 +9,6 @@
#include <RobotAPI/interface/armem/query.h>
#include <ArmarXCore/core/exceptions/local/ExpressionException.h>
#include <ArmarXCore/core/logging/Logging.h>
#include <cstdint>
#include <iterator>
......@@ -99,11 +98,10 @@ namespace armarx::armem::server::query_proc::base
}
catch (const armem::error::EntityHistoryEmpty&)
{
if (false)
{
ARMARX_IMPORTANT << "Failed to retrieve latest snapshot from entity " << entity.id() << ". "
<< "Entity has not timestamps.";
}
#if 0
ARMARX_IMPORTANT << "Failed to retrieve latest snapshot from entity " << entity.id() << ". "
<< "Entity is empty.";
#endif
}
}
else
......@@ -117,19 +115,18 @@ namespace armarx::armem::server::query_proc::base
catch (const armem::error::MissingEntry&)
{
// Leave empty.
if (false)
#if 0
std::stringstream ss;
ss << "Failed to retrieve snapshot with timestamp "
<< armem::toDateTimeMilliSeconds(time)
<< " from entity " << entity.id() << ".\n"
<< "Entity has timestamps: ";
for (const Time& t : entity.getTimestamps())
{
std::stringstream ss;
ss << "Failed to retrieve snapshot with timestamp "
<< armem::toDateTimeMilliSeconds(time)
<< " from entity " << entity.id() << ".\n"
<< "Entity has timestamps: ";
for (const Time& t : entity.getTimestamps())
{
ss << "\n- " << armem::toDateTimeMilliSeconds(t);
}
ARMARX_IMPORTANT << ss.str();
ss << "\n- " << armem::toDateTimeMilliSeconds(t);
}
ARMARX_IMPORTANT << ss.str();
#endif
}
}
}
......
......@@ -5,9 +5,6 @@
#include <RobotAPI/libraries/armem/core/error.h>
#include <RobotAPI/interface/armem/query.h>
#include <ArmarXCore/core/logging/Logging.h>
#include <ArmarXCore/core/exceptions/local/ExpressionException.h>
#include <regex>
......@@ -76,7 +73,7 @@ namespace armarx::armem::server::query_proc::base
{
memory.forEachCoreSegment([this, &result, &query](const CoreSegmentT & coreSegment)
{
childProcessor.process(result.addCoreSegment(coreSegment.name()), query.coreSegmentQueries, coreSegment);
childProcessor.process(result.addCoreSegment(coreSegment.name(), coreSegment.aronType()), query.coreSegmentQueries, coreSegment);
});
}
......@@ -87,7 +84,7 @@ namespace armarx::armem::server::query_proc::base
try
{
const CoreSegmentT& coreSegment = memory.getCoreSegment(query.coreSegmentName);
childProcessor.process(result.addCoreSegment(coreSegment.name()), query.coreSegmentQueries, coreSegment);
childProcessor.process(result.addCoreSegment(coreSegment.name(), coreSegment.aronType()), query.coreSegmentQueries, coreSegment);
}
catch (const error::MissingEntry&)
{
......@@ -103,7 +100,7 @@ namespace armarx::armem::server::query_proc::base
{
if (std::regex_search(coreSegment.name(), regex))
{
childProcessor.process(result.addCoreSegment(coreSegment.name()), query.coreSegmentQueries, coreSegment);
childProcessor.process(result.addCoreSegment(coreSegment.name(), coreSegment.aronType()), query.coreSegmentQueries, coreSegment);
}
});
}
......
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