22 #ifndef QTPDCOM_SCALARSUBSCRIBER_H 23 #define QTPDCOM_SCALARSUBSCRIBER_H 28 #include <pdcom5/Variable.h> 29 #include <pdcom5/Subscription.h> 49 const PdCom::Selector &selector = {},
62 PdCom::Process *process,
64 const PdCom::Selector &selector = {},
74 bool hasVariable()
const;
76 virtual void newValues(std::chrono::nanoseconds) = 0;
77 virtual void stateChange(PdCom::Subscription::State);
79 template <
class T>
void writeValue(T);
81 double getFilterConstant()
const;
83 PdCom::Variable getVariable()
const;
84 const void *getData()
const;
90 const PdCom::Selector &getSelector()
const;
94 std::unique_ptr<Impl>
impl;
110 qWarning() <<
"ScalarSubscriber::writeValue(): Not subscribed!";
115 qWarning() <<
"Avoiding division by zero scale.";
Definition: ScalarSubscriber.cpp:35
Transmission mode for subscriptions.
Definition: Transmission.h:77
Definition: BroadcastModel.h:32
const PdCom::Selector & getSelector() const
Definition: ScalarSubscriber.cpp:420
void writeValue(T)
Write a value to the process.
Definition: ScalarSubscriber.h:107
double offset
Definition: ScalarSubscriber.h:88
Subscriber of a single scalar value.
Definition: ScalarSubscriber.h:39
#define QTPDCOM_PUBLIC
Definition: Export.h:30
std::unique_ptr< Impl > impl
Definition: ScalarSubscriber.h:94
double scale
Definition: ScalarSubscriber.h:87
PdCom::Variable getVariable() const
Definition: ScalarSubscriber.cpp:396
bool hasVariable() const
Subscription active.
Definition: ScalarSubscriber.cpp:376
constexpr struct QtPdCom::event_mode_tag event_mode