blob: 182973d08c5640f33b58ad261608928c882adbb2 [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
Krzysztof Grobelnyd2238192020-12-02 09:27:28 +000026 virtual std::unique_ptr<interfaces::Report> make(
Wludzik, Jozefe2362792020-10-27 17:23:55 +010027 const std::string& name, const std::string& reportingType,
28 bool emitsReadingsSignal, bool logToMetricReportsCollection,
Krzysztof Grobelnydcc4e192021-03-08 09:09:34 +000029 Milliseconds period, ReportManager& reportManager,
30 JsonStorage& reportStorage,
Krzysztof Grobelnyd2238192020-12-02 09:27:28 +000031 std::vector<LabeledMetricParameters> labeledMetricParams) const = 0;
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +020032};
33
34} // namespace interfaces