simplified appendLimit implementation

AppendLimit is now set to max value by default. This simplifies the code
while keeping most of the feature functionality. This change increases
report version and will cause older report to be deleted.

Tested:
- AppendLimit is set by default to max value
- Telemetry features are working as expected

Change-Id: I94c85393a9601c90c00776bf0bc814d85cbf006a
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
diff --git a/src/report.hpp b/src/report.hpp
index 856e369..d3c88ec 100644
--- a/src/report.hpp
+++ b/src/report.hpp
@@ -96,14 +96,11 @@
                                            Report& self);
     void scheduleTimerForPeriodicReport(Milliseconds interval);
     void scheduleTimerForOnChangeReport();
-    std::optional<uint64_t>
-        deduceAppendLimit(const uint64_t appendLimitIn) const;
     uint64_t deduceBufferSize(const ReportUpdates reportUpdatesIn,
                               const ReportingType reportingTypeIn) const;
     void setReadingBuffer(const ReportUpdates newReportUpdates);
     void setReportUpdates(const ReportUpdates newReportUpdates);
-    void updateSensorCount(const uint64_t newSensorCount);
-    static uint64_t getSensorCount(
+    static uint64_t getMetricCount(
         const std::vector<std::shared_ptr<interfaces::Metric>>& metrics);
     interfaces::JsonStorage::FilePath reportFileName() const;
     std::unordered_set<std::string>
@@ -123,8 +120,8 @@
     ReadingParametersPastVersion readingParametersPastVersion;
     ReadingParameters readingParameters;
     bool persistency = false;
-    uint64_t sensorCount;
-    std::optional<uint64_t> appendLimit;
+    uint64_t metricCount;
+    uint64_t appendLimit;
     ReportUpdates reportUpdates;
     Readings readings = {};
     CircularVector<ReadingData> readingsBuffer;
@@ -149,5 +146,5 @@
         "xyz.openbmc_project.Telemetry.Report";
     static constexpr const char* deleteIfaceName =
         "xyz.openbmc_project.Object.Delete";
-    static constexpr size_t reportVersion = 6;
+    static constexpr size_t reportVersion = 7;
 };