43 if (!value || !value->getInitialized())
47 bool recalculate =
false;
53 if (
dataHistory.size() >= (
unsigned)windowFilterSize)
63 filteredValue = calculate();
83 auto types = getSupportedTypes();
85 if (std::find(types.begin(), types.end(), variantType) != types.end())
95 armarx::StringFloatDictionary
98 return StringFloatDictionary{{
"windowFilterSize", windowFilterSize},
99 {
"minSampleTimeDelta", minSampleTimeDelta}};
106 auto it = newValues.find(
"windowFilterSize");
107 if (it != newValues.end())
109 windowFilterSize = it->second;
111 it = newValues.find(
"minSampleTimeDelta");
112 if (it != newValues.end())
114 minSampleTimeDelta = it->second;
The DatafieldFilter class is the base class for all filters and filter implementation should derive f...
void update(Ice::Long timestamp, const VariantBasePtr &value, const Ice::Current &c=Ice::emptyCurrent) override
Adds the given value to the data map, erases old values if maximum size was reached,...
const TimeVariantBaseMap & getDataHistory() const
VariantBasePtr getValue(const Ice::Current &c=Ice::emptyCurrent) const override
Retrieves the current, filtered value.
TimeVariantBaseMap dataHistory
armarx::StringFloatDictionary getProperties(const Ice::Current &c=Ice::emptyCurrent) const override
void setProperties(const armarx::StringFloatDictionary &newValues, const Ice::Current &c=Ice::emptyCurrent) override
bool checkTypeSupport(VariantTypeId variantType, const Ice::Current &c=Ice::emptyCurrent) const override
Checks whether the given type is supported.
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::deque< std::pair< long, VariantBasePtr > > TimeVariantBaseMap
::IceInternal::Handle<::armarx::VariantBase > VariantBasePtr