FrequencyFilter.h
Go to the documentation of this file.
1#pragma once
2
3// Base Class
4#include "../Filter.h"
5
7{
16
18 {
19 public:
20 static const constexpr char* NAME = "SnapshotFrequencyFilter";
21 static const constexpr char* PARAM_WAITING_TIME = "WaitingTimeInMsForFilter";
22
24
25 virtual bool accept(const armem::wm::EntitySnapshot& e, bool simulatedVersion) override;
26 void configure(const nlohmann::json& json) override;
27
29 std::string getName() override;
30
31 private:
32 void setNonCorruptedTimestampType(const armem::wm::EntitySnapshot& e);
33 int getNonCorruptedTimestamp(const armem::wm::EntityInstance& i, bool simulatedVersion);
34
35 std::map<MemoryID, std::int64_t> lastTimesPerEntity;
36 int maxDifference = 0;
37 bool corruptedWarningGiven = false;
38 TimestampType nonCorruptedType = TimestampType::NOT_SET;
39 };
40} // namespace armarx::armem::server::ltm::processor::filter
virtual bool accept(const armem::wm::EntitySnapshot &e, bool simulatedVersion) override
Client-side working entity instance.
Client-side working memory entity snapshot.