31 const std::string PredictionEntity::SNAPSHOT_ATTRIBUTE(
"memorySnapshot");
32 const std::string PredictionEntity::SOURCE_SNAPSHOT_ATTRIBUTE(
"sourceMemorySnapshot");
33 const std::string PredictionEntity::PREDICTION_ATTRIBUTE(
"predictedMemorySnapshot");
34 const std::string PredictionEntity::PREDICTION_LIST_ATTRIBUTE(
"predictedMemorySnapshotList");
35 const std::string PredictionEntity::PREDICTION_METHOD_NAME_ATTRIBUTE(
"predictionMethodName");
36 const std::string PredictionEntity::TASK_COUNT_ATTRIBUTE(
"taskCount");
37 const std::string PredictionEntity::PREDICTION_SCORE_ATTRIBUTE(
"predictionScore");
45 const EntityRefBasePtr& sourceMemorySnapshotRef,
46 const EntityRefBasePtr& predictedMemorySnapshotRef,
47 const EntityRefBaseList& predictedMemorySnapshotRefList,
48 const std::string& predictionMethodName,
50 Ice::Float predictionScore) :
65 ::
armarx::Serializable(source),
67 PredictionEntityBase(source),
89 PredictionEntity::output(std::ostream& stream)
const
131 const EntityRefBasePtr& sourceMemorySnapshotRef,
134 getAttribute(PredictionEntity::SOURCE_SNAPSHOT_ATTRIBUTE)
146 const EntityRefBasePtr& predictedMemorySnapshotRef,
156 EntityAttributeBasePtr attribute =
157 getAttribute(PredictionEntity::PREDICTION_LIST_ATTRIBUTE);
158 EntityRefBaseList entityList;
159 for (
int i = 0; i < attribute->size(); i++)
162 armarx::VariantPtr::dynamicCast(attribute->getValueAt(i));
163 entityList.push_back(attributeValue->get<
EntityRef>());
170 const EntityRefBaseList& predictedMemorySnapshotRefList,
173 EntityAttributeBasePtr attribute =
174 getAttribute(PredictionEntity::PREDICTION_LIST_ATTRIBUTE);
176 for (
const EntityRefBasePtr& entityRef : predictedMemorySnapshotRefList)
185 return getAttribute(PredictionEntity::PREDICTION_METHOD_NAME_ATTRIBUTE)
194 getAttribute(PredictionEntity::PREDICTION_METHOD_NAME_ATTRIBUTE)
214 return getAttributeValue(PredictionEntity::PREDICTION_SCORE_ATTRIBUTE)->getFloat();
220 getAttribute(PredictionEntity::PREDICTION_SCORE_ATTRIBUTE)
The Variant class is described here: Variants.
Attribute of MemoryX entities.
The EntityRef class is used to store references to Entities as values in other Entity instances.
EntityAttributeBasePtr getAttribute(const ::std::string &attrName, const ::Ice::Current &=Ice::emptyCurrent) const override
Retrieve attribute from entity.
Entity(const Entity &source)
virtual armarx::VariantPtr getAttributeValue(const ::std::string &attrName) const
Retrieve value of an attribute from entity.
std::mutex attributesMutex
std::recursive_mutex wrappersMutex
void output(std::ostream &stream) const
void putAttribute(const ::memoryx::EntityAttributeBasePtr &attr, const ::Ice::Current &=Ice::emptyCurrent) override
Store attribute in entity.
std::shared_mutex entityMutex
void initializeAttributes()
Ice::Int getTaskCount(const Ice::Current &c=Ice::emptyCurrent) const override
EntityRefBasePtr getSourceProfilerMemorySnapshotRef(const Ice::Current &c=Ice::emptyCurrent) const override
getSourceProfilerMemorySnapshotRef situation (memory snapshot) before the prediction
EntityRefBasePtr getPredictedProfilerMemorySnapshotRef(const Ice::Current &c=Ice::emptyCurrent) const override
getPredictedProfilerMemorySnapshotRef situation (memory snapshot) which was predicted on the basis of...
void setPredictionMethodName(const std::string &predictionMethodName, const Ice::Current &c=Ice::emptyCurrent) override
void setTaskCount(Ice::Int taskCount, const Ice::Current &c=Ice::emptyCurrent) override
void setPredictedProfilerMemorySnapshotRef(const EntityRefBasePtr &predictedMemorySnapshotRef, const Ice::Current &c=Ice::emptyCurrent) override
EntityRefBasePtr getProfilerMemorySnapshotRef(const Ice::Current &c=Ice::emptyCurrent) const override
getProfilerMemorySnapshotRef situation (memory snapshot) that actually occured (may differ from pedic...
void setPredictedProfilerMemorySnapshotRefList(const EntityRefBaseList &predictedMemorySnapshotRefList, const Ice::Current &c=Ice::emptyCurrent) override
void setPredictionScore(Ice::Float predictionScore, const Ice::Current &c=Ice::emptyCurrent) override
EntityRefBaseList getPredictedProfilerMemorySnapshotRefList(const Ice::Current &c=Ice::emptyCurrent) const override
~PredictionEntity() override
PredictionEntityPtr clone(const Ice::Current &c=Ice::emptyCurrent) const
Ice::ObjectPtr ice_clone() const override
std::string getPredictionMethodName(const Ice::Current &c=Ice::emptyCurrent) const override
void setProfilerMemorySnapshotRef(const EntityRefBasePtr &memorySnapshotRef, const Ice::Current &c=Ice::emptyCurrent) override
void setSourceProfilerMemorySnapshotRef(const EntityRefBasePtr &sourceMemorySnapshotRef, const Ice::Current &c=Ice::emptyCurrent) override
Ice::Float getPredictionScore(const Ice::Current &c=Ice::emptyCurrent) const override
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceInternal::Handle< Variant > VariantPtr
IceInternal::Handle< PredictionEntity > PredictionEntityPtr