Showing the changes to Source/Libraries/TimeSeriesPlatformLibrary/Samples/SimplePublish.cpp (1 of 28 files). Show all
Unified · Split
| @@ -36,8 +36,8 @@ TimerPtr PublishTimer; · 35 unmodified lines | |||
| 36 | vector<MeasurementMetadataPtr> MeasurementsToPublish; | 36 | vector<MeasurementMetadataPtr> MeasurementsToPublish; |
| 37 | 37 | ||
| 38 | bool RunPublisher(uint16_t port); | 38 | bool RunPublisher(uint16_t port); |
| 39 | void DisplayClientConnected(DataPublisher* source, const Guid& subscriberID, const string& connectionID); | 39 | void DisplayClientConnected(DataPublisher* source, const SubscriberConnectionPtr& connection); |
| 40 | void DisplayClientDisconnected(DataPublisher* source, const Guid& subscriberID, const string& connectionID); | 40 | void DisplayClientDisconnected(DataPublisher* source, const SubscriberConnectionPtr& connection); |
| 41 | void DisplayStatusMessage(DataPublisher* source, const string& message); | 41 | void DisplayStatusMessage(DataPublisher* source, const string& message); |
| 42 | void DisplayErrorMessage(DataPublisher* source, const string& message); | 42 | void DisplayErrorMessage(DataPublisher* source, const string& message); |
| 43 | 43 | ||
| @@ -168,18 +168,18 @@ bool RunPublisher(uint16_t port) · 124 unmodified lines | |||
| 168 | return running; | 168 | return running; |
| 169 | } | 169 | } |
| 170 | 170 | ||
| 171 | void DisplayClientConnected(DataPublisher* source, const Guid& subscriberID, const string& connectionID) | 171 | void DisplayClientConnected(DataPublisher* source, const SubscriberConnectionPtr& connection) |
| 172 | { | 172 | { |
| 173 | cout << ">> New Client Connected:" << endl; | 173 | cout << ">> New Client Connected:" << endl; |
| 174 | cout << " Subscriber ID: " << ToString(subscriberID) << endl; | 174 | cout << " Subscriber ID: " << ToString(connection->GetSubscriberID()) << endl; |
| 175 | cout << " Connection ID: " << connectionID << endl << endl; | 175 | cout << " Connection ID: " << ToString(connection->GetConnectionID()) << endl << endl; |
| 176 | } | 176 | } |
| 177 | 177 | ||
| 178 | void DisplayClientDisconnected(DataPublisher* source, const Guid& subscriberID, const string& connectionID) | 178 | void DisplayClientDisconnected(DataPublisher* source, const SubscriberConnectionPtr& connection) |
| 179 | { | 179 | { |
| 180 | cout << ">> Client Disconnected:" << endl; | 180 | cout << ">> Client Disconnected:" << endl; |
| 181 | cout << " Subscriber ID: " << ToString(subscriberID) << endl; | 181 | cout << " Subscriber ID: " << ToString(connection->GetSubscriberID()) << endl; |
| 182 | cout << " Connection ID: " << connectionID << endl << endl; | 182 | cout << " Connection ID: " << ToString(connection->GetConnectionID()) << endl << endl; |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | // Callback which is called to display status messages from the subscriber. | 185 | // Callback which is called to display status messages from the subscriber. |
| @@ -192,4 +192,4 @@ void DisplayStatusMessage(DataPublisher* source, const string& message) · 6 unmodified lines | |||
| 192 | void DisplayErrorMessage(DataPublisher* source, const string& message) | 192 | void DisplayErrorMessage(DataPublisher* source, const string& message) |
| 193 | { | 193 | { |
| 194 | cerr << message << endl << endl; | 194 | cerr << message << endl << endl; |
| 195 | } | 195 | } |