EntityInstanceMetadata Struct Reference

Metadata of an entity instance. More...

#include <RobotAPI/libraries/armem/core/base/EntityInstanceBase.h>

Public Member Functions

void access () const
 Called whenever the entity instance this metadata belongs to is accessed (e.g. queried).
 
Time lastAccessedTime () const
 
bool operator!= (const EntityInstanceMetadata &other) const
 
bool operator== (const EntityInstanceMetadata &other) const
 
void setLastAccessedTime (const Time &time) const
 
virtual ~EntityInstanceMetadata ()=default
 

Public Attributes

Time arrivedTime = Time::Invalid()
 Time when this value has arrived at the memory.
 
float confidence = 1.0
 An optional confidence, may be used for things like decay.
 
RelaxedAtomic< std::int64_t > lastAccessedTimeMicroSeconds
 An optional value indicating the time of last access, in microseconds since the epoch.
 
RelaxedAtomic< unsigned long > numAccessed {0}
 A counter how often the instance has been accessed.
 
std::string origin = "undefinied"
 Indicates the source of the instance e.g. from a specific LTM.
 
Time referencedTime = Time::Invalid()
 Time this instance refers to.
 
Time sentTime = Time::Invalid()
 Time when this value was sent to the memory.
 

Detailed Description

Metadata of an entity instance.

Constructor & Destructor Documentation

◆ ~EntityInstanceMetadata()

virtual ~EntityInstanceMetadata ( )
virtualdefault

Member Function Documentation

◆ access()

void access ( ) const

Called whenever the entity instance this metadata belongs to is accessed (e.g. queried).

◆ lastAccessedTime()

Time lastAccessedTime ( ) const
inline

◆ operator!=()

bool operator!= ( const EntityInstanceMetadata & other) const
inline

◆ operator==()

bool operator== ( const EntityInstanceMetadata & other) const

◆ setLastAccessedTime()

void setLastAccessedTime ( const Time & time) const
inline

Member Data Documentation

◆ arrivedTime

Time arrivedTime = Time::Invalid()

Time when this value has arrived at the memory.

◆ confidence

float confidence = 1.0

An optional confidence, may be used for things like decay.

◆ lastAccessedTimeMicroSeconds

RelaxedAtomic<std::int64_t> lastAccessedTimeMicroSeconds
Initial value:
{
Time::Invalid().toDurationSinceEpoch().toMicroSeconds()}
static DateTime Invalid()
Definition DateTime.cpp:57

An optional value indicating the time of last access, in microseconds since the epoch.

Stored as an integer rather than a Time because Time holds a std::string, and two query threads assigning one concurrently is a use-after-free waiting to happen. Use lastAccessedTime().

◆ numAccessed

RelaxedAtomic<unsigned long> numAccessed {0}

A counter how often the instance has been accessed.

◆ origin

std::string origin = "undefinied"

Indicates the source of the instance e.g. from a specific LTM.

◆ referencedTime

Time referencedTime = Time::Invalid()

Time this instance refers to.

For example, the physical time point when an image was captured. If the image is processed, the result should have the same referencedTime as the image.

◆ sentTime

Time sentTime = Time::Invalid()

Time when this value was sent to the memory.


The documentation for this struct was generated from the following files: