aboutsummaryrefslogtreecommitdiffstats
path: root/signal-composer-binding/source.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-07-22 12:45:13 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-07-23 09:52:41 +0200
commit3b08cec1ad06f313374bc1fd9cc64e1b28ce798d (patch)
tree474eeb22cda79134562cdd66dea01ceaf7280cdd /signal-composer-binding/source.cpp
parent1eb97bc1126943b2d2a3ef631ed019231ba06da5 (diff)
Adds a signal's metadata attributeflounder_5.99.2flounder/5.99.25.99.2
This adds a signal's metadata attribute which lets you store any kind and number of metadata attributes to your signal. These metadata are just reissued at the event emission without alteration. Special case of "unit" attribute which is kept as a signal attribute and not as a metadata because it is an intrinsic signal attribute that all signals should have. Bug-AGL: SPEC-1419 Change-Id: I531b4012ac9b22f312a4ccebc1a07a8d93129403 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'signal-composer-binding/source.cpp')
-rw-r--r--signal-composer-binding/source.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/signal-composer-binding/source.cpp b/signal-composer-binding/source.cpp
index d7a5915..a46e766 100644
--- a/signal-composer-binding/source.cpp
+++ b/signal-composer-binding/source.cpp
@@ -67,9 +67,9 @@ const struct signalsDefault& SourceAPI::signalsDefault() const
return signalsDefault_;
}
-void SourceAPI::addSignal(const std::string& id, const std::string& event, std::vector<std::string>& depends, int retention, const std::string& unit, double frequency, CtlActionT* onReceived, json_object* getSignalsArgs)
+void SourceAPI::addSignal(const std::string& id, const std::string& event, std::vector<std::string>& depends, int retention, const std::string& unit, json_object *metadata, double frequency, CtlActionT* onReceived, json_object* getSignalsArgs)
{
- std::shared_ptr<Signal> sig = std::make_shared<Signal>(id, event, depends, unit, retention, frequency, onReceived, getSignalsArgs);
+ std::shared_ptr<Signal> sig = std::make_shared<Signal>(id, event, depends, unit, metadata, retention, frequency, onReceived, getSignalsArgs);
newSignalsM_[id] = sig;
}