diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-08-24 12:47:41 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-10-17 10:40:30 +0200 |
commit | 238cabda41dd88a9ac482b3b28886acd0a31ca6c (patch) | |
tree | 49735a1929690725886f142781b31820192fdaf4 /high-can-binding | |
parent | 1cd92a82c9efb72785903cf2fe089f1c3e9ef6dd (diff) |
Rename API from high-can to high-viwi
This service is meant to be more generic and expose as
many information from several sources.
Change-Id: I657dedf397ab55e048e435dfd16ce47066820347
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'high-can-binding')
-rw-r--r-- | high-can-binding/CMakeLists.txt | 4 | ||||
-rw-r--r-- | high-can-binding/high-can-binding-hat.cpp | 4 | ||||
-rw-r--r-- | high-can-binding/high-can-binding.cpp | 2 | ||||
-rw-r--r-- | high-can-binding/high.cpp | 26 |
4 files changed, 18 insertions, 18 deletions
diff --git a/high-can-binding/CMakeLists.txt b/high-can-binding/CMakeLists.txt index 3eb64c7..f8f1dc3 100644 --- a/high-can-binding/CMakeLists.txt +++ b/high-can-binding/CMakeLists.txt @@ -18,10 +18,10 @@ ########################################################################### # Add target to project dependency list -PROJECT_TARGET_ADD(high-can) +PROJECT_TARGET_ADD(high-viwi) # Define project Targets - add_library(${TARGET_NAME} MODULE ${TARGET_NAME}-binding.cpp high-can-binding-hat.cpp high.cpp) + add_library(${TARGET_NAME} MODULE ${TARGET_NAME}-binding.cpp high-viwi-binding-hat.cpp high.cpp) # Binder exposes a unique public entry point SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES diff --git a/high-can-binding/high-can-binding-hat.cpp b/high-can-binding/high-can-binding-hat.cpp index 4a5e348..6376cf0 100644 --- a/high-can-binding/high-can-binding-hat.cpp +++ b/high-can-binding/high-can-binding-hat.cpp @@ -1,4 +1,4 @@ -#include "high-can-binding-hat.hpp" +#include "high-viwi-binding-hat.hpp" #include <cstddef> /// Interface between the daemon and the binding @@ -13,7 +13,7 @@ static const struct afb_verb_v2 verbs[]= }; const struct afb_binding_v2 afbBindingV2 = { - .api = "high-can", + .api = "high-viwi", .specification = "", .info = "High CAN ViWi API connected to low-can AGL service", .verbs = verbs, diff --git a/high-can-binding/high-can-binding.cpp b/high-can-binding/high-can-binding.cpp index 4891f6c..2ded902 100644 --- a/high-can-binding/high-can-binding.cpp +++ b/high-can-binding/high-can-binding.cpp @@ -16,7 +16,7 @@ * limitations under the License. */ -#include "high-can-binding-hat.hpp" +#include "high-viwi-binding-hat.hpp" #include <json-c/json.h> #include "high.hpp" High high; diff --git a/high-can-binding/high.cpp b/high-can-binding/high.cpp index d7314e5..9d6a074 100644 --- a/high-can-binding/high.cpp +++ b/high-can-binding/high.cpp @@ -1,21 +1,21 @@ /** TYPICAL COMMANDS: -high-can start -high-can get {"name":"/car/doors/"} -high-can get {"name":"/car/doors/6078d4-23b89b-8faaa9-8bd0f3"} -high-can get {"name":"/car/doors/","fields":["isDoorOpen"]} -high-can subscribe {"name":"/car/doors/6078d4-23b89b-8faaa9-8bd0f3"} note: fields parameter on subscribe is not implemented yet -high-can unsubscribe {"name":"/car/doors/6078d4-23b89b-8faaa9-8bd0f3"} -high-can subscribe {"name":"/car/doors/"} -high-can subscribe {"name":"/car/doors/6078d4-23b89b-8faaa9-8bd0f3","interval":5000} -high-can subscribe {"name":"/car/doors/","interval":5000} -high-can unsubscribe {"name":"/car/doors/","interval":5000} +high-viwi start +high-viwi get {"name":"/car/doors/"} +high-viwi get {"name":"/car/doors/6078d4-23b89b-8faaa9-8bd0f3"} +high-viwi get {"name":"/car/doors/","fields":["isDoorOpen"]} +high-viwi subscribe {"name":"/car/doors/6078d4-23b89b-8faaa9-8bd0f3"} note: fields parameter on subscribe is not implemented yet +high-viwi unsubscribe {"name":"/car/doors/6078d4-23b89b-8faaa9-8bd0f3"} +high-viwi subscribe {"name":"/car/doors/"} +high-viwi subscribe {"name":"/car/doors/6078d4-23b89b-8faaa9-8bd0f3","interval":5000} +high-viwi subscribe {"name":"/car/doors/","interval":5000} +high-viwi unsubscribe {"name":"/car/doors/","interval":5000} */ #include <json-c/json.h> #include <algorithm> #include "high.hpp" -#include "high-can-binding-hat.hpp" +#include "high-viwi-binding-hat.hpp" #include <time.h> #include <sstream> #include <iterator> @@ -156,9 +156,9 @@ void High::parseConfigAndSubscribe() json_object *dummy; const std::string js = json_object_get_string(jobj); if(afb_service_call_sync("low-can", "subscribe", jobj, &dummy) < 0) - AFB_ERROR("high-can subscription to low-can FAILED %s", js.c_str()); + AFB_ERROR("high-viwi subscription to low-can FAILED %s", js.c_str()); else - AFB_NOTICE("high-can subscribed to low-can %s", js.c_str()); + AFB_NOTICE("high-viwi subscribed to low-can %s", js.c_str()); json_object_put(dummy); } json_object_put(config); |