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
5//5//
6// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See6// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
7// the NOTICE file distributed with this work for additional information regarding copyright ownership.7// 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 may8// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may not use this
9// not use this file except in compliance with the License. You may obtain a copy of the License at:9// file except in compliance with the License. You may obtain a copy of the License at:
10//10//
11// http://www.opensource.org/licenses/eclipse-1.0.php11// http://opensource.org/licenses/MIT
12//12//
13// Unless agreed to in writing, the subject software distributed under the License is distributed on an13// Unless agreed to in writing, the subject software distributed under the License is distributed on an
14// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the14// "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
40// Handlers for subscriber callbacks.40// Handlers for subscriber callbacks.
41void Resubscribe(DataSubscriber* source);41void Resubscribe(DataSubscriber* source);
42void ProcessMeasurements(DataSubscriber* source, const vector<MeasurementPtr>& measurements);42void ProcessMeasurements(DataSubscriber* source, const vector<MeasurementPtr>& measurements);
43void ConfigurationChanged(DataSubscriber* source);
43void DisplayStatusMessage(DataSubscriber* source, const string& message);44void DisplayStatusMessage(DataSubscriber* source, const string& message);
44void DisplayErrorMessage(DataSubscriber* source, const string& message);45void DisplayErrorMessage(DataSubscriber* source, const string& message);
45 46
@@ -101,6 +102,7 @@ void RunSubscriber(const string& hostname, uint16_t port) · 55 unmodified lines
101 Subscriber->RegisterStatusMessageCallback(&DisplayStatusMessage);102 Subscriber->RegisterStatusMessageCallback(&DisplayStatusMessage);
102 Subscriber->RegisterErrorMessageCallback(&DisplayErrorMessage);103 Subscriber->RegisterErrorMessageCallback(&DisplayErrorMessage);
103 Subscriber->RegisterNewMeasurementsCallback(&ProcessMeasurements);104 Subscriber->RegisterNewMeasurementsCallback(&ProcessMeasurements);
105 Subscriber->RegisterConfigurationChangedCallback(&ConfigurationChanged);
104 106
105 cout << endl << "Connecting to " << hostname << ":" << port << "..." << endl << endl;107 cout << endl << "Connecting to " << hostname << ":" << port << "..." << endl << endl;
106 108
@@ -247,6 +249,12 @@ void Resubscribe(DataSubscriber* source) · 140 unmodified lines
247 }249 }
248}250}
249 251
252void ConfigurationChanged(DataSubscriber* source)
253{
254 // Resubscribe since new metadata is available - filter expression will be reapplied...
255 Subscriber->Subscribe();
256}
257
250// Callback which is called to display status messages from the subscriber.258// Callback which is called to display status messages from the subscriber.
251void DisplayStatusMessage(DataSubscriber* source, const string& message)259void DisplayStatusMessage(DataSubscriber* source, const string& message)
252{260{

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