aboutsummaryrefslogtreecommitdiffstats
path: root/low-can-binding/utils
diff options
context:
space:
mode:
authorArthur Guyader <arthur.guyader@iot.bzh>2019-11-07 10:06:25 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2019-11-07 10:06:25 +0100
commit5912e67b3fe1366089102d1860c9f8ae01f8aec4 (patch)
treea95089c08af19a37cb6bfa391f8b8816187b6800 /low-can-binding/utils
parent33cc8f946c04532d395a3929ccb06938014b0714 (diff)
write: Add feature to build messages and fix some functions
Allows to build a message (J1939,BCM) with a signal and a value. Bug-AGL: SPEC-2386 Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Change-Id: Iadca13a927ff83f713f39da441c88356695a1285
Diffstat (limited to 'low-can-binding/utils')
-rw-r--r--low-can-binding/utils/socketcan-isotp.hpp2
-rw-r--r--low-can-binding/utils/socketcan.hpp11
2 files changed, 12 insertions, 1 deletions
diff --git a/low-can-binding/utils/socketcan-isotp.hpp b/low-can-binding/utils/socketcan-isotp.hpp
index 86ed9faf..dfaf0089 100644
--- a/low-can-binding/utils/socketcan-isotp.hpp
+++ b/low-can-binding/utils/socketcan-isotp.hpp
@@ -36,4 +36,4 @@ namespace utils
virtual int write_message(message_t& obj);
int define_tx_address(std::string device_name, canid_t rx_id, canid_t tx_id);
};
-} \ No newline at end of file
+}
diff --git a/low-can-binding/utils/socketcan.hpp b/low-can-binding/utils/socketcan.hpp
index 7b2501af..b08eeff4 100644
--- a/low-can-binding/utils/socketcan.hpp
+++ b/low-can-binding/utils/socketcan.hpp
@@ -30,6 +30,17 @@
#define INVALID_SOCKET -1
#define NO_CAN_ID 0xFFFFFFFFU
+/**
+ * @enum socket_type
+ * @brief The type of socket
+ */
+enum class socket_type {
+ BCM, ///< BCM - Socket BCM
+ J1939_ADDR_CLAIM, ///< J1939 - Socket J1939
+ J1939, ///< J1939 - Socket J1939
+ INVALID
+};
+
namespace utils
{