|
QtPdCom
1.5.2
|
Scalar Value Template. More...
#include <ScalarVariable.h>


Public Member Functions | |
| ScalarVariable (QObject *parent=nullptr) | |
| Constructor. | |
| virtual | ~ScalarVariable () |
| Destructor. | |
| void | clearData () |
| bool | hasData () const |
| T | getValue () const |
| std::chrono::nanoseconds | getMTime () const |
| void | inc () |
| Increments the current value and writes it to the process. | |
| Public Member Functions inherited from QtPdCom::AbstractScalarVariable | |
| template<typename T> | |
| std::enable_if< std::is_arithmetic< T >::value, void >::type | copyData (T &dest) const |
| Public Member Functions inherited from QtPdCom::ScalarSubscriber | |
| 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 | 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. | |
Private Member Functions | |
| void | newValues (std::chrono::nanoseconds) override |
| This virtual method is called if the process variable's value changed. | |
Private Attributes | |
| T | value |
| Current value. | |
| std::chrono::nanoseconds | mTime |
| Modification Time of Current value. | |
| bool | dataPresent |
| There is a process value to display. | |
Additional Inherited Members | |
| Signals inherited from QtPdCom::AbstractScalarVariable | |
| void | valueChanged () |
| Emitted, when the value changes, or the variable is disconnected. | |
| Protected Member Functions inherited from QtPdCom::ScalarSubscriber | |
| const PdCom::Selector & | getSelector () const |
| Protected Attributes inherited from QtPdCom::ScalarSubscriber | |
| double | scale |
| double | offset |
Scalar Value Template.
| QtPdCom::ScalarVariable< T >::ScalarVariable | ( | QObject * | parent = nullptr | ) |
Constructor.
References dataPresent, and value.
|
virtual |
Destructor.
| void QtPdCom::ScalarVariable< T >::clearData | ( | ) |
References dataPresent, value, and QtPdCom::AbstractScalarVariable::valueChanged().
|
inline |
References mTime.
|
inline |
References value.
Referenced by QtPdCom::MessageModel::Impl::stateChanged().
|
inline |
References dataPresent.
Referenced by QtPdCom::MessageModel::Impl::stateChanged().
| void QtPdCom::ScalarVariable< T >::inc | ( | ) |
Increments the current value and writes it to the process.
This does not update value directly.
References value, and QtPdCom::ScalarSubscriber::writeValue().
|
overrideprivatevirtual |
This virtual method is called if the process variable's value changed.
Implements QtPdCom::ScalarSubscriber.
References QtPdCom::AbstractScalarVariable::copyData(), dataPresent, mTime, QtPdCom::ScalarSubscriber::offset, QtPdCom::ScalarSubscriber::scale, value, and QtPdCom::AbstractScalarVariable::valueChanged().
|
private |
There is a process value to display.
Referenced by clearData(), hasData(), newValues(), and ScalarVariable().
|
private |
Modification Time of Current value.
Referenced by getMTime(), and newValues().
|
private |
Current value.
Referenced by clearData(), getValue(), inc(), newValues(), and ScalarVariable().