Subscriber of a single scalar value.
More...
#include <ScalarSubscriber.h>
|
| | ScalarSubscriber () |
| | Constructor.
|
| |
| virtual | ~ScalarSubscriber () |
| | Destructor.
|
| |
| void | setVariable (PdCom::Variable pv, const PdCom::Selector &selector={}, const Transmission &=event_mode, double scale=1.0, double offset=0.0, double tau=0.0) |
| | Subscribe to a process variable via variable.
|
| |
| void | setVariable (PdCom::Process *process, const QString &path, const PdCom::Selector &selector={}, const Transmission &=event_mode, double scale=1.0, double offset=0.0, double tau=0.0) |
| | Subscribe to a process variable via process and path.
|
| |
| void | clearVariable () |
| | Unsubscribe from a Variable.
|
| |
| bool | hasVariable () const |
| | Subscription active.
|
| |
| virtual void | newValues (std::chrono::nanoseconds)=0 |
| |
| virtual void | stateChange (PdCom::Subscription::State) |
| |
| template<class T> |
| void | writeValue (T) |
| | Write a value to the process.
|
| |
| double | getFilterConstant () const |
| |
| PdCom::Variable | getVariable () const |
| |
| const void * | getData () const |
| |
| Q_INVOKABLE bool | poll () |
| | Poll an active subscription.
|
| |
Subscriber of a single scalar value.
◆ ScalarSubscriber() [1/2]
| ScalarSubscriber::ScalarSubscriber |
( |
| ) |
|
◆ ScalarSubscriber() [2/2]
◆ ~ScalarSubscriber()
| ScalarSubscriber::~ScalarSubscriber |
( |
| ) |
|
|
virtual |
◆ clearVariable()
| void ScalarSubscriber::clearVariable |
( |
| ) |
|
Unsubscribe from a Variable.
◆ getData()
| const void * ScalarSubscriber::getData |
( |
| ) |
const |
◆ getFilterConstant()
| double ScalarSubscriber::getFilterConstant |
( |
| ) |
const |
◆ getSelector()
| const PdCom::Selector & ScalarSubscriber::getSelector |
( |
| ) |
const |
|
protected |
◆ getVariable()
| PdCom::Variable ScalarSubscriber::getVariable |
( |
| ) |
const |
◆ hasVariable()
| bool ScalarSubscriber::hasVariable |
( |
| ) |
const |
◆ newValues()
| virtual void QtPdCom::ScalarSubscriber::newValues |
( |
std::chrono::nanoseconds | | ) |
|
|
pure virtual |
◆ poll()
| bool QtPdCom::ScalarSubscriber::poll |
( |
| ) |
|
Poll an active subscription.
- Returns
- false if variable could not be polled.
◆ setVariable() [1/2]
| void ScalarSubscriber::setVariable |
( |
PdCom::Process * | process, |
|
|
const QString & | path, |
|
|
const PdCom::Selector & | selector = {}, |
|
|
const Transmission & | transmission = event_mode, |
|
|
double | scale = 1.0, |
|
|
double | offset = 0.0, |
|
|
double | tau = 0.0 ) |
Subscribe to a process variable via process and path.
Subscribes to a ProcessVariable.
- Parameters
-
| process | Process. |
| path | Variable path. |
| selector | Selector. |
| transmission | Transmission details. |
| scale | Scale factor. |
| offset | Offset (applied after scaling). |
| tau | PT1 filter time constant. A value less or equal to 0.0 means, that no filter is applied. |
◆ setVariable() [2/2]
| void ScalarSubscriber::setVariable |
( |
PdCom::Variable | pv, |
|
|
const PdCom::Selector & | selector = {}, |
|
|
const Transmission & | transmission = event_mode, |
|
|
double | scale = 1.0, |
|
|
double | offset = 0.0, |
|
|
double | tau = 0.0 ) |
Subscribe to a process variable via variable.
Subscribes to a ProcessVariable.
- Parameters
-
| pv | Process variable. |
| selector | Selector. |
| transmission | Transmission details. |
| scale | Scale factor. |
| offset | Offset (applied after scaling). |
| tau | PT1 filter time constant. A value less or equal to 0.0 means, that no filter is applied. |
◆ stateChange()
| void ScalarSubscriber::stateChange |
( |
PdCom::Subscription::State | | ) |
|
|
virtual |
◆ writeValue()
template<class T>
| void QtPdCom::ScalarSubscriber::writeValue |
( |
T | value | ) |
|
Write a value to the process.
This is a convenience function, that checks for the subscription, before writing the value.
◆ Impl
◆ impl
| std::unique_ptr<Impl> QtPdCom::ScalarSubscriber::impl |
|
private |
◆ offset
| double QtPdCom::ScalarSubscriber::offset |
|
protected |
◆ scale
| double QtPdCom::ScalarSubscriber::scale |
|
protected |
The documentation for this class was generated from the following files: