Skip to content
Snippets Groups Projects
Commit cb37cc10 authored by Fabian Tërnava's avatar Fabian Tërnava
Browse files

add debug output to memory. should be reverted later on.

parent 053e2455
No related branches found
No related tags found
2 merge requests!475Improvement of Skill Memory and Skill Memory GUI,!474Draft: Improvement of Skill Memory and Skill Memory GUI
Pipeline #20868 passed
......@@ -115,8 +115,12 @@ namespace armarx
{
ARMARX_CHECK_NOT_NULL(instance);
skills::SkillExecutionRequest exInfo =
skillExecutionRequestCoreSegment.convertCommit(instance);
ARMARX_INFO << "Execute Skill from commit: " << exInfo.skillId.skillName;
SkillManagerComponentPluginUser::executeSkill(exInfo.toManagerIce(), current);
}
}
......@@ -141,6 +145,7 @@ namespace armarx
SkillsMemory::removeProvider(const skills::manager::dto::ProviderID& provider,
const Ice::Current& current)
{
ARMARX_INFO << "Remove provider from skill memory: " << provider.providerName;
executableSkillCoreSegment.removeSkillProvider(provider.providerName);
// remove skills from memory
......@@ -151,6 +156,8 @@ namespace armarx
SkillsMemory::executeSkill(const skills::manager::dto::SkillExecutionRequest& info,
const Ice::Current& current)
{
ARMARX_DEBUG << "executeSkill " << info.skillId.providerId.providerName << "::" << info.skillId.skillName;
auto e = skills::SkillExecutionRequest::FromIce(info);
skillExecutionRequestCoreSegment.addSkillExecutionRequest(e);
......@@ -161,10 +168,14 @@ namespace armarx
SkillsMemory::executeSkillAsync(const skills::manager::dto::SkillExecutionRequest& info,
const Ice::Current& current)
{
ARMARX_DEBUG << "executeSkillAsync " << info.skillId.providerId.providerName << "::" << info.skillId.skillName;
auto e = skills::SkillExecutionRequest::FromIce(info);
skillExecutionRequestCoreSegment.addSkillExecutionRequest(e);
return SkillManagerComponentPluginUser::executeSkillAsync(info, current);
auto ret = SkillManagerComponentPluginUser::executeSkillAsync(info, current);
ARMARX_DEBUG << "END executeSkillAsync ";
return ret;
}
void
......@@ -172,33 +183,46 @@ namespace armarx
const skills::callback::dto::ProviderID& providerId,
const Ice::Current& current)
{
ARMARX_DEBUG << "updateStatusForSkill " << providerId.providerName;
auto p = skills::ProviderID::FromIce(providerId);
auto u = skills::SkillStatusUpdate::FromIce(update, p);
skillEventCoreSegment.addSkillUpdateEvent(u);
ARMARX_DEBUG << "END updateStatusForSkill " << providerId.providerName;
}
IceUtil::Optional<skills::manager::dto::SkillStatusUpdate>
SkillsMemory::getSkillExecutionStatus(const skills::manager::dto::SkillExecutionID& executionId,
const Ice::Current& current)
{
ARMARX_DEBUG << "getSkillExecutionStatus ";
auto eid = skills::SkillExecutionID::FromIce(executionId);
auto op = this->skillEventCoreSegment.getSkillStatusUpdate(eid);
if (op.has_value())
{
ARMARX_DEBUG << "END getSkillExecutionStatus2";
return op->toManagerIce();
}
ARMARX_DEBUG << "END getSkillExecutionStatus ";
return {};
}
skills::manager::dto::SkillStatusUpdateMap
SkillsMemory::getSkillExecutionStatuses(const Ice::Current& current)
{
ARMARX_DEBUG << "getSkillExecutionStatuses ";
skills::manager::dto::SkillStatusUpdateMap ret;
auto updates = this->skillEventCoreSegment.getSkillStatusUpdates();
for (const auto& [k, v] : updates)
{
ret.insert({k.toManagerIce(), v.toManagerIce()});
}
ARMARX_DEBUG << "END getSkillExecutionStatuses ";
return ret;
}
......
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