Initial implementation of Telemetry service
Implemented main application of Telemetry service.
Added ReportManager interface. Added MaxReports and
PollRateResolution properties to ReportManager interface.
Implemented simple logger.
Tested:
- Built without Yocto and ran on x86 platform with success
- Added telemetry to romulus image using
recipe-phosphor/telemetry from meta-phosphor repository
- Started as service in romulus image in QEMU with success
- Verified that all added properties are present in dbus
Change-Id: I26af7a19b1f9cac32e9e9da65523d72a36e13855
Signed-off-by: Wludzik, Jozef <jozef.wludzik@intel.com>
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
diff --git a/src/telemetry.hpp b/src/telemetry.hpp
new file mode 100644
index 0000000..0edcd2d
--- /dev/null
+++ b/src/telemetry.hpp
@@ -0,0 +1,21 @@
+#pragma once
+
+#include "report_manager.hpp"
+
+#include <sdbusplus/asio/connection.hpp>
+#include <sdbusplus/asio/object_server.hpp>
+
+#include <memory>
+
+class Telemetry
+{
+ public:
+ Telemetry(std::shared_ptr<sdbusplus::asio::connection> bus) :
+ objServer(std::make_shared<sdbusplus::asio::object_server>(bus)),
+ reportManager(objServer)
+ {}
+
+ private:
+ std::shared_ptr<sdbusplus::asio::object_server> objServer;
+ ReportManager reportManager;
+};