diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-12-07 18:49:09 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-12-14 11:00:49 +0100 |
commit | e599b4ba129df475a9c8bb8290c3803f9dda664a (patch) | |
tree | 98ed8edbd2bb1bcc481fadc5ac0037c87b0608d2 /signal-composer-binding/signal-composer.hpp | |
parent | fb487caec38c0da7a43bab850af6aa79b07befde (diff) |
Load additionnals object at runtime
Later integrated in controller submodule
Change-Id: I7d5c7431e60fc16cc2053747674fe4f14efd6a14
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'signal-composer-binding/signal-composer.hpp')
-rw-r--r-- | signal-composer-binding/signal-composer.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/signal-composer-binding/signal-composer.hpp b/signal-composer-binding/signal-composer.hpp index 6064bf2..8ae41e9 100644 --- a/signal-composer-binding/signal-composer.hpp +++ b/signal-composer-binding/signal-composer.hpp @@ -26,6 +26,7 @@ private: CtlConfigT* ctlConfig_; static CtlSectionT ctlSections_[]; ///< Config Section definition (note: controls section index should match handle retrieval in) + std::vector<std::shared_ptr<SourceAPI>> newSourcesListV_; std::vector<std::shared_ptr<SourceAPI>> sourcesListV_; explicit Composer(const std::string& filepath); @@ -45,6 +46,7 @@ private: static int loadSignals(AFB_ApiT apihandle, CtlSectionT* section, json_object *signalsJ); void initSourcesAPI(); + void execSignalsSubscription(); std::shared_ptr<SourceAPI> getSourceAPI(const std::string& api); void processOptions(const std::map<std::string, int>& opts, std::shared_ptr<Signal> sig, json_object* response) const; public: @@ -53,12 +55,12 @@ public: static void destroyContext(void* ctx); static std::vector<std::string> parseURI(const std::string& uri); int loadConfig(const std::string& filepath); + int loadSources(json_object* sourcesJ); int loadSignals(json_object* signalsJ); + void initSignals(); CtlConfigT* ctlConfig(); std::vector<std::shared_ptr<Signal>> getAllSignals(); std::vector<std::shared_ptr<Signal>> searchSignals(const std::string& aName); json_object* getsignalValue(const std::string& sig, json_object* options); - - void execSignalsSubscription(); }; |