summaryrefslogtreecommitdiffstats
path: root/signal-composer-binding/signal.hpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-09-15 16:29:17 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:25 +0100
commit677cde6288a4574b8251a4a532b1d9e1594b09b2 (patch)
treec510a0cdd76e2b8de1cdaf254fd270c8bfebae42 /signal-composer-binding/signal.hpp
parenteabae24ea592420de46e36f0b1af5d39eee5b8a4 (diff)
Subscription by plugin to signals
Change-Id: Icb923f87df2be8eb664106bc9077b3a8221dd3ce Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'signal-composer-binding/signal.hpp')
-rw-r--r--signal-composer-binding/signal.hpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/signal-composer-binding/signal.hpp b/signal-composer-binding/signal.hpp
index cb50c67..4d4c641 100644
--- a/signal-composer-binding/signal.hpp
+++ b/signal-composer-binding/signal.hpp
@@ -28,7 +28,7 @@ class Signal
{
private:
std::string id_;
- std::vector<std::string> sourcesSig_;
+ std::vector<std::string> signalSigList_;
long long int timestamp_;
double value_;
std::map<long long int, double> history_; ///< history_ - Hold signal value history in map with <timestamp, value>
@@ -46,11 +46,12 @@ public:
bool operator==(const Signal& other) const;
bool operator==(const std::string& aName) const;
- std::string id() const;
+ const std::string id() const;
+ json_object* toJSON() const;
void update(long long int timestamp, double value);
int onReceivedCB(json_object *queryJ);
- void attachToSources(bindingApp& bApp);
+ void attachToSourceSignals(bindingApp& bApp);
void notify();
//virtual double average() const;