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 | 25 | #include <string> |
| 26 | 26 | #include <vector> |
| 27 | 27 | |
| 28 | +#include "../Common/CommonTypes.h" | |
| 28 | 29 | #include "../Common/Convert.h" |
| 29 | 30 | #include "../Transport/DataSubscriber.h" |
| 30 | 31 | |
| 31 | 32 | using namespace std; |
| 33 | +using namespace GSF; | |
| 32 | 34 | using namespace GSF::TimeSeries; |
| 33 | 35 | using namespace GSF::TimeSeries::Transport; |
| 34 | 36 | |
| 35 | 37 | DataSubscriber Subscriber; |
| 36 | 38 | |
| 37 | −bool RunSubscriber(string hostname, uint16_t port); | |
| 39 | +bool RunSubscriber(const string& hostname, uint16_t port); | |
| 38 | 40 | void ProcessMeasurements(DataSubscriber* source, const vector<MeasurementPtr>& measurements); |
| 39 | 41 | void DisplayStatusMessage(DataSubscriber* source, const string& message); |
| 40 | 42 | void DisplayErrorMessage(DataSubscriber* source, const string& message); |
| @@ -86,7 +88,7 @@ int main(int argc, char* argv[]) · 45 unmodified lines | ||
| 86 | 88 | // - Register callbacks |
| 87 | 89 | // - Connect to publisher |
| 88 | 90 | // - Subscribe |
| 89 | −bool RunSubscriber(string hostname, uint16_t port) | |
| 91 | +bool RunSubscriber(const string& hostname, uint16_t port) | |
| 90 | 92 | { |
| 91 | 93 | // SubscriptionInfo is a helper object which allows the user |
| 92 | 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 | 121 | catch (...) |
| 120 | 122 | { |
| 121 | − errorMessage = current_exception_diagnostic_information(true); | |
| 123 | + errorMessage = boost::current_exception_diagnostic_information(true); | |
| 122 | 124 | } |
| 123 | 125 | |
| 124 | 126 | if (connected) |