Adding time point recording.

This commit is contained in:
stephb9959
2022-03-22 21:17:43 -07:00
parent 9e74d2a12c
commit 87bb89b472
4 changed files with 83 additions and 35 deletions

View File

@@ -34,6 +34,15 @@ namespace OpenWifi {
AnalyticsObjects::DeviceTimePointList Points;
StorageService()->TimePointsDB().SelectRecords(fromDate, endDate, maxRecords, Points.points);
// sort by timestamp & serial number.
std::sort( Points.points.begin(), Points.points.end());
// your first point's serial number is your separator. So you need to slice the points array
// into timestamp slots
Poco::JSON::Object Answer;
Points.to_json(Answer);
return ReturnObject(Answer);