History

TimeSeriesPlatformLibrary: Added temporal support options to DataPublisher interfaces.

J. Ritchie Carroll committed 7 years ago

Commit 5c5b4061 parent 04505f228 files · +603 −300Browse files

Showing the changes to Source/Libraries/TimeSeriesPlatformLibrary/Transport/SubscriberConnection.h (1 of 28 files). Show all

Unified · Split

Source/Libraries/TimeSeriesPlatformLibrary/Transport/SubscriberConnection.h+48−5
@@ -37,6 +37,9 @@ namespace Transport · 36 unmodified lines
3737 class DataPublisher;
3838 typedef GSF::SharedPtr<DataPublisher> DataPublisherPtr;
3939
40+ class SubscriberConnection;
41+ typedef GSF::SharedPtr<SubscriberConnection> SubscriberConnectionPtr;
42+
4043 // Represents a subscriber connection to a data publisher
4144 class SubscriberConnection : public GSF::EnableSharedThisPtr<SubscriberConnection> // NOLINT
4245 {
@@ -49,6 +52,9 @@ namespace Transport · 6 unmodified lines
4952 std::string m_subscriptionInfo;
5053 uint32_t m_operationalModes;
5154 uint32_t m_encoding;
55+ GSF::datetime_t m_startTimeConstraint;
56+ GSF::datetime_t m_stopTimeConstraint;
57+ int32_t m_processingInterval;
5258 bool m_usePayloadCompression;
5359 bool m_useCompactMeasurementFormat;
5460 bool m_includeTime;
@@ -79,17 +85,18 @@ namespace Transport · 24 unmodified lines
7985 SignalIndexCachePtr m_signalIndexCache;
8086 int32_t m_timeIndex;
8187 int64_t m_baseTimeOffsets[2];
82− DateTime m_lastPublishTime;
88+ datetime_t m_lastPublishTime;
8389 //TSSCMeasurementParser m_tsscMeasurementParser;
8490 //bool m_tsscResetRequested;
8591 //uint16_t m_tsscSequenceNumber;
8692
8793 // Server request handlers
8894 void HandleSubscribe(uint8_t* data, uint32_t length);
95+ void HandleSubscribeFailure(const std::string& message);
8996 void HandleUnsubscribe();
9097 void HandleMetadataRefresh(uint8_t* data, uint32_t length);
9198 void HandleRotateCipherKeys();
92− void HandleUpdateProcessingInterval(uint8_t* data, uint32_t length);
99+ void HandleUpdateProcessingInterval(const uint8_t* data, uint32_t length);
93100 void HandleDefineOperationalModes(uint8_t* data, uint32_t length);
94101 void HandleConfirmNotification(uint8_t* data, uint32_t length);
95102 void HandleConfirmBufferBlock(uint8_t* data, uint32_t length);
@@ -112,43 +119,78 @@ namespace Transport · 16 unmodified lines
112119 ~SubscriberConnection();
113120
114121 const DataPublisherPtr& GetParent() const;
122+ SubscriberConnectionPtr GetReference();
115123
116124 GSF::TcpSocket& CommandChannelSocket();
117125
118− // Gets or sets subscriber identification used when subscriber is known and pre-established
126+ // Gets or sets subscriber UUID used when subscriber is known and pre-established
119127 const GSF::Guid& GetSubscriberID() const;
120128 void SetSubscriberID(const GSF::Guid& id);
121129
130+ // Gets subscriber connection identification, e.g., remote IP/port, for display and logging references
122131 const std::string& GetConnectionID() const;
132+
133+ // Gets subscriber remote IP address
123134 const GSF::IPAddress& GetIPAddress() const;
135+
136+ // Gets subscriber communications port
124137 const std::string& GetHostName() const;
125138
139+ // Gets or sets established subscriber operational modes
126140 uint32_t GetOperationalModes() const;
127141 void SetOperationalModes(uint32_t value);
128142
143+ // Gets established subscriber string encoding
129144 uint32_t GetEncoding() const;
130145
146+ // Gets flags that determines if this subscription is temporal based
147+ bool GetIsTemporalSubscription() const;
148+
149+ // Gets or sets the start time temporal processing constraint
150+ const GSF::datetime_t& GetStartTimeConstraint() const;
151+ void SetStartTimeConstraint(const GSF::datetime_t& value);
152+
153+ // Gets or sets the stop time temporal processing constraint
154+ const GSF::datetime_t& GetStopTimeConstraint() const;
155+ void SetStopTimeConstraint(const GSF::datetime_t& value);
156+
157+ // Gets or sets the desired temporal processing interval, in milliseconds
158+ // With the exception of the values of -1 and 0, this value specifies the desired processing interval for data, i.e.,
159+ // basically a delay, or timer interval, over which to process data. A value of -1 means to use the default processing
160+ // interval while a value of 0 means to process data as fast as possible.
161+ int32_t GetProcessingInterval() const;
162+ void SetProcessingInterval(int32_t value);
163+
164+ // Gets or sets flag that determines if payload compression should be enabled in data packets
131165 bool GetUsePayloadCompression() const;
132166 void SetUsePayloadCompression(bool value);
133167
168+ // Gets or sets flag that determines if the compact measurement format should be used in data packets
134169 bool GetUseCompactMeasurementFormat() const;
135170 void SetUseCompactMeasurementFormat(bool value);
136171
172+ // Gets or sets flag that determines if time should be included in data packets when the compact measurement format used
137173 bool GetIncludeTime() const;
138174 void SetIncludeTime(bool value);
139175
176+ // Gets or sets flag that determines if time should be restricted to millisecond resolution in data packets when the
177+ // compact measurement format used; otherwise, full resolution time will be used
140178 bool GetUseMillisecondResolution() const;
141179 void SetUseMillisecondResolution(bool value);
142180
181+ // Gets or sets flag that determines if NaN values should be excluded from data packets
143182 bool GetIsNaNFiltered() const;
144183 void SetIsNaNFiltered(bool value);
145184
185+ // Gets or sets flag that determines if subscriber connection is currently subscribed
146186 bool GetIsSubscribed() const;
147187 void SetIsSubscribed(bool value);
148188
189+ // Gets or sets subscription details about subscriber
149190 const std::string& GetSubscriptionInfo() const;
150191 void SetSubscriptionInfo(const std::string& value);
151192
193+ // Gets or sets signal index cache for subscriber representing run-time mappings for subscribed points
152194 const SignalIndexCachePtr& GetSignalIndexCache() const;
153195 void SetSignalIndexCache(SignalIndexCachePtr signalIndexCache);
154196
@@ -164,15 +206,16 @@ namespace Transport · 9 unmodified lines
164206 void Start();
165207 void Stop();
166208
167− void PublishMeasurements(const std::vector<Measurement>& measurements);
168209 void PublishMeasurements(const std::vector<MeasurementPtr>& measurements);
210+ void CompleteTemporalSubscription();
169211
170212 void CommandChannelSendAsync(uint8_t* data, uint32_t offset, uint32_t length);
171213 void DataChannelSendAsync(uint8_t* data, uint32_t offset, uint32_t length);
172214 void WriteHandler(const ErrorCode& error, uint32_t bytesTransferred);
173215
216+ bool SendResponse(uint8_t responseCode, uint8_t commandCode);
174217 bool SendResponse(uint8_t responseCode, uint8_t commandCode, const std::string& message);
175− bool SendResponse(uint8_t responseCode, uint8_t commandCode, const std::vector<uint8_t>& data = {});
218+ bool SendResponse(uint8_t responseCode, uint8_t commandCode, const std::vector<uint8_t>& data);
176219
177220 std::string DecodeString(const uint8_t* data, uint32_t offset, uint32_t length) const;
178221 std::vector<uint8_t> EncodeString(const std::string& value) const;

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