Showing the changes to Source/Libraries/TimeSeriesPlatformLibrary/Samples/AdvancedSubscribe.cpp (1 of 7 files). Show all
Unified · Split
| @@ -41,9 +41,9 @@ tst::SubscriptionInfo CreateSubscriptionInfo(); · 40 unmodified lines | ||
| 41 | 41 | |
| 42 | 42 | // Handlers for subscriber callbacks. |
| 43 | 43 | void Resubscribe(tst::DataSubscriber* source); |
| 44 | −void ProcessMeasurements(std::vector<gsfts::Measurement> newMeasurements); | |
| 45 | −void DisplayStatusMessage(std::string message); | |
| 46 | −void DisplayErrorMessage(std::string message); | |
| 44 | +void ProcessMeasurements(tst::DataSubscriber* source, std::vector<gsfts::Measurement> newMeasurements); | |
| 45 | +void DisplayStatusMessage(tst::DataSubscriber* source, std::string message); | |
| 46 | +void DisplayErrorMessage(tst::DataSubscriber* source, std::string message); | |
| 47 | 47 | |
| 48 | 48 | // Runs the subscriber. |
| 49 | 49 | void RunSubscriber(std::string hostname, gsfts::uint16_t port); |
| @@ -182,7 +182,7 @@ tst::SubscriberConnector CreateSubscriberConnector(std::string hostname, gsfts:: · 132 unmodified lines | ||
| 182 | 182 | |
| 183 | 183 | // Callback which is called when the subscriber has |
| 184 | 184 | // received a new packet of measurements from the publisher. |
| 185 | −void ProcessMeasurements(std::vector<gsfts::Measurement> newMeasurements) | |
| 185 | +void ProcessMeasurements(tst::DataSubscriber* source, std::vector<gsfts::Measurement> newMeasurements) | |
| 186 | 186 | { |
| 187 | 187 | const std::string TimestampFormat = "%Y-%m-%d %H:%M:%S.%f"; |
| 188 | 188 | const std::size_t MaxTimestampSize = 80; |
| @@ -223,13 +223,13 @@ void Resubscribe(tst::DataSubscriber* source) · 34 unmodified lines | ||
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | // Callback which is called to display status messages from the subscriber. |
| 226 | −void DisplayStatusMessage(std::string message) | |
| 226 | +void DisplayStatusMessage(tst::DataSubscriber* source, std::string message) | |
| 227 | 227 | { |
| 228 | 228 | std::cout << message << std::endl << std::endl; |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | // Callback which is called to display error messages from the connector and subscriber. |
| 232 | −void DisplayErrorMessage(std::string message) | |
| 232 | +void DisplayErrorMessage(tst::DataSubscriber* source, std::string message) | |
| 233 | 233 | { |
| 234 | 234 | std::cerr << message << std::endl << std::endl; |
| 235 | 235 | } |