Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lennard Hofmann
RobotAPI
Commits
b21f4f09
Commit
b21f4f09
authored
1 year ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Add docs
parent
feddecf1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/RobotAPI/libraries/armem/core/wm/memory_definitions.cpp
+10
-12
10 additions, 12 deletions
...e/RobotAPI/libraries/armem/core/wm/memory_definitions.cpp
source/RobotAPI/libraries/armem/core/wm/memory_definitions.h
+48
-47
48 additions, 47 deletions
source/RobotAPI/libraries/armem/core/wm/memory_definitions.h
with
58 additions
and
59 deletions
source/RobotAPI/libraries/armem/core/wm/memory_definitions.cpp
+
10
−
12
View file @
b21f4f09
#include
"memory_definitions.h"
#include
"error.h"
#include
<RobotAPI/libraries/aron/core/data/variant/container/Dict.h>
#include
<ArmarXCore/core/exceptions/local/ExpressionException.h>
#include
<map>
#include
<vector>
#include
<ArmarXCore/core/exceptions/local/ExpressionException.h>
#include
<RobotAPI/libraries/aron/core/data/variant/container/Dict.h>
#include
"error.h"
namespace
armarx
::
armem
::
wm
{
bool
EntityInstance
::
equalsDeep
(
const
EntityInstance
&
other
)
const
bool
EntityInstance
::
equalsDeep
(
const
EntityInstance
&
other
)
const
{
if
(
_data
and
other
.
data
())
{
return
id
()
==
other
.
id
()
&&
_metadata
==
other
.
metadata
()
&&
*
_data
==
*
other
.
data
();
return
id
()
==
other
.
id
()
&&
_metadata
==
other
.
metadata
()
&&
*
_data
==
*
other
.
data
();
}
if
(
_data
or
other
.
data
())
{
...
...
@@ -28,8 +26,8 @@ namespace armarx::armem::wm
return
id
()
==
other
.
id
()
&&
_metadata
==
other
.
metadata
();
}
void
EntityInstance
::
update
(
const
EntityUpdate
&
update
)
void
EntityInstance
::
update
(
const
EntityUpdate
&
update
)
{
ARMARX_CHECK_FITS_SIZE
(
this
->
index
(),
update
.
instancesData
.
size
());
...
...
@@ -42,4 +40,4 @@ namespace armarx::armem::wm
this
->
_metadata
.
arrivedTime
=
update
.
arrivedTime
;
}
}
}
// namespace armarx::armem::wm
This diff is collapsed.
Click to expand it.
source/RobotAPI/libraries/armem/core/wm/memory_definitions.h
+
48
−
47
View file @
b21f4f09
#pragma once
#include
"detail/data_lookup_mixins
.h
"
#include
<RobotAPI/libraries/armem/core/base/CoreSegmentBase
.h
>
#include
<RobotAPI/libraries/armem/core/base/EntityBase.h>
#include
<RobotAPI/libraries/armem/core/base/EntityInstanceBase.h>
#include
<RobotAPI/libraries/armem/core/base/EntitySnapshotBase.h>
#include
<RobotAPI/libraries/armem/core/base/EntityBase.h>
#include
<RobotAPI/libraries/armem/core/base/ProviderSegmentBase.h>
#include
<RobotAPI/libraries/armem/core/base/CoreSegmentBase.h>
#include
<RobotAPI/libraries/armem/core/base/MemoryBase.h>
#include
<RobotAPI/libraries/armem/core/base/ProviderSegmentBase.h>
#include
<RobotAPI/libraries/aron/core/data/variant/forward_declarations.h>
#include
"detail/data_lookup_mixins.h"
namespace
armarx
::
armem
::
wm
{
/**
* @brief Client-side working memory entity instance metadata.
*/
using
EntityInstanceMetadata
=
base
::
EntityInstanceMetadata
;
/**
* @brief Client-side working memory entity instance data (payload).
*/
using
EntityInstanceData
=
armarx
::
aron
::
data
::
Dict
;
/**
* @brief Pointer type of EntityInstanceData.
*/
using
EntityInstanceDataPtr
=
armarx
::
aron
::
data
::
DictPtr
;
/// @see base::EntityInstanceBase
/**
* @brief Client-side working entity instance.
* @see base::EntityInstanceBase
*/
class
EntityInstance
:
public
base
::
EntityInstanceBase
<
EntityInstanceDataPtr
,
EntityInstanceMetadata
>
{
using
Base
=
base
::
EntityInstanceBase
<
EntityInstanceDataPtr
,
EntityInstanceMetadata
>
;
public:
using
Base
::
EntityInstanceBase
;
/**
* @brief Fill `*this` with the update's values.
* @param update The update.
...
...
@@ -38,78 +45,72 @@ namespace armarx::armem::wm
void
update
(
const
EntityUpdate
&
update
);
bool
equalsDeep
(
const
EntityInstance
&
other
)
const
;
};
/// @see base::EntitySnapshotBase
/**
* @brief Client-side working memory entity snapshot.
* @see base::EntitySnapshotBase
*/
class
EntitySnapshot
:
public
base
::
EntitySnapshotBase
<
EntityInstance
,
EntitySnapshot
>
,
public
detail
::
FindInstanceDataMixinForSnapshot
<
EntitySnapshot
>
public
base
::
EntitySnapshotBase
<
EntityInstance
,
EntitySnapshot
>
,
public
detail
::
FindInstanceDataMixinForSnapshot
<
EntitySnapshot
>
{
public:
using
base
::
EntitySnapshotBase
<
EntityInstance
,
EntitySnapshot
>::
EntitySnapshotBase
;
};
/// @see base::EntityBase
/**
* @brief Client-side working memory entity.
* @see base::EntityBase
*/
class
Entity
:
public
base
::
EntityBase
<
EntitySnapshot
,
Entity
>
,
public
detail
::
FindInstanceDataMixinForEntity
<
Entity
>
public
base
::
EntityBase
<
EntitySnapshot
,
Entity
>
,
public
detail
::
FindInstanceDataMixinForEntity
<
Entity
>
{
public:
using
base
::
EntityBase
<
EntitySnapshot
,
Entity
>::
EntityBase
;
};
/// @see base::ProviderSegmentBase
/**
* @brief Client-side working memory provider segment.
* @see base::ProviderSegmentBase
*/
class
ProviderSegment
:
public
base
::
ProviderSegmentBase
<
Entity
,
ProviderSegment
>
,
public
detail
::
FindInstanceDataMixin
<
ProviderSegment
>
public
base
::
ProviderSegmentBase
<
Entity
,
ProviderSegment
>
,
public
detail
::
FindInstanceDataMixin
<
ProviderSegment
>
{
using
Base
=
base
::
ProviderSegmentBase
<
Entity
,
ProviderSegment
>
;
public:
using
Base
::
ProviderSegmentBase
;
};
/// @see base::CoreSegmentBase
/**
* @brief Client-side working memory core segment.
* @see base::CoreSegmentBase
*/
class
CoreSegment
:
public
base
::
CoreSegmentBase
<
ProviderSegment
,
CoreSegment
>
,
public
detail
::
FindInstanceDataMixin
<
CoreSegment
>
public
base
::
CoreSegmentBase
<
ProviderSegment
,
CoreSegment
>
,
public
detail
::
FindInstanceDataMixin
<
CoreSegment
>
{
using
Base
=
base
::
CoreSegmentBase
<
ProviderSegment
,
CoreSegment
>
;
public:
using
Base
::
CoreSegmentBase
;
};
/// @see base::MemoryBase
/**
* @brief Client-side working memory.
* @see base::MemoryBase
*/
class
Memory
:
public
base
::
MemoryBase
<
CoreSegment
,
Memory
>
,
public
detail
::
FindInstanceDataMixin
<
Memory
>
public
base
::
MemoryBase
<
CoreSegment
,
Memory
>
,
public
detail
::
FindInstanceDataMixin
<
Memory
>
{
using
Base
=
base
::
MemoryBase
<
CoreSegment
,
Memory
>
;
public:
using
Base
::
MemoryBase
;
};
}
}
// namespace armarx::armem::wm
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment