diff options
author | 2017-07-20 10:14:56 +0200 | |
---|---|---|
committer | 2017-07-20 13:23:15 +0000 | |
commit | 944295b5af95fdcb1a33e2028ef709e7bf60cb6e (patch) | |
tree | b22ddde59ab0f0fd3fabdb87413105b9571cdf9b /low-can-binding/binding/low-can-hat.cpp | |
parent | 5d58986bc8389a44741486c5856f39f51a4c6e39 (diff) |
Fix: align bindingv2 struct with dab appfw version
DAB Fixes follows appfw API break.
Following functions now return 0 on success and negative value
on failure :
o afb_req_subcall
o afb_req_subcall_sync
o afb_service_call
o afb_service_call_sync
Verbosity macros used in v2 bindings now needs to be prefixed
with AFB_ (ERROR -> AFB_ERROR)
New field for afb_verb_v2 and afb_binding_v2 structures
Fix: uninitialized variables.
Change-Id: Ia728b9ac4576b9b44c8c7c054820b7c64a314942
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding/binding/low-can-hat.cpp')
-rw-r--r-- | low-can-binding/binding/low-can-hat.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/low-can-binding/binding/low-can-hat.cpp b/low-can-binding/binding/low-can-hat.cpp index 7113b69a..6709089e 100644 --- a/low-can-binding/binding/low-can-hat.cpp +++ b/low-can-binding/binding/low-can-hat.cpp @@ -34,14 +34,15 @@ extern "C" static const struct afb_verb_v2 verbs[]= { - { .verb= "subscribe", .callback= subscribe, .auth= NULL, .session= AFB_SESSION_NONE}, - { .verb= "unsubscribe", .callback= unsubscribe, .auth= NULL, .session= AFB_SESSION_NONE}, - { .verb= NULL, .callback= NULL, .auth= NULL, .session= 0} + { .verb= "subscribe", .callback= subscribe, .auth= NULL, .info="Let subscribe to signals", .session= AFB_SESSION_NONE}, + { .verb= "unsubscribe", .callback= unsubscribe, .auth= NULL, .info="Let unsubscribe signals", .session= AFB_SESSION_NONE}, + { .verb= NULL, .callback= NULL, .auth= NULL, .info=NULL, .session= 0} }; const struct afb_binding_v2 afbBindingV2 { .api = "low-can", .specification = NULL, + .info = "API to Low level CAN service, read and decode the bus", .verbs = verbs, .preinit = NULL, .init = initv2, @@ -67,7 +68,7 @@ extern "C" if(application_t::instance().get_diagnostic_manager().initialize()) return 0; - ERROR("There was something wrong with CAN device Initialization."); + AFB_ERROR("There was something wrong with CAN device Initialization."); return 1; } }; |