Go to the documentation of this file.
36 IceUtil::Shared(filter), DatafieldFilterBase(filter), dataHistory(filter.dataHistory)
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...
std::deque< std::pair< long, VariantBasePtr > > TimeVariantBaseMap
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,...
std::shared_ptr< Value > value()
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.
armarx::StringFloatDictionary getProperties(const Ice::Current &c=Ice::emptyCurrent) const override
VariantBasePtr getValue(const Ice::Current &c=Ice::emptyCurrent) const override
Retrieves the current, filtered value.
TimeVariantBaseMap dataHistory
constexpr std::size_t find(string_view str, char_type c) noexcept
const TimeVariantBaseMap & getDataHistory() const
This file offers overloads of toIce() and fromIce() functions for STL container types.