avoid handling unsupported types
@@ -2896,15 +2896,20 @@ void OMF::setMapObjectTypes(const vector<Reading*>& readings,
++it)
{
string omfType;
+ string datapointName = (*it)->getName();
+
if (!isTypeSupported((*it)->getData()))
{
omfType = OMF_TYPE_UNSUPPORTED;
+
+ //# FIXME_I
+ Logger::getLogger()->setMinLevel("debug");
+ Logger::getLogger()->debug("xxx2 v2 - The type of the datapoint " + assetName + "/" + datapointName + " is unsupported, it will be ignored");
+ Logger::getLogger()->setMinLevel("warning");
}
else
{
omfType = omfTypes[((*it)->getData()).getType()];
- }
- string datapointName = (*it)->getName();
// if a OMF hint is applied the type may change
{
@@ -2967,6 +2972,7 @@ void OMF::setMapObjectTypes(const vector<Reading*>& readings,
}
}
}
+ }
// Loop now only the elements found in the per asset types map
for (auto it = readingAllDataPoints.begin();
@@ -2997,9 +3003,15 @@ void OMF::setMapObjectTypes(const vector<Reading*>& readings,
}
else if ((*dp).second.compare(OMF_TYPE_UNSUPPORTED) == 0)
{
- std::vector<double> vData = {0};
- DatapointValue vArray(vData);
- values.push_back(new Datapoint((*dp).first, vArray));
+ //# FIXME_I
+ Logger::getLogger()->setMinLevel("debug");
+ Logger::getLogger()->debug("xxx3 v3 - Asset '" + assetName + " has unsupported type, those datapoint will be ignored");
+ Logger::getLogger()->setMinLevel("warning");
+
+ // FIXME_I:
+// std::vector<double> vData = {0};
+// DatapointValue vArray(vData);
+// values.push_back(new Datapoint((*dp).first, vArray));
}
}
