blob: 970dd0169aac32170ddd0d5d4ef09e03d7d2cbe3 [file] [log] [blame]
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +02001#pragma once
2
Wludzik, Jozefe2362792020-10-27 17:23:55 +01003#include "interfaces/json_storage.hpp"
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +02004#include "interfaces/report.hpp"
5#include "interfaces/report_manager.hpp"
Krzysztof Grobelnydcc4e192021-03-08 09:09:34 +00006#include "types/report_types.hpp"
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +02007
Wludzik, Jozefe2362792020-10-27 17:23:55 +01008#include <boost/asio/spawn.hpp>
9
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020010#include <chrono>
11#include <memory>
Wludzik, Jozefe2362792020-10-27 17:23:55 +010012#include <optional>
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020013
14namespace interfaces
15{
16
17class ReportFactory
18{
19 public:
20 virtual ~ReportFactory() = default;
21
Krzysztof Grobelnydcc4e192021-03-08 09:09:34 +000022 virtual std::vector<LabeledMetricParameters>
23 convertMetricParams(boost::asio::yield_context& yield,
24 const ReadingParameters& metricParams) const = 0;
25
Lukasz Kazmierczak7e098e92021-09-16 15:59:56 +020026 virtual std::unique_ptr<interfaces::Report>
27 make(const std::string& name, const std::string& reportingType,
28 bool emitsReadingsSignal, bool logToMetricReportsCollection,
29 Milliseconds period, ReportManager& reportManager,
30 JsonStorage& reportStorage,
31 std::vector<LabeledMetricParameters> labeledMetricParams,
32 bool enabled) const = 0;
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020033};
34
35} // namespace interfaces