aboutsummaryrefslogtreecommitdiffstats
path: root/low-can-binding/can/message-definition.cpp
diff options
context:
space:
mode:
authorCorentin Le Gall <corentin.legall@iot.bzh>2019-11-14 19:13:25 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2020-01-09 14:40:41 +0100
commit03a4775eefeeba913f69d331e3930700a567c4c5 (patch)
tree8ce29bfe16ac1804ddc920d95d2225469cc5800a /low-can-binding/can/message-definition.cpp
parent9b17d0359dedbf92de95c1150f7e576d58e0331c (diff)
can: Add big endian CAN frame layout handle
- can-decoder.cpp: translate_signal() : Tests "frame_layout_is_little". If false the signal's bit position is changed to fit the layout. - message-definition.cpp: Added the new attribute "frame_layout_is_little" and its getter. - signals.cpp: Added a setter to the bit_position attribute. - converter.cpp: Added a methode to convert a big endian bit_position to a right (little endian) bit_position. Bug-AGL: SPEC-2988 Change-Id: I004c9069eb00f389564927cd12d1b30470c3a59d Signed-off-by: Corentin Le Gall <corentin.legall@iot.bzh> Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding/can/message-definition.cpp')
-rw-r--r--low-can-binding/can/message-definition.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/low-can-binding/can/message-definition.cpp b/low-can-binding/can/message-definition.cpp
index 114307e5..80609827 100644
--- a/low-can-binding/can/message-definition.cpp
+++ b/low-can-binding/can/message-definition.cpp
@@ -23,6 +23,7 @@ message_definition_t::message_definition_t(
const std::string bus,
uint32_t id,
uint32_t flags,
+ bool frame_layout_is_little,
frequency_clock_t frequency_clock,
bool force_send_changed,
const vect_ptr_signal_t& signals)
@@ -30,6 +31,7 @@ message_definition_t::message_definition_t(
bus_{bus},
id_{id},
flags_{flags},
+ frame_layout_is_little_{frame_layout_is_little},
frequency_clock_{frequency_clock},
force_send_changed_{force_send_changed},
last_value_{CAN_MESSAGE_SIZE},
@@ -41,6 +43,7 @@ message_definition_t::message_definition_t(const std::string bus,
const std::string name,
uint32_t length,
uint32_t flags,
+ bool frame_layout_is_little,
frequency_clock_t frequency_clock,
bool force_send_changed,
const vect_ptr_signal_t& signals)
@@ -50,6 +53,7 @@ message_definition_t::message_definition_t(const std::string bus,
name_{name},
length_{length},
flags_{flags},
+ frame_layout_is_little_{frame_layout_is_little},
frequency_clock_{frequency_clock},
force_send_changed_{force_send_changed},
last_value_{CAN_MESSAGE_SIZE},
@@ -112,3 +116,7 @@ uint32_t message_definition_t::get_flags() const
{
return flags_;
}
+
+bool message_definition_t::frame_layout_is_little() const{
+ return frame_layout_is_little_;
+}