|
QtPdCom
1.5.2
|
Subscriber of a single scalar value. More...
#include <ScalarSubscriber.h>

Classes | |
| class | Impl |
Public Member Functions | |
| 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. | |
Protected Member Functions | |
| const PdCom::Selector & | getSelector () const |
Protected Attributes | |
| double | scale |
| double | offset |
Private Member Functions | |
| ScalarSubscriber (const ScalarSubscriber &) | |
Private Attributes | |
| struct Q_DECL_HIDDEN | Impl |
| std::unique_ptr< Impl > | impl |
Subscriber of a single scalar value.
Constructor.
|
private |
|
virtual |
Destructor.
| void ScalarSubscriber::clearVariable | ( | ) |
Unsubscribe from a Variable.
| const void * ScalarSubscriber::getData | ( | ) | const |
| double ScalarSubscriber::getFilterConstant | ( | ) | const |
|
protected |
| PdCom::Variable ScalarSubscriber::getVariable | ( | ) | const |
| bool ScalarSubscriber::hasVariable | ( | ) | const |
Subscription active.
|
pure virtual |
| bool QtPdCom::ScalarSubscriber::poll | ( | ) |
Poll an active subscription.
| 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.
| 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. |
| 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.
| 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. |
|
virtual |
| 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.
|
private |
|
private |
|
protected |
|
protected |