Wludzik, Jozef | 2f9f9b8 | 2020-10-13 09:07:45 +0200 | [diff] [blame^] | 1 | #include "report_factory.hpp" |
| 2 | |
| 3 | #include "report.hpp" |
| 4 | |
| 5 | ReportFactory::ReportFactory( |
| 6 | boost::asio::io_context& ioc, |
| 7 | const std::shared_ptr<sdbusplus::asio::object_server>& objServer) : |
| 8 | ioc(ioc), |
| 9 | objServer(objServer) |
| 10 | {} |
| 11 | |
| 12 | std::unique_ptr<interfaces::Report> ReportFactory::make( |
| 13 | const std::string& name, const std::string& reportingType, |
| 14 | bool emitsReadingsSignal, bool logToMetricReportsCollection, |
| 15 | std::chrono::milliseconds period, const ReadingParameters& metricParams, |
| 16 | interfaces::ReportManager& reportManager) const |
| 17 | { |
| 18 | return std::make_unique<Report>( |
| 19 | ioc, objServer, name, reportingType, emitsReadingsSignal, |
| 20 | logToMetricReportsCollection, period, metricParams, reportManager); |
| 21 | } |