- static const struct afb_verb_v2 verbs[]=
- {
- { .verb= "auth", .callback= auth, .auth= &afb_auth_perm, .info="Authentification against service to get the required level of confidence", .session= AFB_SESSION_NONE},
- { .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= "swrite", .callback= swrite, .auth= &afb_auth_loa_1, .info="Write a single CAN message on a CAN bus", .session= AFB_SESSION_LOA_1},
- { .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,
- .onevent = NULL,
- .noconcurrency = 0
- };
-
- /// @brief Initialize the binding.
- ///
- /// @param[in] service Structure which represent the Application Framework Binder.
- ///
- /// @return Exit code, zero if success.
- static int initv2()
- {
- can_bus_t& can_bus_manager = application_t::instance().get_can_bus_manager();