Showing the changes to Source/Libraries/TimeSeriesPlatformLibrary/Samples/AdvancedSubscribe.cpp (1 of 1 file). Show all
Unified · Split
| @@ -156,7 +156,6 @@ SubscriptionInfo CreateSubscriptionInfo() · 155 unmodified lines | ||
| 156 | 156 | //info.RemotelySynchronized = true; |
| 157 | 157 | //info.ExtraConnectionStringParameters = "framesPerSecond=30;timeResolution=10000;downsamplingMethod=Closest"; |
| 158 | 158 | |
| 159 | − info.RemotelySynchronized = false; | |
| 160 | 159 | info.Throttled = false; |
| 161 | 160 | |
| 162 | 161 | info.UdpDataChannel = true; |
| @@ -194,6 +193,10 @@ void ProcessMeasurements(DataSubscriber* source, const vector<MeasurementPtr>& m · 31 unmodified lines | ||
| 194 | 193 | const uint64_t measurementCount = measurements.size(); |
| 195 | 194 | const bool showMessage = (processCount + measurementCount >= (processCount / interval + 1) * interval); |
| 196 | 195 | |
| 196 | + // Send a custom command to publisher upon receiving first measurement | |
| 197 | + if (processCount == 0) | |
| 198 | + source->SendServerCommand(ServerCommand::UserCommand00, "Hello, world!"); | |
| 199 | + | |
| 197 | 200 | processCount += measurementCount; |
| 198 | 201 | |
| 199 | 202 | // Only display messages every few seconds |