26 #ifndef PDCOM5_SUBSCRIBER_H 27 #define PDCOM5_SUBSCRIBER_H 32 #include <pdcom5_export.h> 63 static constexpr
double checkInterval(
double d)
66 "period must be greater than zero")
71 constexpr
double getInterval()
const noexcept {
return interval_; }
72 template <
typename T,
typename R>
74 interval_(checkInterval(
75 std::chrono::duration_cast<std::chrono::duration<double>>(d)
82 return o.interval_ == interval_;
109 friend class impl::Subscription;
118 const Transmission &getTransmission()
const noexcept {
return td_; }
135 virtual void newValues(std::chrono::nanoseconds time_ns) = 0;
153 noexcept(__cplusplus >= 201703L)
155 return std::hash<double>()(t.getInterval());
161 #endif // PDCOM5_SUBSCRIBER_H
Tag for event-based subscription.
Definition: Subscriber.h:43
PdCom Subscription interface.
Definition: Subscription.h:64
Definition: Subscriber.h:106
Definition: ClientStatistics.h:31
Transmission mode for subscriptions.
Definition: Subscriber.h:59
Tag for poll-based subscription.
Definition: Subscriber.h:48
Definition: Exception.h:46