summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-09-18 14:30:57 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:25 +0100
commitdc023f046636f8abb44dab521a8eb74c9f1f7769 (patch)
treeaa58c69ea6d96792a1b7b3896b37e9c72bb74f8d
parentc7d508ecd4c57b1f8f372f4e5042d834b7f42ff4 (diff)
Match signal if name found in source signal.
Change-Id: Ia080cddac3973998a2dc8f8a143489298d6c8504 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--signal-composer-binding/signal.cpp1
-rw-r--r--signal-composer-binding/signal.hpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/signal-composer-binding/signal.cpp b/signal-composer-binding/signal.cpp
index dfa3d5f..673295a 100644
--- a/signal-composer-binding/signal.cpp
+++ b/signal-composer-binding/signal.cpp
@@ -57,6 +57,7 @@ bool Signal::operator ==(const std::string& aName) const
for( const std::string& src : signalSigList_)
{
if(! fnmatch(aName.c_str(), src.c_str(), FNM_CASEFOLD)) {return true;}
+ if( src.find(aName) != std::string::npos) {return true;}
}
return false;
}
diff --git a/signal-composer-binding/signal.hpp b/signal-composer-binding/signal.hpp
index 34e6ab1..ba7ed60 100644
--- a/signal-composer-binding/signal.hpp
+++ b/signal-composer-binding/signal.hpp
@@ -59,6 +59,7 @@ public:
const std::string id() const;
json_object* toJSON() const;
+ void set(long long int timestamp, struct SignalValue& value);
void update(long long int timestamp, struct SignalValue value);
int onReceivedCB(json_object *queryJ);
void attachToSourceSignals(bindingApp& bApp);