summaryrefslogtreecommitdiffstats
path: root/CAN-binder/low-can-binding/can/can-message-set.cpp
diff options
context:
space:
mode:
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 9216f3a3..cfa640a6 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