blob: 9f51db5beddfccf0b6e5d523b6095b414ba00c09 [file] [log] [blame]
Wludzik, Jozef2f9f9b82020-10-13 09:07:45 +02001#include "report_factory.hpp"
2
3#include "report.hpp"
4
5ReportFactory::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
12std::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}