aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CAN-binder/low-can-binding/binding/configuration-generated.cpp22
-rw-r--r--CAN-binder/low-can-binding/can/can-message-definition.cpp7
-rw-r--r--CAN-binder/low-can-binding/can/can-message-set.cpp12
3 files changed, 23 insertions, 18 deletions
diff --git a/CAN-binder/low-can-binding/binding/configuration-generated.cpp b/CAN-binder/low-can-binding/binding/configuration-generated.cpp
index ad31c455..bce469e5 100644
--- a/CAN-binder/low-can-binding/binding/configuration-generated.cpp
+++ b/CAN-binder/low-can-binding/binding/configuration-generated.cpp
@@ -456,7 +456,27 @@ configuration_t::configuration_t()
} // end diagnostic_messages_ vector
})} // end can_message_set entry
} // end can_message_set vector
-{}
+{
+ for(auto& cms: can_message_set_)
+ {
+ std::vector<std::shared_ptr<can_message_definition_t> >& can_messages_definition = cms->get_can_message_definition();
+ for(auto& cmd : can_messages_definition)
+ {
+ cmd->set_parent(cms.get());
+ std::vector<std::shared_ptr<can_signal_t> >& can_signals = cmd->get_can_signals();
+ for(auto& sig: can_signals)
+ {
+ sig->set_parent(cmd.get());
+ }
+ }
+
+ std::vector<std::shared_ptr<diagnostic_message_t> >& diagnostic_messages = cms->get_diagnostic_messages();
+ for(auto& dm : diagnostic_messages)
+ {
+ dm->set_parent(cms.get());
+ }
+ }
+}
const std::string configuration_t::get_diagnostic_bus() const
{
diff --git a/CAN-binder/low-can-binding/can/can-message-definition.cpp b/CAN-binder/low-can-binding/can/can-message-definition.cpp
index 256af888..a9ee20c5 100644
--- a/CAN-binder/low-can-binding/can/can-message-definition.cpp
+++ b/CAN-binder/low-can-binding/can/can-message-definition.cpp
@@ -64,12 +64,7 @@ can_message_definition_t::can_message_definition_t(
force_send_changed_{force_send_changed},
last_value_{CAN_MESSAGE_SIZE},
can_signals_{std::move(can_signals)}
-{
- for(auto& sig: can_signals_)
- {
- sig->set_parent(this);
- }
-}
+{}
const std::string can_message_definition_t::get_bus_name() const
{
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 1e352d9a..dcb859d5 100644
--- a/CAN-binder/low-can-binding/can/can-message-set.cpp
+++ b/CAN-binder/low-can-binding/can/can-message-set.cpp
@@ -29,17 +29,7 @@ can_message_set_t::can_message_set_t(
, name_{name}
, can_messages_definition_{std::move(can_messages_definition)}
, diagnostic_messages_{std::move(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.
std::vector<std::shared_ptr<can_message_definition_t> >& can_message_set_t::get_can_message_definition()