aboutsummaryrefslogtreecommitdiffstats
path: root/signal-composer-binding
diff options
context:
space:
mode:
Diffstat (limited to 'signal-composer-binding')
-rw-r--r--signal-composer-binding/signal-composer-binding.cpp1
-rw-r--r--signal-composer-binding/signal-composer.cpp10
-rw-r--r--signal-composer-binding/signal.hpp5
3 files changed, 9 insertions, 7 deletions
diff --git a/signal-composer-binding/signal-composer-binding.cpp b/signal-composer-binding/signal-composer-binding.cpp
index 3c16ad3..36d0c9d 100644
--- a/signal-composer-binding/signal-composer-binding.cpp
+++ b/signal-composer-binding/signal-composer-binding.cpp
@@ -32,7 +32,6 @@
/// @param[in] object - eventual data that comes with the event
void onEvent(const char *event, json_object *object)
{
- AFB_NOTICE("Received event json: %s", json_object_to_json_string(object));
Composer& composer = Composer::instance();
std::vector<std::shared_ptr<Signal>> signals = composer.searchSignals(event);
diff --git a/signal-composer-binding/signal-composer.cpp b/signal-composer-binding/signal-composer.cpp
index f0a625b..89d442d 100644
--- a/signal-composer-binding/signal-composer.cpp
+++ b/signal-composer-binding/signal-composer.cpp
@@ -21,15 +21,13 @@
#include "clientApp.hpp"
-extern "C" void setsignalValueHandle(const char* aName, long long int timestamp, struct signalValue value)
+extern "C" void setSignalValueHandle(const char* aName, uint64_t timestamp, struct signalValue value)
{
std::vector<std::shared_ptr<Signal>> signals = Composer::instance().searchSignals(aName);
if(!signals.empty())
{
for(auto& sig: signals)
- {
- sig->set(timestamp, value);
- }
+ {sig->set(timestamp, value);}
}
}
@@ -41,8 +39,8 @@ bool startsWith(const std::string& str, const std::string& pattern)
return false;
}
-static struct pluginCBT pluginHandle = {
- .setsignalValue = setsignalValueHandle,
+static struct signalCBT pluginHandle = {
+ .setSignalValue = setSignalValueHandle,
};
CtlSectionT Composer::ctlSections_[] = {
diff --git a/signal-composer-binding/signal.hpp b/signal-composer-binding/signal.hpp
index 7bc6b4a..aa974da 100644
--- a/signal-composer-binding/signal.hpp
+++ b/signal-composer-binding/signal.hpp
@@ -86,3 +86,8 @@ public:
int initialRecursionCheck();
int recursionCheck(Signal* obs);
};
+
+struct signalCBT
+{
+ void (*setSignalValue)(const char* aName, uint64_t timestamp, struct signalValue value);
+};