2023-12-02 02:55:26 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <solanaceae/message3/registry_message_model.hpp>
|
2024-02-04 15:12:03 +01:00
|
|
|
#include <solanaceae/util/config_model.hpp>
|
2023-12-02 02:55:26 +01:00
|
|
|
|
|
|
|
class MessageCleanser {
|
|
|
|
Contact3Registry& _cr;
|
2024-10-06 11:51:02 +02:00
|
|
|
RegistryMessageModelI& _rmm;
|
2024-02-04 15:12:03 +01:00
|
|
|
ConfigModelI& _conf;
|
|
|
|
|
|
|
|
static constexpr int64_t _old_age_default{150}; // minutes
|
2023-12-02 02:55:26 +01:00
|
|
|
|
|
|
|
float _interval{3.f*60.f}; // every 3min
|
|
|
|
float _timer{0.f};
|
|
|
|
|
|
|
|
public:
|
2024-02-04 15:12:03 +01:00
|
|
|
MessageCleanser(
|
|
|
|
Contact3Registry& cr,
|
2024-10-06 11:51:02 +02:00
|
|
|
RegistryMessageModelI& rmm,
|
2024-02-04 15:12:03 +01:00
|
|
|
ConfigModelI& conf
|
|
|
|
);
|
2023-12-02 02:55:26 +01:00
|
|
|
~MessageCleanser(void);
|
|
|
|
|
2024-02-04 13:50:44 +01:00
|
|
|
float iterate(float time_delta);
|
2023-12-02 02:55:26 +01:00
|
|
|
};
|