diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-09-25 01:10:42 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-12-14 11:00:25 +0100 |
commit | 1a832ce483ff8c1276bc3cd3d97e3caadb38c4df (patch) | |
tree | c0d62a2ef4aff80eebea1454124a324ca6ccc5d2 /signal-composer-binding/signal.hpp | |
parent | 51ee5299a7db41e52da2cf52dd9cd9c05b76740a (diff) |
Implement recursionCheck using observer pattern
Change-Id: Ic404c098f316106abe1918c3cd100ae047f4f555
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'signal-composer-binding/signal.hpp')
-rw-r--r-- | signal-composer-binding/signal.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/signal-composer-binding/signal.hpp b/signal-composer-binding/signal.hpp index 8d0d1ab..46caa23 100644 --- a/signal-composer-binding/signal.hpp +++ b/signal-composer-binding/signal.hpp @@ -40,6 +40,12 @@ struct SignalValue { std::string strVal; }; +/// @brief Holds a signal (raw or virtual) definition. Value could be of +/// different types, so an intermediate structure is use to store them. +/// A signal could also be a subject or an observer at the same time, this +/// is the behavior retained to compose virtual signals based on raw signals. +/// And this is the way that is used to update and reacts to an underlaying +/// signal change. class Signal: public Observable<Signal>, public Observer<Signal> { private: @@ -76,4 +82,7 @@ public: double maximum(int seconds = 0) const; struct SignalValue last() const; //int recursionCheck() const; + + int initialRecursionCheck(); + int recursionCheck(Signal* obs); }; |