summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-10-16 10:05:24 +0200
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2018-11-03 17:23:47 +0000
commita3e28fb4904602f56c9bc436b751cee723021fe4 (patch)
tree829f3639aa8e9626ac1a70f3412d6fab745a82b0
parent626bf1be5bc8b66d55a0c341ffcc359abb1ae768 (diff)
Handle new metadata signal's field
Change-Id: I4c02d4a576459a0a1915893fa5526d4c8cffe6e6 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--plugins/low-can.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/low-can.cpp b/plugins/low-can.cpp
index 5153ee9..ded20f1 100644
--- a/plugins/low-can.cpp
+++ b/plugins/low-can.cpp
@@ -72,7 +72,7 @@ CTLP_ONLOAD(plugin, composerHandle)
}
CTLP_CAPI (subscribeToLow, source, argsJ, eventJ) {
- json_object* dependsArrayJ = nullptr, *subscribeArgsJ = nullptr, *subscribeFilterJ = nullptr, *responseJ = nullptr, *filterJ = nullptr;
+ json_object* metadataJ = nullptr, *dependsArrayJ = nullptr, *subscribeArgsJ = nullptr, *subscribeFilterJ = nullptr, *responseJ = nullptr, *filterJ = nullptr;
const char *id = nullptr, *event = nullptr, *unit = nullptr;
double frequency = 0;
int err = 0;
@@ -82,11 +82,12 @@ CTLP_CAPI (subscribeToLow, source, argsJ, eventJ) {
if(eventJ)
{
- err = wrap_json_unpack(eventJ, "{ss,s?s,s?o,s?s,s?F,s?o !}",
+ err = wrap_json_unpack(eventJ, "{ss,s?s,s?o,s?s,s?o,s?F,s?o !}",
"uid", &id,
"event", &event,
"depends", &dependsArrayJ,
"unit", &unit,
+ "metadata", &metadataJ,
"frequency", &frequency,
"getSignalsArgs", &filterJ);
if(err)