summaryrefslogtreecommitdiffstats
path: root/signal-composer-binding/signal.hpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-09-19 01:17:28 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:25 +0100
commitf4fba8a2744991ff8c5cb8af4a67c7d9456f1057 (patch)
tree352231c9342344599ec2af08ef82495deefb238f /signal-composer-binding/signal.hpp
parent9f61a83961cdbf133fdeb80cb978e6c79f4a9547 (diff)
Modification about conf definition
- Argument for each signal subscription. (getSignalsArgs) - differentiation between Signal as raw signal from another API and virtual signal depending upon other signals - changing way to specify function with uri that specify everythings that could be needed to invoke a function. Change-Id: I8917c5ae3c2c1e3fa48ddfdda41fc75eaba32bb7 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'signal-composer-binding/signal.hpp')
-rw-r--r--signal-composer-binding/signal.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/signal-composer-binding/signal.hpp b/signal-composer-binding/signal.hpp
index 2088ffd..4e078fc 100644
--- a/signal-composer-binding/signal.hpp
+++ b/signal-composer-binding/signal.hpp
@@ -37,13 +37,16 @@ class Signal
{
private:
std::string id_;
- std::vector<std::string> signalSigList_;
+ std::string event_;
+ std::vector<std::string> dependsSigV_;
long long int timestamp_;
struct SignalValue value_;
std::map<long long int, struct SignalValue> history_; ///< history_ - Hold signal value history in map with <timestamp, value>
double frequency_;
std::string unit_;
CtlActionT* onReceived_;
+ json_object* getSignalsArgs_;
+
std::vector<Signal*> Observers_;
void notify();
@@ -51,7 +54,8 @@ private:
int recursionCheck(const std::string& origId);
public:
- Signal(const std::string& id, std::vector<std::string>& sources, const std::string& unit, double frequency, CtlActionT* onReceived);
+ Signal(const std::string& id, const std::string& event, std::vector<std::string>& depends, const std::string& unit, double frequency, CtlActionT* onReceived, json_object* getSignalsArgs);
+ Signal(const std::string& id, std::vector<std::string>& depends, const std::string& unit, double frequency, CtlActionT* onReceived);
explicit operator bool() const;
bool operator==(const Signal& other) const;
bool operator==(const std::string& aName) const;