diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2018-04-25 11:00:12 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2018-07-05 15:43:09 +0200 |
commit | 872dd097432a3fb4fb91d24d227486a59be5e24a (patch) | |
tree | 3f3ae7cdcb6dd222f39370fff55bfa1912ba1aff /signal-composer-binding/signal-composer.cpp | |
parent | 7229918a064a862c51217f1294a320c7260da937 (diff) |
Improve signal handling
- Fix memleak: RRelease the Signal JSON representation once used
- Change equality condition between signals
- Use a REALTIME clock to retrieve the timestamp if not provided by
the signal. This is the most simple to date a signal and
use that time for further usage.
- Add a method to retrieve the last_timestamp value from
a signal
This with the commit from ctl-utilities submodule
"8ff0fe3c454ea32ba383a3cfa9c4e91237d6c494" fixes the
issue.
Change-Id: Ifed66796f92d789c80f10b161318f6bef788dda7
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'signal-composer-binding/signal-composer.cpp')
-rw-r--r-- | signal-composer-binding/signal-composer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/signal-composer-binding/signal-composer.cpp b/signal-composer-binding/signal-composer.cpp index 0ee210b..1752164 100644 --- a/signal-composer-binding/signal-composer.cpp +++ b/signal-composer-binding/signal-composer.cpp @@ -520,7 +520,7 @@ void Composer::processOptions(const std::map<std::string, int>& opts, std::share else if (o.first.compare("last") && !last) { last = true; - struct signalValue value = sig->last(); + struct signalValue value = sig->last_value(); if(value.hasBool) { json_object_object_add(response, "value", @@ -744,7 +744,7 @@ json_object* Composer::getsignalValue(const std::string& sig, json_object* optio "signal", sig->id().c_str()); if (opts.empty()) { - struct signalValue value = sig->last(); + struct signalValue value = sig->last_value(); if(value.hasBool) { json_object_object_add(response, "value", |