Code Review
/
apps
/
agl-service-can-low-level.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Rename header file to hpp.
[apps/agl-service-can-low-level.git]
/
src
/
low-can-binding.cpp
diff --git
a/src/low-can-binding.cpp
b/src/low-can-binding.cpp
index
af86786
..
b895adc
100644
(file)
--- a/
src/low-can-binding.cpp
+++ b/
src/low-can-binding.cpp
@@
-40,8
+40,7
@@
#include <afb/afb-binding.h>
#include <afb/afb-service-itf.h>
#include <afb/afb-binding.h>
#include <afb/afb-service-itf.h>
-#include "ll-can-binding.h"
-#include "obd2.h"
+#include "obd2.hpp"
/*
* Interface between the daemon and the binding
/*
* Interface between the daemon and the binding
@@
-177,7
+176,10
@@
static int subscribe_unsubscribe_name(struct afb_req request, int subscribe, con
if (0 == strcmp(name, "*"))
return subscribe_unsubscribe_all(request, subscribe);
if (0 == strcmp(name, "*"))
return subscribe_unsubscribe_all(request, subscribe);
- find_signals(name, sig);
+ if(obd2_handler_c.is_obd2_signal(name))
+
+ else
+ find_can_signals(name, sig);
if (sig == NULL) {
return 0;
}
if (sig == NULL) {
return 0;
}
@@
-246,6
+248,13
@@
const struct afb_binding *afbBindingV1Register (const struct afb_binding_interfa
return &binding_desc;
}
return &binding_desc;
}
+/**
+ * @brief Initialize the binding.
+ *
+ * @param[in] service Structure which represent the Application Framework Binder.
+ *
+ * @return Exit code, zero if success.
+ */
int afbBindingV1ServiceInit(struct afb_service service)
{
std::ifstream fd_conf;
int afbBindingV1ServiceInit(struct afb_service service)
{
std::ifstream fd_conf;
@@
-267,7
+276,7
@@
int afbBindingV1ServiceInit(struct afb_service service)
jo_canbus = json_tokener_parse(&fd_conf_content);
/* Open CAN socket */
jo_canbus = json_tokener_parse(&fd_conf_content);
/* Open CAN socket */
-
CanBus_c
CanBus_handler(interface, json_object_get_string(json_object_object_get(jo_canbus, "deviceName"));
+
can_bus_t
CanBus_handler(interface, json_object_get_string(json_object_object_get(jo_canbus, "deviceName"));
CanBus_handler.open();
CanBus_handler.start_threads();
}
CanBus_handler.open();
CanBus_handler.start_threads();
}