Showing the changes to Source/Libraries/TimeSeriesPlatformLibrary/Samples/SimpleSubscribe.cpp (1 of 5 files). Show all
Unified · Split
| @@ -25,16 +25,18 @@ · 24 unmodified lines | |||
| 25 | #include <string> | 25 | #include <string> |
| 26 | #include <vector> | 26 | #include <vector> |
| 27 | 27 | ||
| 28 | #include "../Common/CommonTypes.h" | ||
| 28 | #include "../Common/Convert.h" | 29 | #include "../Common/Convert.h" |
| 29 | #include "../Transport/DataSubscriber.h" | 30 | #include "../Transport/DataSubscriber.h" |
| 30 | 31 | ||
| 31 | using namespace std; | 32 | using namespace std; |
| 33 | using namespace GSF; | ||
| 32 | using namespace GSF::TimeSeries; | 34 | using namespace GSF::TimeSeries; |
| 33 | using namespace GSF::TimeSeries::Transport; | 35 | using namespace GSF::TimeSeries::Transport; |
| 34 | 36 | ||
| 35 | DataSubscriber Subscriber; | 37 | DataSubscriber Subscriber; |
| 36 | 38 | ||
| 37 | bool RunSubscriber(string hostname, uint16_t port); | 39 | bool RunSubscriber(const string& hostname, uint16_t port); |
| 38 | void ProcessMeasurements(DataSubscriber* source, const vector<MeasurementPtr>& measurements); | 40 | void ProcessMeasurements(DataSubscriber* source, const vector<MeasurementPtr>& measurements); |
| 39 | void DisplayStatusMessage(DataSubscriber* source, const string& message); | 41 | void DisplayStatusMessage(DataSubscriber* source, const string& message); |
| 40 | void DisplayErrorMessage(DataSubscriber* source, const string& message); | 42 | void DisplayErrorMessage(DataSubscriber* source, const string& message); |
| @@ -86,7 +88,7 @@ int main(int argc, char* argv[]) · 45 unmodified lines | |||
| 86 | // - Register callbacks | 88 | // - Register callbacks |
| 87 | // - Connect to publisher | 89 | // - Connect to publisher |
| 88 | // - Subscribe | 90 | // - Subscribe |
| 89 | bool RunSubscriber(string hostname, uint16_t port) | 91 | bool RunSubscriber(const string& hostname, uint16_t port) |
| 90 | { | 92 | { |
| 91 | // SubscriptionInfo is a helper object which allows the user | 93 | // SubscriptionInfo is a helper object which allows the user |
| 92 | // to set up their subscription and reuse subscription settings. | 94 | // to set up their subscription and reuse subscription settings. |
| @@ -118,7 +120,7 @@ bool RunSubscriber(string hostname, uint16_t port) · 25 unmodified lines | |||
| 118 | } | 120 | } |
| 119 | catch (...) | 121 | catch (...) |
| 120 | { | 122 | { |
| 121 | errorMessage = current_exception_diagnostic_information(true); | 123 | errorMessage = boost::current_exception_diagnostic_information(true); |
| 122 | } | 124 | } |
| 123 | 125 | ||
| 124 | if (connected) | 126 | if (connected) |