EntityInstanceBase.cpp
Go to the documentation of this file.
2
4{
5 void
11
12 bool
14 {
15 return referencedTime == other.referencedTime && sentTime == other.sentTime &&
16 arrivedTime == other.arrivedTime && std::abs(confidence - other.confidence) < 1e-6f;
17 }
18} // namespace armarx::armem::base
19
20std::ostream&
22{
23 os << "EntityInstanceMetadata: "
24 << "\n - t_referenced = \t" << armem::toStringMicroSeconds(d.referencedTime) << " us"
25 << "\n - t_sent = \t" << armem::toStringMicroSeconds(d.sentTime) << " us"
26 << "\n - t_arrived = \t" << armem::toStringMicroSeconds(d.arrivedTime) << " us"
27 << "\n - t_accessed = \t" << armem::toStringMicroSeconds(d.lastAccessedTime) << " us ("
28 << d.numAccessed << ")"
29 << "\n - confidence = \t" << d.confidence << " us"
30 << "\n - origin = \t" << d.origin;
31 return os;
32}
static DateTime Now()
Definition DateTime.cpp:51
std::ostream & operator<<(std::ostream &os, const EntityInstanceMetadata &rhs)
std::string toStringMicroSeconds(const Time &time)
Returns time as e.g.
Definition Time.cpp:26
float confidence
An optional confidence, may be used for things like decay.
Time lastAccessedTime
An optional value indicating the time of last access.
unsigned long numAccessed
A counter how often the instance has been accessed.
Time arrivedTime
Time when this value has arrived at the memory.
Time referencedTime
Time this instance refers to.
void access() const
Called whenever the entity instance this metadata belongs to is accessed (e.g. queried).
std::string origin
Indicates the source of the instance e.g. from a specific LTM.
bool operator==(const EntityInstanceMetadata &other) const
Time sentTime
Time when this value was sent to the memory.