v2.0.0
Loading...
Searching...
No Matches
mna_param_binding.h
Go to the documentation of this file.
1//=============================================================================================================
34
35#ifndef MNA_PARAM_BINDING_H
36#define MNA_PARAM_BINDING_H
37
38//=============================================================================================================
39// INCLUDES
40//=============================================================================================================
41
42#include "mna_global.h"
43
44//=============================================================================================================
45// QT INCLUDES
46//=============================================================================================================
47
48#include <QString>
49#include <QStringList>
50#include <QJsonObject>
51#include <QCborMap>
52
53//=============================================================================================================
54// DEFINE NAMESPACE MNALIB
55//=============================================================================================================
56
57namespace MNALIB
58{
59
60//=============================================================================================================
68{
69 QString targetPath;
70 QString expression;
71 QString trigger;
72 int periodMs = 0;
73 QStringList dependencies;
74
75 QJsonObject toJson() const;
76 static MnaParamBinding fromJson(const QJsonObject& json);
77 QCborMap toCbor() const;
78 static MnaParamBinding fromCbor(const QCborMap& cbor);
79};
80
81} // namespace MNALIB
82
83#endif // MNA_PARAM_BINDING_H
mna library export/import macros.
#define MNASHARED_EXPORT
Definition mna_global.h:55
MNE Analysis Container Format (mna/mnx).
Dynamic parameter binding for the MNA parameter tree.
static MnaParamBinding fromCbor(const QCborMap &cbor)
QString expression
Formula string, e.g. "clamp(ref('noise_est_01/snr') * 0.1, 0.01, 1.0)".
int periodMs
Evaluation period when trigger == "periodic" (ignored otherwise).
QStringList dependencies
Paths this binding reads from.
QString targetPath
Parameter to control: "nodeId/attrKey".
static MnaParamBinding fromJson(const QJsonObject &json)
QString trigger
"on_change", "periodic", "manual"
QJsonObject toJson() const