diff --git a/source/RobotAPI/libraries/armem/client/MemoryConnector.cpp b/source/RobotAPI/libraries/armem/client/MemoryConnector.cpp deleted file mode 100644 index 4fadf6f65ebb0ade9b91d49d36860bf6e9b0ff64..0000000000000000000000000000000000000000 --- a/source/RobotAPI/libraries/armem/client/MemoryConnector.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include "MemoryConnector.h" - -#include <ArmarXCore/core/ManagedIceObject.h> - -#include <ArmarXCore/core/application/properties/PropertyDefinitionContainer.h> -#include <ArmarXCore/core/exceptions/local/ExpressionException.h> - -namespace armarx::armem -{ - - MemoryConnector::MemoryConnector(ManagedIceObject& component) : component(component) {} - - MemoryConnector::~MemoryConnector() = default; - - void MemoryConnector::registerPropertyDefinitions(PropertyDefinitionsPtr& def) - { - const std::string prefix = getPropertyPrefix(); - - ARMARX_INFO << "Memory connector: registerPropertyDefinitions with prefix " << prefix; - - - def->component(memoryNameSystem, "ArMemMemoryNameSystem", prefix + "ArMemMemoryNameSystem"); - } - - armem::data::WaitForMemoryResult MemoryConnector::useMemory(const std::string& memoryName) - { - armem::data::WaitForMemoryInput input; - input.name = memoryName; - - ARMARX_CHECK_NOT_NULL(memoryNameSystem); - - ARMARX_INFO << "Waiting for memory ..."; - armem::data::WaitForMemoryResult result = memoryNameSystem->waitForMemory(input); - - if (result.success) - { - // Add dependency. - component.usingProxy(result.proxy->ice_getIdentity().name); - } - else - { - ARMARX_WARNING << "Use memory: Failure"; - } - return result; - } - - const std::string& MemoryConnector::getPropertyPrefix() const - { - return propertyPrefix; - } - - -} // namespace armarx::armem diff --git a/source/RobotAPI/libraries/armem/client/MemoryConnector.h b/source/RobotAPI/libraries/armem/client/MemoryConnector.h deleted file mode 100644 index d3a9f288da15cefb71eb8bf5ecabf9bf7e250c4b..0000000000000000000000000000000000000000 --- a/source/RobotAPI/libraries/armem/client/MemoryConnector.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This file is part of ArmarX. - * - * ArmarX is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * ArmarX is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * - * @package RobotAPI::ArmarXObjects:: - * @author Fabian Reister ( fabian dot reister at kit dot edu ) - * @date 2021 - * @copyright http://www.gnu.org/licenses/gpl-2.0.txt - * GNU General Public License - */ - -#pragma once - - -// TODO(fabian.reister): remove -#include <ArmarXCore/core/application/properties/PropertyDefinitionContainer.h> - -#include <RobotAPI/interface/armem/mns/MemoryNameSystemInterface.h> - -namespace armarx -{ - class ManagedIceObject; -} - -namespace armarx::armem -{ - - /** - * @brief The MemoryConnector class simplifies connecting to the ArMem memory. - * - * Use this as the base class of any class that needs to connect to the memory. - * - * - */ - class MemoryConnector - { - - public: - MemoryConnector(ManagedIceObject& component); - virtual ~MemoryConnector(); - - protected: - armem::data::WaitForMemoryResult useMemory(const std::string& memoryName); - void registerPropertyDefinitions(PropertyDefinitionsPtr& def); - - void waitForMemory(); - - virtual const std::string& getPropertyPrefix() const; - - private: - ManagedIceObject& component; - - armem::mns::MemoryNameSystemInterfacePrx memoryNameSystem; - - const std::string propertyPrefix; - }; - -} // namespace armarx::armem \ No newline at end of file