Skip to content
Snippets Groups Projects
Commit d18c1253 authored by Fabian Reister's avatar Fabian Reister
Browse files

armem_objects/client/articulated_object: sync: returing bool instead of void

parent e21049c2
No related branches found
No related tags found
No related merge requests found
...@@ -146,7 +146,7 @@ namespace armarx::armem::articulated_object ...@@ -146,7 +146,7 @@ namespace armarx::armem::articulated_object
return obj; return obj;
} }
void bool
Reader::synchronize(ArticulatedObject& obj, const armem::Time& timestamp) Reader::synchronize(ArticulatedObject& obj, const armem::Time& timestamp)
{ {
ARMARX_CHECK_NOT_EMPTY(obj.instance) << "An instance name must be provided!"; ARMARX_CHECK_NOT_EMPTY(obj.instance) << "An instance name must be provided!";
...@@ -156,10 +156,11 @@ namespace armarx::armem::articulated_object ...@@ -156,10 +156,11 @@ namespace armarx::armem::articulated_object
if (not state) /* c++20 [[unlikely]] */ if (not state) /* c++20 [[unlikely]] */
{ {
ARMARX_WARNING << "Could not synchronize object " << obj.instance; ARMARX_WARNING << "Could not synchronize object " << obj.instance;
return; return false;
} }
obj.config = std::move(*state); obj.config = std::move(*state);
return true;
} }
std::vector<robot::RobotDescription> std::vector<robot::RobotDescription>
......
...@@ -45,7 +45,7 @@ namespace armarx::armem::articulated_object ...@@ -45,7 +45,7 @@ namespace armarx::armem::articulated_object
void registerPropertyDefinitions(armarx::PropertyDefinitionsPtr& def); void registerPropertyDefinitions(armarx::PropertyDefinitionsPtr& def);
void connect(); void connect();
void synchronize(ArticulatedObject& obj, const armem::Time& timestamp) override; bool synchronize(ArticulatedObject& obj, const armem::Time& timestamp) override;
std::optional<ArticulatedObject> get(const std::string& name, std::optional<ArticulatedObject> get(const std::string& name,
const armem::Time& timestamp) override; const armem::Time& timestamp) override;
......
...@@ -11,7 +11,7 @@ namespace armarx::armem::articulated_object ...@@ -11,7 +11,7 @@ namespace armarx::armem::articulated_object
public: public:
virtual ~ReaderInterface() = default; virtual ~ReaderInterface() = default;
virtual void synchronize(ArticulatedObject& obj, const armem::Time& timestamp) = 0; virtual bool synchronize(ArticulatedObject& obj, const armem::Time& timestamp) = 0;
virtual ArticulatedObject get(const ArticulatedObjectDescription& description, const armem::Time& timestamp, const std::string& instanceName) = 0; virtual ArticulatedObject get(const ArticulatedObjectDescription& description, const armem::Time& timestamp, const std::string& instanceName) = 0;
virtual std::optional<ArticulatedObject> get(const std::string& name, const armem::Time& timestamp) = 0; virtual std::optional<ArticulatedObject> get(const std::string& name, const armem::Time& timestamp) = 0;
......
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