Showing the changes to Source/Libraries/TimeSeriesPlatformLibrary/Samples/TemporalSubscriber.cpp (1 of 8 files). Show all
Unified · Split
| @@ -22,8 +22,7 @@ · 21 unmodified lines | |||
| 22 | //****************************************************************************************************** | 22 | //****************************************************************************************************** |
| 23 | 23 | ||
| 24 | #include "TemporalSubscriber.h" | 24 | #include "TemporalSubscriber.h" |
| 25 | #include <utility> | 25 | |
| 26 | |||
| 27 | using namespace std; | 26 | using namespace std; |
| 28 | using namespace GSF; | 27 | using namespace GSF; |
| 29 | using namespace GSF::Data; | 28 | using namespace GSF::Data; |
| @@ -32,9 +31,8 @@ using namespace GSF::TimeSeries; · 2 unmodified lines | |||
| 32 | GSF::Data::DataSetPtr TemporalSubscriber::s_historyDataSet = nullptr; | 31 | GSF::Data::DataSetPtr TemporalSubscriber::s_historyDataSet = nullptr; |
| 33 | GSF::Data::DataTablePtr TemporalSubscriber::s_history = nullptr; | 32 | GSF::Data::DataTablePtr TemporalSubscriber::s_history = nullptr; |
| 34 | 33 | ||
| 35 | TemporalSubscriber::TemporalSubscriber(SubscriberConnectionPtr connection, RemoveSubscriberFunction removeSubscriber) : | 34 | TemporalSubscriber::TemporalSubscriber(SubscriberConnectionPtr connection) : |
| 36 | m_connection(std::move(connection)), | 35 | m_connection(std::move(connection)), |
| 37 | m_removeSubscriber(std::move(removeSubscriber)), | ||
| 38 | m_startTimestamp(ToTicks(m_connection->GetStartTimeConstraint())), | 36 | m_startTimestamp(ToTicks(m_connection->GetStartTimeConstraint())), |
| 39 | m_stopTimestamp(ToTicks(m_connection->GetStopTimeConstraint())), | 37 | m_stopTimestamp(ToTicks(m_connection->GetStopTimeConstraint())), |
| 40 | m_currentTimestamp(m_startTimestamp), | 38 | m_currentTimestamp(m_startTimestamp), |
| @@ -117,7 +115,12 @@ void TemporalSubscriber::CompleteTemporalSubscription() · 76 unmodified lines | |||
| 117 | if (m_stopped) | 115 | if (m_stopped) |
| 118 | return; | 116 | return; |
| 119 | 117 | ||
| 120 | m_processTimer->Stop(); | ||
| 121 | m_connection->CompleteTemporalSubscription(); | ||
| 122 | m_stopped = true; | 118 | m_stopped = true; |
| 119 | m_processTimer->Stop(); | ||
| 120 | m_connection->CancelTemporalSubscription(); | ||
| 121 | } | ||
| 122 | |||
| 123 | bool TemporalSubscriber::GetIsStopped() const | ||
| 124 | { | ||
| 125 | return m_stopped; | ||
| 123 | } | 126 | } |