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

added SpecializedSKillProxy that takes a ParamType

parent c3c6fdc9
No related branches found
No related tags found
1 merge request!388Refactor skills framework
......@@ -29,7 +29,7 @@ namespace armarx
// Utiliy methods
aron::data::DictPtr getDefaultParameters(const std::string& profileName = "root");
private:
protected:
manager::dti::SkillManagerInterfacePrx manager;
SkillDescription skillDescription;
};
......
#include "SkillProxy.h"
namespace armarx
{
namespace skills
{
} // namespace skills
} // namespace armarx
#pragma once
#include "SkillProxy.h"
namespace armarx
{
namespace skills
{
template <class AronT>
class SpecializedSkillProxy : public SkillProxy
{
public:
using SkillProxy::SkillProxy;
// Provide a similar API as the skillprovider
TerminatedSkillStatusUpdate
executeSkill(const std::string& executorName, const AronT& params)
{
return SkillProxy::executeSkill(executorName, params.toAron());
}
SkillExecutionID
executeSkillAsync(const std::string& executorName, const AronT& params = nullptr)
{
return SkillProxy::executeSkillAsync(executorName, params.toAron());
}
// Utiliy methods
AronT
getDefaultParameters(const std::string& profileName = "root")
{
auto dict = SkillProxy::getDefaultParameters(profileName);
if (dict)
{
return AronT::FromAron(dict);
}
return {};
}
};
} // namespace skills
} // namespace armarx
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