summaryrefslogtreecommitdiffstats
path: root/src/can
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-09 00:50:47 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:10:40 +0100
commit40acdf8f4ee0ee4127ffb5f092aaf0376763e7ce (patch)
tree07d71f2139648f734d9309eb3c91183578827339 /src/can
parentb4a19cda296baa7a5d1ec86af8a5adf2b0a8dd98 (diff)
Constructor making mandatory to pass a can_bus_dev_t
instance to initialize it as it is reference. Change-Id: I0261a5e2fdca5a84fd736d7ceae837ff9156b935 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/can')
-rw-r--r--src/can/can-message.cpp4
-rw-r--r--src/can/can-message.hpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/can/can-message.cpp b/src/can/can-message.cpp
index dd15c06..0053ef4 100644
--- a/src/can/can-message.cpp
+++ b/src/can/can-message.cpp
@@ -259,8 +259,8 @@ canfd_frame can_message_t::convert_to_canfd_frame()
*
*********************************************************************************/
-can_message_definition_t::can_message_definition_t()
- : last_value_(CAN_MESSAGE_SIZE)
+can_message_definition_t::can_message_definition_t(can_bus_dev_t& cbd)
+ : bus_{cbd}, last_value_(CAN_MESSAGE_SIZE)
{}
uint32_t can_message_definition_t::get_id() const
diff --git a/src/can/can-message.hpp b/src/can/can-message.hpp
index 0494f5f..87d5fa5 100644
--- a/src/can/can-message.hpp
+++ b/src/can/can-message.hpp
@@ -96,7 +96,7 @@ class can_message_definition_t
* needs to compare an incoming CAN message with the previous frame.*/
public:
- can_message_definition_t();
+ can_message_definition_t(can_bus_dev_t& cbd);
uint32_t get_id() const;
};