History

TimeSeriesPlatformLibrary: Back ported bug fixes and 64-bit improvements to GEP from recent STTP updates.

J. Ritchie Carroll committed 7 years ago

Commit b4c04411 parent 7020fe527 files · +180 −125Browse files

Showing the changes to Source/Libraries/TimeSeriesPlatformLibrary/Samples/AverageFrequencyCalculator.cpp (1 of 27 files). Show all

Unified · Split

Source/Libraries/TimeSeriesPlatformLibrary/Samples/AverageFrequencyCalculator.cpp+11−3
@@ -5,10 +5,10 @@ · 4 unmodified lines
55 //
66 // Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
77 // the NOTICE file distributed with this work for additional information regarding copyright ownership.
8−// The GPA licenses this file to you under the Eclipse Public License -v 1.0 (the "License"); you may
9−// not use this file except in compliance with the License. You may obtain a copy of the License at:
8+// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may not use this
9+// file except in compliance with the License. You may obtain a copy of the License at:
1010 //
11−// http://www.opensource.org/licenses/eclipse-1.0.php
11+// http://opensource.org/licenses/MIT
1212 //
1313 // Unless agreed to in writing, the subject software distributed under the License is distributed on an
1414 // "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
@@ -40,6 +40,7 @@ SubscriptionInfo CreateSubscriptionInfo(); · 25 unmodified lines
4040 // Handlers for subscriber callbacks.
4141 void Resubscribe(DataSubscriber* source);
4242 void ProcessMeasurements(DataSubscriber* source, const vector<MeasurementPtr>& measurements);
43+void ConfigurationChanged(DataSubscriber* source);
4344 void DisplayStatusMessage(DataSubscriber* source, const string& message);
4445 void DisplayErrorMessage(DataSubscriber* source, const string& message);
4546
@@ -101,6 +102,7 @@ void RunSubscriber(const string& hostname, uint16_t port) · 55 unmodified lines
101102 Subscriber->RegisterStatusMessageCallback(&DisplayStatusMessage);
102103 Subscriber->RegisterErrorMessageCallback(&DisplayErrorMessage);
103104 Subscriber->RegisterNewMeasurementsCallback(&ProcessMeasurements);
105+ Subscriber->RegisterConfigurationChangedCallback(&ConfigurationChanged);
104106
105107 cout << endl << "Connecting to " << hostname << ":" << port << "..." << endl << endl;
106108
@@ -247,6 +249,12 @@ void Resubscribe(DataSubscriber* source) · 140 unmodified lines
247249 }
248250 }
249251
252+void ConfigurationChanged(DataSubscriber* source)
253+{
254+ // Resubscribe since new metadata is available - filter expression will be reapplied...
255+ Subscriber->Subscribe();
256+}
257+
250258 // Callback which is called to display status messages from the subscriber.
251259 void DisplayStatusMessage(DataSubscriber* source, const string& message)
252260 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t