summaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/can/can-message-set.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-05-16 17:37:07 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-05-19 11:36:43 +0200
commitd91f5f743bc6f6ec9aadfe96187b45dc93043f61 (patch)
treee79bb26cb4ad4c97c07941ab6f31bb6b7c3fde22 /CAN-binder/low-can-binding/can/can-message-set.cpp
parentfd3978709abbb3ed46caaf48c1d2f45b2c74fa89 (diff)
Include diagnostic_message_t into can_message_set.
Change-Id: I7372e469752dd8e90dc9431b9e5c67df12f56c29 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/can/can-message-set.cpp')
-rw-r--r--CAN-binder/low-can-binding/can/can-message-set.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/CAN-binder/low-can-binding/can/can-message-set.cpp b/CAN-binder/low-can-binding/can/can-message-set.cpp
index 9216f3a..cfa640a 100644
--- a/CAN-binder/low-can-binding/can/can-message-set.cpp
+++ b/CAN-binder/low-can-binding/can/can-message-set.cpp
@@ -18,18 +18,27 @@
#include "can-message-set.hpp"
+#include "../can/can-message-definition.hpp"
+
can_message_set_t::can_message_set_t(
uint8_t index,
const std::string& name,
- std::vector<std::shared_ptr<can_message_definition_t> > can_messages_definition)
+ std::vector<std::shared_ptr<can_message_definition_t> > can_messages_definition,
+ std::vector<std::shared_ptr<diagnostic_message_t> > diagnostic_messages)
: index_{index}
, name_{name}
, can_messages_definition_{can_messages_definition}
+ , diagnostic_messages_{diagnostic_messages}
{
for(auto& cmd : can_messages_definition_)
{
cmd->set_parent(this);
}
+
+ for(auto& dm : diagnostic_messages_)
+ {
+ dm->set_parent(this);
+ }
}
/// @brief Return vector holding all message definition handled by this message set.
@@ -51,4 +60,9 @@ std::vector<std::shared_ptr<can_signal_t> > can_message_set_t::get_can_signals()
}
return can_signals;
+}
+
+std::vector<std::shared_ptr<diagnostic_message_t> > can_message_set_t::get_diagnostic_messages()
+{
+ return diagnostic_messages_;
} \ No newline at end of file