Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 3 | #include "interfaces/json_storage.hpp" |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 4 | #include "interfaces/report.hpp" |
| 5 | #include "interfaces/report_manager.hpp" |
Krzysztof Grobelny | 753e4b3 | 2021-02-11 12:58:58 +0000 | [diff] [blame^] | 6 | #include "types/types.hpp" |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 7 | |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 8 | #include <boost/asio/spawn.hpp> |
| 9 | |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 10 | #include <chrono> |
| 11 | #include <memory> |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 12 | #include <optional> |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 13 | |
| 14 | namespace interfaces |
| 15 | { |
| 16 | |
| 17 | class ReportFactory |
| 18 | { |
| 19 | public: |
| 20 | virtual ~ReportFactory() = default; |
| 21 | |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 22 | virtual std::unique_ptr<interfaces::Report> make( |
Krzysztof Grobelny | d223819 | 2020-12-02 09:27:28 +0000 | [diff] [blame] | 23 | boost::asio::yield_context& yield, const std::string& name, |
| 24 | const std::string& reportingType, bool emitsReadingsSignal, |
| 25 | bool logToMetricReportsCollection, std::chrono::milliseconds period, |
| 26 | const ReadingParameters& metricParams, ReportManager& reportManager, |
| 27 | JsonStorage& reportStorage) const = 0; |
| 28 | virtual std::unique_ptr<interfaces::Report> make( |
Wludzik, Jozef | e236279 | 2020-10-27 17:23:55 +0100 | [diff] [blame] | 29 | const std::string& name, const std::string& reportingType, |
| 30 | bool emitsReadingsSignal, bool logToMetricReportsCollection, |
| 31 | std::chrono::milliseconds period, const ReadingParameters& metricParams, |
Krzysztof Grobelny | d223819 | 2020-12-02 09:27:28 +0000 | [diff] [blame] | 32 | ReportManager& reportManager, JsonStorage& reportStorage, |
| 33 | std::vector<LabeledMetricParameters> labeledMetricParams) const = 0; |
Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame] | 34 | }; |
| 35 | |
| 36 | } // namespace interfaces |