summaryrefslogtreecommitdiffstats
path: root/low-can-binding/binding/application.hpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-11-26 16:18:41 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2019-11-28 16:11:46 +0100
commit451598fa9ce4e57a00c9312c04839e0b3dcdf320 (patch)
tree49a6341d98f1a6ca34320d5f6512ac08df1cccfd /low-can-binding/binding/application.hpp
parent68d8bc019fab3e73654a330baf6b8dd7c11859ca (diff)
Integrate the J1939 features : address claiming and write.
This commit allows to write J1939 messages and add the management of the address claiming. Bug-AGL: SPEC-2386 Bug-AGL: SPEC-2976 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Change-Id: I1bb95a7ba6f6ebe463319c3972d9d46897181d51 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding/binding/application.hpp')
-rw-r--r--low-can-binding/binding/application.hpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/low-can-binding/binding/application.hpp b/low-can-binding/binding/application.hpp
index b73ace71..a5d2285c 100644
--- a/low-can-binding/binding/application.hpp
+++ b/low-can-binding/binding/application.hpp
@@ -26,6 +26,10 @@
#include "../can/message-set.hpp"
#include "../can/signals.hpp"
#include "../diagnostic/diagnostic-manager.hpp"
+#ifdef USE_FEATURE_J1939
+ #include "../utils/socketcan-j1939/socketcan-j1939-data.hpp"
+ #include "../utils/socketcan-j1939/socketcan-j1939-addressclaiming.hpp"
+#endif
///
/// @brief Class represents a configuration attached to the binding.
@@ -48,7 +52,10 @@ class application_t
std::vector<std::shared_ptr<message_set_t> > message_set_; ///< Vector holding all message set from JSON signals description file
std::map<std::string, std::shared_ptr<low_can_subscription_t> > can_devices_; ///< Map containing all independant opened CAN sockets, key is the socket int value.
-
+#ifdef USE_FEATURE_J1939
+ std::shared_ptr<low_can_subscription_t> subscription_address_claiming_; ///< Subscription holding the socketcan J1939 which is in charge of handling the address claiming protocol
+ //std::shared_ptr<utils::socketcan_j1939_addressclaiming_t> socket_address_claiming_;
+#endif
application_t(); ///< Private constructor with implementation generated by the AGL generator.
public:
@@ -84,6 +91,13 @@ class application_t
void set_active_message_set(uint8_t id);
+#ifdef USE_FEATURE_J1939
+ std::shared_ptr<utils::socketcan_t> get_socket_address_claiming();
+
+ std::shared_ptr<low_can_subscription_t> get_subscription_address_claiming();
+
+ void set_subscription_address_claiming(std::shared_ptr<low_can_subscription_t> new_subscription);
+#endif
/*
/// TODO: implement this function as method into can_bus class
/// @brief Pre initialize actions made before CAN bus initialization