summaryrefslogtreecommitdiffstats
path: root/low-can-binding/can/message/message.hpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2019-11-26 16:19:38 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2019-11-28 16:11:47 +0100
commit22b1864b72c2520fbc9d4e3d3332c28916b5a9ed (patch)
tree0d325c2a86751fe88ed046b448b783beec3cabbd /low-can-binding/can/message/message.hpp
parentfee3b49099fb39731e15f9e26ad5a873bc109f59 (diff)
Add feature ISO TP (multi frames and peer to peer)
This commit adds the ISO TP feature. The ISO TP protocol allows to communicate between two ECU. The protocol allows multi packets management. Bug-AGL : SPEC-2779 Bug-AGL: SPEC-2976 Change-Id: Ic222615b547f28e926930e6c1dea2c0265055afd Signed-off-by: Arthur Guyader <arthur.guyader@iot.bzh> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding/can/message/message.hpp')
-rw-r--r--low-can-binding/can/message/message.hpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/low-can-binding/can/message/message.hpp b/low-can-binding/can/message/message.hpp
index 6cef0185..db06eb38 100644
--- a/low-can-binding/can/message/message.hpp
+++ b/low-can-binding/can/message/message.hpp
@@ -29,6 +29,7 @@
#define CAN_MESSAGE_SIZE 8
#define MAX_BCM_CAN_FRAMES 257
+#define MAX_ISOTP_FRAMES 4096
/**
@@ -42,6 +43,8 @@
#define J1939_PROTOCOL 0x0010
#define J1939_ADDR_CLAIM_PROTOCOL 0x0020
#define ISOTP_PROTOCOL 0x0040
+#define ISOTP_SEND 0x0080
+#define ISOTP_RECEIVE 0x0100
#define FD_FRAME 0x0800
/// @class message_t
@@ -69,16 +72,17 @@ public:
uint32_t get_length() const;
uint64_t get_timestamp() const;
- void set_data(std::vector<uint8_t> &data);
+ void set_data(std::vector<uint8_t> data);
void set_sub_id(int sub_id);
void set_timestamp(uint64_t timestamp);
virtual bool is_set() = 0;
virtual std::string get_debug_message() = 0;
virtual uint32_t get_id() const = 0;
+ virtual void set_id(canid_t id) = 0;
uint32_t get_flags();
void set_flags(uint32_t flags);
+ void erase_flags();
uint32_t get_maxdlen();
void set_maxdlen(uint32_t maxdlen);
-
-
+ void set_length(uint32_t length);
};