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/report_manager.hpp b/src/report_manager.hpp
new file mode 100644
index 0000000..c01c34a
--- /dev/null
+++ b/src/report_manager.hpp
@@ -0,0 +1,25 @@
+#pragma once
+
+#include <sdbusplus/asio/object_server.hpp>
+
+#include <chrono>
+#include <memory>
+#include <vector>
+
+class ReportManager
+{
+ public:
+ ReportManager(
+ const std::shared_ptr<sdbusplus::asio::object_server>& objServer);
+ ~ReportManager();
+
+ ReportManager(const ReportManager&) = delete;
+ ReportManager& operator=(const ReportManager&) = delete;
+
+ private:
+ std::shared_ptr<sdbusplus::asio::object_server> objServer;
+ std::shared_ptr<sdbusplus::asio::dbus_interface> reportManagerIntf;
+
+ static constexpr uint32_t maxReports{20};
+ static constexpr std::chrono::milliseconds minInterval{1000};
+};