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

Add and use constants for memory IDs

parent 2cc6f047
No related branches found
No related tags found
1 merge request!292Resolve "Add Index memory for listing/searching/filtering Spatial and Named entities"
......@@ -28,6 +28,7 @@
#include <RobotAPI/libraries/armem/server/wm/memory_definitions.h>
#include <RobotAPI/libraries/armem_index/aron/Named.aron.generated.h>
#include <RobotAPI/libraries/armem_index/aron/Spatial.aron.generated.h>
#include <RobotAPI/libraries/armem_index/memory_ids.h>
namespace armarx
......@@ -39,7 +40,7 @@ namespace armarx
armarx::PropertyDefinitionsPtr defs =
new ComponentPropertyDefinitions(getConfigIdentifier());
setMemoryName("Index");
setMemoryName(armem::index::memoryID.memoryName);
return defs;
}
......@@ -55,8 +56,10 @@ namespace armarx
void
IndexMemory::onInitComponent()
{
workingMemory().addCoreSegment("Named", armem::index::arondto::Named::ToAronType());
workingMemory().addCoreSegment("Spatial", armem::index::arondto::Spatial::ToAronType());
workingMemory().addCoreSegment(armem::index::namedSegmentID.coreSegmentName,
armem::index::arondto::Named::ToAronType());
workingMemory().addCoreSegment(armem::index::spatialSegmentID.coreSegmentName,
armem::index::arondto::Spatial::ToAronType());
}
......
......@@ -20,9 +20,11 @@ armarx_add_library(
aron_conversions.h
aron_forward_declarations.h
memory_ids.h
SOURCES
aron_conversions.cpp
memory_ids.cpp
ARON_FILES
aron/Named.xml
......
/*
* 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::armem_index
* @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
* @date 2022
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
* GNU General Public License
*/
#include "memory_ids.h"
namespace armarx::armem
{
const MemoryID index::memoryID { "RobotState" };
const MemoryID index::namedSegmentID { memoryID.withCoreSegmentName("Named") };
const MemoryID index::spatialSegmentID { memoryID.withCoreSegmentName("Spatial") };
}
/*
* 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::armem_index
* @author Rainer Kartmann ( rainer dot kartmann at kit dot edu )
* @date 2022
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
* GNU General Public License
*/
#pragma once
#include <RobotAPI/libraries/armem/core/MemoryID.h>
namespace armarx::armem::index
{
extern const MemoryID memoryID;
extern const MemoryID spatialSegmentID;
extern const MemoryID namedSegmentID;
} // namespace armarx::armem::objects
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