aboutsummaryrefslogtreecommitdiffstats
path: root/signal-composer-binding/signal.hpp
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/signal.hpp
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/signal.hpp')
-rw-r--r--signal-composer-binding/signal.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/signal-composer-binding/signal.hpp b/signal-composer-binding/signal.hpp
index 091d060..0a12b16 100644
--- a/signal-composer-binding/signal.hpp
+++ b/signal-composer-binding/signal.hpp
@@ -85,6 +85,7 @@ private:
int retention_;
double frequency_;
std::string unit_;
+ json_object* metadata_;
CtlActionT* onReceived_;
json_object* getSignalsArgs_;
struct signalCBT signalCtx_;
@@ -92,8 +93,7 @@ private:
public:
bool subscribed_; ///< subscribed_ - boolean value telling if yes or no the signal has been subcribed to the low level binding.
Signal();
- Signal(const std::string& id, const std::string& event, std::vector<std::string>& depends, const std::string& unit, int retention, double frequency, CtlActionT* onReceived, json_object* getSignalsArgs);
- Signal(const std::string& id, std::vector<std::string>& depends, const std::string& unit, int retention, double frequency, CtlActionT* onReceived);
+ Signal(const std::string& id, const std::string& event, std::vector<std::string>& depends, const std::string& unit, json_object *metadata, int retention, double frequency, CtlActionT* onReceived, json_object* getSignalsArgs);
~Signal();
explicit operator bool() const;