From 22e1fe8db6686ee6ae32cfe58a10aad9f7dfb3a7 Mon Sep 17 00:00:00 2001 From: Arthur Guyader Date: Mon, 29 Jul 2019 14:53:14 +0200 Subject: 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 Change-Id: I1bb95a7ba6f6ebe463319c3972d9d46897181d51 --- low-can-binding/binding/application.hpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'low-can-binding/binding/application.hpp') 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 > message_set_; ///< Vector holding all message set from JSON signals description file std::map > can_devices_; ///< Map containing all independant opened CAN sockets, key is the socket int value. - +#ifdef USE_FEATURE_J1939 + std::shared_ptr subscription_address_claiming_; ///< Subscription holding the socketcan J1939 which is in charge of handling the address claiming protocol + //std::shared_ptr 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 get_socket_address_claiming(); + + std::shared_ptr get_subscription_address_claiming(); + + void set_subscription_address_claiming(std::shared_ptr new_subscription); +#endif /* /// TODO: implement this function as method into can_bus class /// @brief Pre initialize actions made before CAN bus initialization -- cgit 1.2.3-korg