Renaming configuration to application
[apps/agl-service-can-low-level.git] / CAN-binder / low-can-binding / can / can-message-definition.cpp
index 256af88..28d45fe 100644 (file)
@@ -17,6 +17,8 @@
 
 #include "can-message-definition.hpp"
 
+#include "../binding/application.hpp"
+
 can_message_definition_t::can_message_definition_t(const std::string bus)
        : parent_{nullptr}, bus_{bus}, last_value_{CAN_MESSAGE_SIZE}
 {}
@@ -63,19 +65,20 @@ can_message_definition_t::can_message_definition_t(
        frequency_clock_{frequency_clock},
        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);
-       }
-}
+       can_signals_{can_signals}
+{}
 
 const std::string can_message_definition_t::get_bus_name() const
 {
        return bus_;
 }
 
+const std::string can_message_definition_t::get_bus_device_name() const
+{
+       return application_t::instance().get_can_bus_manager()
+               .get_can_device_name(bus_);
+}
+
 uint32_t can_message_definition_t::get_id() const
 {
        return id_;