Showing the changes to Source/Libraries/TimeSeriesPlatformLibrary/Samples/SimpleSubscribe.cpp (1 of 7 files). Show all
Unified · Split
| @@ -35,7 +35,7 @@ namespace tst = gsfts::Transport; · 34 unmodified lines | |||
| 35 | tst::DataSubscriber Subscriber; | 35 | tst::DataSubscriber Subscriber; |
| 36 | 36 | ||
| 37 | void RunSubscriber(std::string hostname, gsfts::uint16_t port); | 37 | void RunSubscriber(std::string hostname, gsfts::uint16_t port); |
| 38 | void ProcessMeasurements(std::vector<gsfts::Measurement> newMeasurements); | 38 | void ProcessMeasurements(tst::DataSubscriber* source, std::vector<gsfts::Measurement> newMeasurements); |
| 39 | 39 | ||
| 40 | // Sample application to demonstrate the most simple use of the subscriber API. | 40 | // Sample application to demonstrate the most simple use of the subscriber API. |
| 41 | // | 41 | // |
| @@ -96,7 +96,7 @@ void RunSubscriber(std::string hostname, gsfts::uint16_t port) · 54 unmodified lines | |||
| 96 | 96 | ||
| 97 | // Callback which is called when the subscriber has | 97 | // Callback which is called when the subscriber has |
| 98 | // received a new packet of measurements from the publisher. | 98 | // received a new packet of measurements from the publisher. |
| 99 | void ProcessMeasurements(std::vector<gsfts::Measurement> newMeasurements) | 99 | void ProcessMeasurements(tst::DataSubscriber* source, std::vector<gsfts::Measurement> newMeasurements) |
| 100 | { | 100 | { |
| 101 | const std::string TimestampFormat = "%Y-%m-%d %H:%M:%S.%f"; | 101 | const std::string TimestampFormat = "%Y-%m-%d %H:%M:%S.%f"; |
| 102 | const std::size_t MaxTimestampSize = 80; | 102 | const std::size_t MaxTimestampSize = 80; |