summaryrefslogtreecommitdiffstats
path: root/low-can-binding/binding/application.hpp
diff options
context:
space:
mode:
authorArthur Guyader <arthur.guyader@iot.bzh>2019-07-29 14:53:14 +0200
committerArthur Guyader <arthur.guyader@iot.bzh>2019-08-12 15:06:45 +0200
commit22e1fe8db6686ee6ae32cfe58a10aad9f7dfb3a7 (patch)
tree05c6a378a3ff2d846fc05141789e8225687d42a4 /low-can-binding/binding/application.hpp
parent88077fb4b383cf7f35093b6cc0d2d9d86c6f1bf3 (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 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Change-Id: I1bb95a7ba6f6ebe463319c3972d9d46897181d51
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