summaryrefslogtreecommitdiffstats
path: root/signal-composer-binding/signal-composer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'signal-composer-binding/signal-composer.cpp')
-rw-r--r--signal-composer-binding/signal-composer.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/signal-composer-binding/signal-composer.cpp b/signal-composer-binding/signal-composer.cpp
index 8ad8c3b..b29df22 100644
--- a/signal-composer-binding/signal-composer.cpp
+++ b/signal-composer-binding/signal-composer.cpp
@@ -19,10 +19,21 @@
#include "signal-composer.hpp"
+extern "C" void setSignalValueHandle(const char* aName, long long int timestamp, struct SignalValue value)
+{
+ std::shared_ptr<Signal> sig = bindingApp::instance().searchSignal(aName);
+ if(sig)
+ {sig->set(timestamp, value);}
+}
+
+static struct pluginCBT pluginHandle = {
+ .setSignalValue = setSignalValueHandle,
+};
+
CtlSectionT bindingApp::ctlSections_[] = {
[0]={.key="plugins" ,.label = "plugins", .info=nullptr,
.loadCB=PluginConfig,
- .handle=&bindingApp::instance()},
+ .handle=&pluginHandle},
[1]={.key="sources" ,.label = "sources", .info=nullptr,
.loadCB=loadSourcesAPI,
.handle=nullptr},