Showing the changes to Source/Libraries/TimeSeriesPlatformLibrary/Samples/SubscriberHandler.cpp (1 of 24 files). Show all
Unified · Split
| @@ -84,7 +84,7 @@ void SubscriberHandler::ErrorMessage(const string& message) · 83 unmodified lines | |||
| 84 | SubscriberInstance::ErrorMessage(status.str()); | 84 | SubscriberInstance::ErrorMessage(status.str()); |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | void SubscriberHandler::DataStartTime(time_t unixSOC, int milliseconds) | 87 | void SubscriberHandler::DataStartTime(time_t unixSOC, uint16_t milliseconds) |
| 88 | { | 88 | { |
| 89 | // TODO: This reports timestamp of very first received measurement (if useful) | 89 | // TODO: This reports timestamp of very first received measurement (if useful) |
| 90 | } | 90 | } |
| @@ -103,13 +103,14 @@ void SubscriberHandler::ParsedMetadata() · 12 unmodified lines | |||
| 103 | StatusMessage("Metadata successfully parsed."); | 103 | StatusMessage("Metadata successfully parsed."); |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | // ReSharper disable CppDeclaratorNeverUsed | ||
| 106 | void SubscriberHandler::ReceivedNewMeasurements(const vector<MeasurementPtr>& measurements) | 107 | void SubscriberHandler::ReceivedNewMeasurements(const vector<MeasurementPtr>& measurements) |
| 107 | { | 108 | { |
| 108 | // Start processing measurements | 109 | // Start processing measurements |
| 109 | for (auto &measurement : measurements) | 110 | for (auto &measurement : measurements) |
| 110 | { | 111 | { |
| 111 | time_t soc; | 112 | time_t soc; |
| 112 | int16_t milliseconds; | 113 | uint16_t milliseconds; |
| 113 | 114 | ||
| 114 | // Get adjusted value | 115 | // Get adjusted value |
| 115 | const float64_t value = measurement->AdjustedValue(); | 116 | const float64_t value = measurement->AdjustedValue(); |
| @@ -147,7 +148,7 @@ void SubscriberHandler::ReceivedNewMeasurements(const vector<MeasurementPtr>& me · 31 unmodified lines | |||
| 147 | 148 | ||
| 148 | // TODO: *** Temporary Testing Code Below *** -- REMOVE BEFORE USE | 149 | // TODO: *** Temporary Testing Code Below *** -- REMOVE BEFORE USE |
| 149 | const string TimestampFormat = "%Y-%m-%d %H:%M:%S.%f"; | 150 | const string TimestampFormat = "%Y-%m-%d %H:%M:%S.%f"; |
| 150 | const size_t MaxTimestampSize = 80; | 151 | const uint32_t MaxTimestampSize = 80; |
| 151 | 152 | ||
| 152 | static long processCount = 0; | 153 | static long processCount = 0; |
| 153 | static char timestamp[MaxTimestampSize]; | 154 | static char timestamp[MaxTimestampSize]; |