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

Add Commit and EntityUpdate

parent 535814c8
No related branches found
No related tags found
1 merge request!89Implement core data structure of ArMem Memories
......@@ -15,6 +15,8 @@ set(LIB_FILES
core/MemoryID.cpp
core/Time.cpp
client/Commit.cpp
segments/CoreSegment.cpp
segments/Entity.cpp
segments/EntityData.cpp
......@@ -27,6 +29,8 @@ set(LIB_HEADERS
core/MemoryID.h
core/Time.h
client/Commit.h
segments/CoreSegment.h
segments/Entity.h
segments/EntityData.h
......
#include "Commit.h"
namespace armarx::armem
{
}
#pragma once
#include <vector>
#include <RobotAPI/interface/aron.h>
#include "../core/MemoryID.h"
#include "../core/Time.h"
namespace armarx::armem
{
/**
* @brief An update of an entity for a specific point in time.
*/
struct EntityUpdate
{
/// The entity's ID.
MemoryID entityID;
/// The entity data.
aron::AronDataPtr data;
/**
* @brief Time when this entity update was created (e.g. time of image recording).
* This is the key of the entity's history.
*/
Time timeCreated = Time::microSeconds(-1);
// OPTIONAL
/// An optional importance, may be used for decay.
float importance = 1.0;
// OPTIONAL
/**
* @brief Time when this update was sent to the memory.
*
* Set automatically when sending the commit.
*/
Time timeSent = Time::microSeconds(-1);
};
/**
* @brief An update sent to the memory.
*/
struct Commit
{
/**
* @brief The entity updates.
*
* May contain updates of multiple entities at different
* points in time.
*/
std::vector<EntityUpdate> updates;
};
}
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