Code Review
/
apps
/
agl-service-can-low-level.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Include diagnostic_message_t into can_message_set.
[apps/agl-service-can-low-level.git]
/
CAN-binder
/
low-can-binding
/
can
/
can-message-set.cpp
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
063ca27
..
cfa640a
100644
(file)
--- a/
CAN-binder/low-can-binding/can/can-message-set.cpp
+++ b/
CAN-binder/low-can-binding/can/can-message-set.cpp
@@
-18,27
+18,26
@@
#include "can-message-set.hpp"
#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,
can_message_set_t::can_message_set_t(
uint8_t index,
const std::string& name,
- uint8_t can_bus_count,
- unsigned short can_message_count,
- unsigned short can_signal_count,
- unsigned short can_command_count,
- unsigned short obd2_signal_count,
- 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}
: index_{index}
, name_{name}
- , can_bus_count_{can_bus_count}
- , can_message_count_{can_message_count}
- , can_signal_count_{can_signal_count}
- , can_command_count_{can_command_count}
- , obd2_signal_count_{obd2_signal_count}
, can_messages_definition_{can_messages_definition}
, can_messages_definition_{can_messages_definition}
+ , diagnostic_messages_{diagnostic_messages}
{
for(auto& cmd : can_messages_definition_)
{
{
for(auto& cmd : can_messages_definition_)
{
- cmd->set_parent(std::make_shared<can_message_set_t>(*this));
+ cmd->set_parent(this);
+ }
+
+ for(auto& dm : diagnostic_messages_)
+ {
+ dm->set_parent(this);
}
}
}
}
@@
-61,4
+60,9
@@
std::vector<std::shared_ptr<can_signal_t> > can_message_set_t::get_can_signals()
}
return 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
}
\ No newline at end of file